1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-01 05:47:28 +03:00

47078 Commits

Author SHA1 Message Date
Stefan Metzmacher
db7e894782 s3:ntlm_auth: also use gensec for "ntlmssp-client-1" and "gss-spnego-client"
This implicitly fixes bug #10708.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10708

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
(cherry picked from commit 279d58c1e68c9466a76e4a67d2cfea22e8719d31)
2016-03-29 16:24:37 +02:00
Stefan Metzmacher
aea667cd26 winbindd: make use of ntlmssp_resume_ccache backend for WINBINDD_CCACHE_NTLMAUTH
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
(cherry picked from commit 716e78f3b294210130f3cf253f496391534819b0)
2016-03-29 16:24:37 +02:00
Stefan Metzmacher
6ee35d96e3 s3:auth_generic: add "ntlmssp_resume_ccache" backend in auth_generic_client_prepare()
This will be used by winbindd in order to correctly implement WINBINDD_CCACHE_NTLMAUTH.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
(cherry picked from commit 8bcde9ec625547df42915e9138d696deeabdb62d)
2016-03-29 16:24:37 +02:00
Stefan Metzmacher
3585e415e9 s3:ntlmssp: remove unused libsmb/ntlmssp_wrap.c
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
(cherry picked from commit 52c03c07151a12e84fb4d34443864e59583c0db9)
2016-03-29 16:24:37 +02:00
Stefan Metzmacher
993420f27a s3:auth_generic: make use of the top level NTLMSSP client code
There's no reason to use gensec_ntlmssp3_client_ops, the
WINBINDD_CCACHE_NTLMAUTH isn't available via gensec anyway.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
(cherry picked from commit 0d66e2d34f656028eb3adb35acb653a45c041890)
2016-03-29 16:24:37 +02:00
Stefan Metzmacher
cb7bf55b3b winbindd: pass an memory context to do_ntlm_auth_with_stored_pw()
We should avoid using NULL.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
(cherry picked from commit 871e8a9fd029bbcbccb79bd17f9c6a2617b8be55)
2016-03-29 16:24:36 +02:00
Stefan Metzmacher
c9d2b8decb s3:tests/test_ntlm_auth_s3: test ntlmssp-client-1 with cached credentials
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11776

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
(cherry picked from commit 9bd1ecffffd070333a22ef2449a179cee3effe5d)
2016-03-29 16:24:36 +02:00
Stefan Metzmacher
0f54d603de s3:torture/test_ntlm_auth.py: add --client-use-cached-creds option
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11776

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
(cherry picked from commit 1289130ad2aeded63990bf1bde6f169505c62280)
2016-03-29 16:24:36 +02:00
Stefan Metzmacher
2dac5586c8 s3:torture/test_ntlm_auth.py: replace tabs with whitespaces
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
(cherry picked from commit cf2ea04135774853d1cebca82c60bed890135163)
2016-03-29 16:24:36 +02:00
Stefan Metzmacher
8800015770 s3:ntlm_auth: fix --use-cached-creds with ntlmssp-client-1
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11776

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
(cherry picked from commit 69a7ec794213e8adec5dcbd9ca45172df13292c1)
2016-03-29 16:24:36 +02:00
Stefan Metzmacher
14b2a51610 s3:auth_generic: add auth_generic_client_start_by_sasl()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 79a6fc0532936558421eb4321f795655b5280763)
2016-03-29 16:24:35 +02:00
Stefan Metzmacher
a0feacff89 s3:auth_generic: add auth_generic_client_start_by_name()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
(cherry picked from commit ccfd2647c7e65c3e2ad92dbc27c21570da0706d4)
2016-03-29 16:24:35 +02:00
Stefan Metzmacher
f702a9e209 s3:librpc/gse: implement gensec_gse_max_{input,wrapped}_size()
This is important in order to support gensec_[un]wrap() with GENSEC_SEAL.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit dec9d085f3eea8d49fa129c05c030bdd779cba54)
2016-03-29 16:24:35 +02:00
Stefan Metzmacher
5a046d57df s3:librpc/gse: don't log gss_acquire_creds failed at level 0
Some callers just retry after a kinit.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 79bf88353488b5912435e0c7f8e77f2d075ce134)
2016-03-29 16:24:34 +02:00
Stefan Metzmacher
47272c3643 s3:librpc/gse: correctly support GENSEC_FEATURE_SESSION_KEY
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit e4aebd7e28e7b00a13246b367eb2e7de5ae7b57b)
2016-03-29 16:24:34 +02:00
Stefan Metzmacher
2b351b7e3d s3:librpc/gse: set GSS_KRB5_CRED_NO_CI_FLAGS_X in gse_init_client() if available
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit a8fa078f1acbd9fb1a1681033922731dce855aad)
2016-03-29 16:24:34 +02:00
Stefan Metzmacher
91e27173d0 s3:librpc/gse: fix debug message in gse_init_client()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 84c66f1a388c8b5105f3740a3cd5d4d5a27f6ee8)
2016-03-29 16:24:34 +02:00
Stefan Metzmacher
4357b220b4 s3:librpc/gse: make use of GSS_C_EMPTY_BUFFER in gse_init_client
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 46b92525181fa32c5797c914e8de92f3c226e3c7)
2016-03-29 16:24:34 +02:00
Stefan Metzmacher
0555445606 s3:libads: remove unused ads_connect_gc()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit cd8af25d4bf87a9156cb2afb3dd206c68b1bedd7)
2016-03-29 16:24:34 +02:00
Stefan Metzmacher
0d53d8a83d s3:selftest: run samba3.blackbox.smbclient_auth.plain also with $SERVER_IPV6
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 2c9f9557e4d7e02b4f588aa0a6551a6881ac57af)
2016-03-29 16:24:33 +02:00
Stefan Metzmacher
16e14f9382 s3:test_smbclient_auth.sh: test using the ip address in the unc path (incl. ipv6-literal.net)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit e906739553ee6112426af0cf29e33ef1920a316c)
2016-03-29 16:24:33 +02:00
Volker Lendecke
a70f6207f8 spnego: Correctly check asn1_tag_remaining retval
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit 024c619fa82960ae4f8af029b6872102202ffd07)
2016-03-29 16:24:32 +02:00
Stefan Metzmacher
24c6d426b7 s3:pam_smbpass: remove unused dependency to LIBNTLMSSP
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2016-03-29 16:24:31 +02:00
Stefan Metzmacher
62e5169cd7 s3:clispnego: fix confusing warning in spnego_gen_krb5_wrap()
asn1_extract_blob() stops further asn1 processing by setting has_error.

Don't call asn1_has_error() after asn1_extract_blob() has been successful
otherwise we get an "Failed to build krb5 wrapper at" message
on success.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11702

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 14f1a94b6fb3a55be1e60fe0d28740f04fd94b3f)
(cherry picked from commit c17b1f697c388bd2e0190c4a3574d951b8be483e)
2016-03-29 16:24:30 +02:00
Jeremy Allison
5bbf46e204 s3: smbclient: asn1_extract_blob() stops further asn1 processing by setting has_error.
Don't call asn1_has_error() after asn1_extract_blob() has been successful
otherwise we get an "Failed to build negTokenInit at offset" message
on success.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Jan  7 16:00:02 CET 2016 on sn-devel-144

(cherry picked from commit 8108f0d320013c560339723d8d70ab601350d0c4)
2016-03-29 16:24:30 +02:00
Volker Lendecke
9c89afd873 lib: Use asn1_current_ofs()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit b7f0e29fd2c30024d5a7da7aa6a1f0084612f9d2)
2016-03-29 16:24:30 +02:00
Volker Lendecke
2b11481b85 lib: Use asn1_extract_blob()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit a93946b2fee6d6fedb9830d1dec593fca15fefc8)
2016-03-29 16:24:29 +02:00
Volker Lendecke
274c9a4461 lib: Use asn1_set_error()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 8cfb6a313937964902940a7ebada7bacab7dbbb8)
2016-03-29 16:24:29 +02:00
Volker Lendecke
89d0afc13d lib: Use asn1_has_error()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 57a0bc9a9f3a02f809153dc19537110c4c796338)
2016-03-29 16:24:29 +02:00
Jeremy Allison
c68280d930 CVE-2015-7560: s3: torture3: Add new POSIX-SYMLINK-EA test.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-02-24 11:40:03 +01:00
Jeremy Allison
ceb6dcc5df CVE-2015-7560: s3: torture3: Add new POSIX-SYMLINK-ACL test.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-02-24 11:40:03 +01:00
Jeremy Allison
444ba8f420 CVE-2015-7560: s3: libsmb: Add SMB1-only POSIX cli_posix_setacl() functions. Needed for tests.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-02-24 11:40:03 +01:00
Jeremy Allison
25963b1be1 CVE-2015-7560: s3: libsmb: Rename cli_posix_getfaclXX() functions to cli_posix_getacl() as they operate on pathnames.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-02-24 11:40:02 +01:00
Jeremy Allison
63ae57f412 CVE-2015-7560: s3: smbd: Refuse to set EA's on a symlink.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-02-24 11:40:02 +01:00
Jeremy Allison
062876f6dd CVE-2015-7560: s3: smbd: Silently return no EA's available on a symlink.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-02-24 11:40:01 +01:00
Jeremy Allison
e27f9a4194 CVE-2015-7560: s3: smbd: Set return values early, allows removal of code duplication.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-02-24 11:40:01 +01:00
Jeremy Allison
2907193961 CVE-2015-7560: s3: smbd: Refuse to get a POSIX ACL on a symlink.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-02-24 11:40:01 +01:00
Jeremy Allison
0be03f1b14 CVE-2015-7560: s3: smbd: Refuse to set a POSIX ACL on a symlink.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-02-24 11:40:00 +01:00
Jeremy Allison
774e210f89 CVE-2015-7560: s3: smbd: Refuse to set an ACL from a POSIX file handle on a symlink.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-02-24 11:40:00 +01:00
Jeremy Allison
fa1c482083 CVE-2015-7560: s3: smbd: Refuse to get an ACL from a POSIX file handle on a symlink.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-02-24 11:39:59 +01:00
Jeremy Allison
76f6cf5bbf CVE-2015-7560: s3: smbd: Add refuse_symlink() function that can be used to prevent operations on a symlink.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-02-24 11:39:59 +01:00
Hemanth Thummala
11b89bdc25 loadparm: Fix memory leak issue.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11708

Signed-off-by: Hemanth Thummala <hemanth.thummala@nutanix.com>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Feb  4 12:39:14 CET 2016 on sn-devel-144

(cherry picked from commit 8247d93701ed838190fe74044a63a56d63d37bf5)
2016-02-15 11:24:24 +01:00
Jeremy Allison
4526ba628e s3: smbd: posix_acls: Fix check for setting u:g:o entry on a filesystem with no ACL support.
Since 4.0.x we add 2 additional ACE entries, one SMB_ACL_USER
and SMB_ACL_GROUP to match the existing SMB_ACL_USER_OBJ and
SMB_ACL_GROUP_OBJ entries. The two additional entries break
the simple "must have 3 entries" check done inside convert_canon_ace_to_posix_perms().
Replace this with a more complete test.

Problem and initial fix provided by <tcleamy@ucdavis.edu>

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10489

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>

Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Thu Feb 11 11:14:53 CET 2016 on sn-devel-144

(cherry picked from commit 5172bf0c5b0672c1479c2ad776460956aa469bca)
2016-02-15 11:24:24 +01:00
Jose A. Rivera
ebb7d6602b s3:smbd:open: Skip redundant call to file_set_dosmode when creating a new file.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11727

Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Pair-programmed-with: Ira Cooper <ira@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Feb  5 04:37:43 CET 2016 on sn-devel-144

(cherry picked from commit aec07b8b60ff9589a3c84eef6adeca464e6c01f6)
2016-02-15 11:24:23 +01:00
Jeremy Allison
3e600d6113 s3: smbd: Fix timestamp rounding inside SMB2 create.
Setting "dos filetime resolution = yes" should round
to 2 second increments. Fix missing path inside smbd.

Fix confirmed by reporter Hubert Gilch <hg@sepag.de>.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11703

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Jan 29 10:41:01 CET 2016 on sn-devel-144

(cherry picked from commit 8024f532e6bcb6cbd8179817fafdd0f12929d629)

Autobuild-User(v4-3-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-3-test): Tue Feb  2 15:33:08 CET 2016 on sn-devel-104
2016-02-02 15:33:08 +01:00
Uri Simchoni
830f003c86 smbd: show correct disk size for different quota and dfree block sizes
When file system stats (VFS disk_free_fn) and quota (VFS get_quota_fn)
return different block sizes, normalize values before comparing.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11681

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 67c89715d00abc588239d8220f09cf51a58db05a)
2016-02-02 12:07:23 +01:00
Christian Ambach
67db3036a0 s3:utils/smbget fix recursive download
get_auth_data is called multiple times (once for the directory listing and then
for every file to be downloaded). Save the obtained values across multiple calls
to make smbclient use the correct username for each download.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=6482
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit ec802d27ce4dc6dd9b5e5ebd6992f90364d855a2)
2016-02-02 12:07:23 +01:00
Andreas Schneider
155d821b7b waf: Only build smb_krb5_wrapper if we have CUPS
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 192f1516c378ae942d14921bfcc1e11173da36e6)
2016-02-02 12:07:22 +01:00
Andreas Schneider
2b218c3b97 s3-client: Add a KRB5 wrapper for smbspool
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11690

We need a wrapper for smbspool to be able to authenticate with Kerberos.
This needs to replace the cups smb backend. The permission need to be
0700 and the owner root.

Note that Kerberos support is broken in CUPS 2.1.2 maybe earlier
versions. It works with 1.6.3.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Jan 25 19:58:46 CET 2016 on sn-devel-144

(cherry picked from commit 62c68bd8c8f7a7e057e38a461707f1c195e62df0)
2016-02-02 12:07:22 +01:00
Alexander Bokovoy
756b4525d7 s3-parm: clean up defaults when removing global parameters
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11693

When globals are re-initialized, they are cleared and globals' talloc
context is freed. However, parm_table still contains a reference to the
global value in the defaults. This confuses lpcfg_string_free() after
commit 795c543d858b2452f062a02846c2f908fe4cffe4 because it tries to
free already freed pointer which is passed by lp_save_defaults():

....
    case P_STRING:
    case P_USTRING:
                  lpcfg_string_set(Globals.ctx,
                                   &parm_table[i].def.svalue,
                                   *(char **)lp_parm_ptr(NULL, &parm_table[i]));
....

here &parm_table[i].def.svalue is passed to lpcfg_string_free() but it
is a pointer to a value allocated with previous Globals.ctx which
already was freed.

This specifically affects registry backend of smb.conf in lp_load_ex()
where init_globals() called explicitly to re-init globals after
lp_save_defaults() if we have registry backend defined.

Reviewed-by: Uri Simchoni <uri@samba.org>
Signed-off-by: Alexander Bokovoy <ab@samba.org>

Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Mon Jan 25 23:58:42 CET 2016 on sn-devel-144

(cherry picked from commit 500bc01478881cab89f0e691427e34a405bb0003)

Autobuild-User(v4-3-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-3-test): Tue Jan 26 12:58:53 CET 2016 on sn-devel-104
2016-01-26 12:58:52 +01:00