samba.git
6 years agos4:auth: Add FALL_THROUGH statements in gensec_krb5.c
Andreas Schneider [Wed, 26 Jul 2017 15:33:12 +0000 (17:33 +0200)]
s4:auth: Add FALL_THROUGH statements in gensec_krb5.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos4:auth: Add FALL_THROUGH statements in auth_sam.c
Andreas Schneider [Wed, 26 Jul 2017 15:30:53 +0000 (17:30 +0200)]
s4:auth: Add FALL_THROUGH statements in auth_sam.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos4:auth: Add FALL_THROUGH statements in auth_util.c
Andreas Schneider [Wed, 26 Jul 2017 15:29:55 +0000 (17:29 +0200)]
s4:auth: Add FALL_THROUGH statements in auth_util.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos4:samdb: Add FALL_THROUGH statements in linked_attributes.c
Andreas Schneider [Wed, 26 Jul 2017 15:28:11 +0000 (17:28 +0200)]
s4:samdb: Add FALL_THROUGH statements in linked_attributes.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos4:samdb: Add FALL_THROUGH statements in cracknames.c
Andreas Schneider [Wed, 26 Jul 2017 15:21:02 +0000 (17:21 +0200)]
s4:samdb: Add FALL_THROUGH statements in cracknames.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:rpc_server: Add FALL_THROUGH statements in rpc_server.c
Andreas Schneider [Wed, 26 Jul 2017 15:42:46 +0000 (17:42 +0200)]
s3:rpc_server: Add FALL_THROUGH statements in rpc_server.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:utils: Add FALL_THROUGH statements in net_rpc_conf.c
Andreas Schneider [Wed, 26 Jul 2017 15:58:40 +0000 (17:58 +0200)]
s3:utils: Add FALL_THROUGH statements in net_rpc_conf.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:utils: Add FALL_THROUGH statements in net_conf.c
Andreas Schneider [Wed, 26 Jul 2017 15:57:10 +0000 (17:57 +0200)]
s3:utils: Add FALL_THROUGH statements in net_conf.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:utils: Add FALL_THROUGH statements in regedit.c
Andreas Schneider [Wed, 26 Jul 2017 15:55:35 +0000 (17:55 +0200)]
s3:utils: Add FALL_THROUGH statements in regedit.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:smbd: Add FALL_THROUGH statements in trans2.c
Andreas Schneider [Wed, 26 Jul 2017 15:52:06 +0000 (17:52 +0200)]
s3:smbd: Add FALL_THROUGH statements in trans2.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:smbd: Add FALL_THROUGH statements in nttrans.c
Andreas Schneider [Wed, 26 Jul 2017 15:50:18 +0000 (17:50 +0200)]
s3:smbd: Add FALL_THROUGH statements in nttrans.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:modules: Add FALL_THROUGH statements in vfs_acl_common.c
Andreas Schneider [Wed, 26 Jul 2017 15:53:45 +0000 (17:53 +0200)]
s3:modules: Add FALL_THROUGH statements in vfs_acl_common.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:libsmb: Add FALL_THROUGH statements in dsgetdcname.c
Andreas Schneider [Wed, 26 Jul 2017 15:36:50 +0000 (17:36 +0200)]
s3:libsmb: Add FALL_THROUGH statements in dsgetdcname.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:lib: Add FALL_THROUGH statements in util_sd.c
Andreas Schneider [Wed, 26 Jul 2017 15:54:48 +0000 (17:54 +0200)]
s3:lib: Add FALL_THROUGH statements in util_sd.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:lib: Add FALL_THROUGH statements in sysacls.c
Andreas Schneider [Wed, 26 Jul 2017 15:51:08 +0000 (17:51 +0200)]
s3:lib: Add FALL_THROUGH statements in sysacls.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:lib: Add FALL_THROUGH statements in cbuf.c
Andreas Schneider [Wed, 26 Jul 2017 15:25:30 +0000 (17:25 +0200)]
s3:lib: Add FALL_THROUGH statements in cbuf.c

6 years agos3:auth: Add FALL_THROUGH statements in pampass.c
Andreas Schneider [Thu, 27 Jul 2017 14:55:23 +0000 (16:55 +0200)]
s3:auth: Add FALL_THROUGH statements in pampass.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:auth: Add FALL_THROUGH statements in auth_sam.c
Andreas Schneider [Wed, 26 Jul 2017 15:35:28 +0000 (17:35 +0200)]
s3:auth: Add FALL_THROUGH statements in auth_sam.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolibrpc:ndr: Add FALL_THROUGH statements in ndr_cab.c
Andreas Schneider [Wed, 26 Jul 2017 15:03:09 +0000 (17:03 +0200)]
librpc:ndr: Add FALL_THROUGH statements in ndr_cab.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolibgpo: Add FALL_THROUGH statements in gpo_sec.c
Andreas Schneider [Wed, 26 Jul 2017 15:43:53 +0000 (17:43 +0200)]
libgpo: Add FALL_THROUGH statements in gpo_sec.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolib:tdb: Add FALL_THROUGH statements in common/summary.c
Andreas Schneider [Wed, 26 Jul 2017 16:28:12 +0000 (18:28 +0200)]
lib:tdb: Add FALL_THROUGH statements in common/summary.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolib:tdb: Add FALL_THROUGH statements in tdbtool.c
Andreas Schneider [Wed, 26 Jul 2017 14:58:00 +0000 (16:58 +0200)]
lib:tdb: Add FALL_THROUGH statements in tdbtool.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolib:tdb: Add FALL_THROUGH statements in hash.c
Andreas Schneider [Wed, 26 Jul 2017 14:55:10 +0000 (16:55 +0200)]
lib:tdb: Add FALL_THROUGH statements in hash.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:lib: Add FALL_THROUGH statements in util_str.c
Andreas Schneider [Wed, 26 Jul 2017 15:25:20 +0000 (17:25 +0200)]
s3:lib: Add FALL_THROUGH statements in util_str.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:lib: Add FALL_THROUGH statements in util_path.c
Andreas Schneider [Thu, 27 Jul 2017 14:57:38 +0000 (16:57 +0200)]
s3:lib: Add FALL_THROUGH statements in util_path.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:lib: Add FALL_THROUGH statements in substitute_generic.c
Andreas Schneider [Wed, 26 Jul 2017 15:22:44 +0000 (17:22 +0200)]
s3:lib: Add FALL_THROUGH statements in substitute_generic.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolib:util: Add FALL_THROUGH statements in util_file.c
Andreas Schneider [Wed, 26 Jul 2017 16:41:25 +0000 (18:41 +0200)]
lib:util: Add FALL_THROUGH statements in util_file.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolib:util: Add FALL_THROUGH statements in charset/charset_macosxfs.c
Andreas Schneider [Wed, 26 Jul 2017 16:40:14 +0000 (18:40 +0200)]
lib:util: Add FALL_THROUGH statements in charset/charset_macosxfs.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolib:util: Add FALL_THROUGH statements in substitute.c
Andreas Schneider [Wed, 26 Jul 2017 14:49:50 +0000 (16:49 +0200)]
lib:util: Add FALL_THROUGH statements in substitute.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolib:param: Add FALL_THROUGH statements in loadparm.c
Andreas Schneider [Thu, 27 Jul 2017 13:20:57 +0000 (15:20 +0200)]
lib:param: Add FALL_THROUGH statements in loadparm.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolib:ldb: Add FALL_THROUGH statements in ldb_map/ldb_map_outbound.c
Andreas Schneider [Thu, 27 Jul 2017 13:20:04 +0000 (15:20 +0200)]
lib:ldb: Add FALL_THROUGH statements in ldb_map/ldb_map_outbound.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolib:ldb: Add FALL_THROUGH statements in ldb_map/ldb_map.c
Andreas Schneider [Thu, 27 Jul 2017 13:19:23 +0000 (15:19 +0200)]
lib:ldb: Add FALL_THROUGH statements in ldb_map/ldb_map.c

6 years agolib:ldb: Add FALL_THROUGH statements in ldb_map/ldb_map_inbound.c
Andreas Schneider [Thu, 27 Jul 2017 13:18:28 +0000 (15:18 +0200)]
lib:ldb: Add FALL_THROUGH statements in ldb_map/ldb_map_inbound.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolib:ldb: Add FALL_THROUGH statements in common/ldb_dn.c
Andreas Schneider [Thu, 27 Jul 2017 13:17:21 +0000 (15:17 +0200)]
lib:ldb: Add FALL_THROUGH statements in common/ldb_dn.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolib:replace: Add FALL_THROUGH statements in strptime.c
Andreas Schneider [Wed, 26 Jul 2017 16:25:46 +0000 (18:25 +0200)]
lib:replace: Add FALL_THROUGH statements in strptime.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolib:replace: Add FALL_THROUGH support
Andreas Schneider [Wed, 26 Jul 2017 14:33:10 +0000 (16:33 +0200)]
lib:replace: Add FALL_THROUGH support

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolib:texpect: Avoid some compiler warnings
Andreas Schneider [Wed, 26 Jul 2017 14:51:39 +0000 (16:51 +0200)]
lib:texpect: Avoid some compiler warnings

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos4:lib:com: Fix function declartions
Andreas Schneider [Wed, 26 Jul 2017 16:16:43 +0000 (18:16 +0200)]
s4:lib:com: Fix function declartions

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopy3compat: add strings describing bytes/unicode in both versions
Douglas Bagnall [Wed, 28 Feb 2018 02:59:06 +0000 (15:59 +1300)]
py3compat: add strings describing bytes/unicode in both versions

What Python 3 calls "bytes", Python 2 calls "string";
What Python 3 calls "string", Python 2 calls "unicode".

This can cause confusion in e.g. help strings where the precise type
matters. These macros can be used to construct accurate messages for
both versions.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Thu Mar  1 04:36:15 CET 2018 on sn-devel-144

6 years agodsdb python tests: convert 'except X, (tuple)' to 'except X as e'
Noel Power [Fri, 23 Feb 2018 14:34:23 +0000 (14:34 +0000)]
dsdb python tests: convert 'except X, (tuple)' to 'except X as e'

In addition to converting the except line another line is also added
for each except to extract the tuple contents.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agodrs torture python: convert 'except X, (tuple)' to 'except X as e'
Noel Power [Fri, 23 Feb 2018 14:35:40 +0000 (14:35 +0000)]
drs torture python: convert 'except X, (tuple)' to 'except X as e'

In addition to converting the except line another line is also added
for each except to extract the tuple contents.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosamba python tests: convert 'except X, (tuple)' to 'except X as e'
Noel Power [Fri, 23 Feb 2018 14:32:17 +0000 (14:32 +0000)]
samba python tests: convert 'except X, (tuple)' to 'except X as e'

In addition to converting the except line another line is also added
for each except to extract the tuple contents.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosamba-tool: convert 'except X, (tuple)' to 'except X as e'
Noel Power [Fri, 23 Feb 2018 14:31:38 +0000 (14:31 +0000)]
samba-tool: convert 'except X, (tuple)' to 'except X as e'

In addition to converting the except line another line is also added
for each except to extract the tuple contents.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosamba python libs: convert 'except X, (tuple)' to 'except X as e'
Noel Power [Fri, 23 Feb 2018 14:29:05 +0000 (14:29 +0000)]
samba python libs: convert 'except X, (tuple)' to 'except X as e'

In addition to converting the except line another line is also added
for each except to extract the tuple contents.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopython tests: convert oct 'O1234' format to python3 compatible '0o1234'
Noel Power [Fri, 23 Feb 2018 13:09:24 +0000 (13:09 +0000)]
python tests: convert oct 'O1234' format to python3 compatible '0o1234'

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosamba python libs: convert 'O1234' format to python3 compatible '0o1234'
Noel Power [Fri, 23 Feb 2018 13:07:55 +0000 (13:07 +0000)]
samba python libs: convert 'O1234' format to python3 compatible '0o1234'

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosamba-tool: convert octal 'O1234' format to python3 compatible '0o1234'
Noel Power [Fri, 23 Feb 2018 13:03:28 +0000 (13:03 +0000)]
samba-tool: convert octal 'O1234' format to python3 compatible '0o1234'

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos4:kdc: disable support for CROSS_ORGANIZATION domains
Stefan Metzmacher [Thu, 1 Feb 2018 10:06:10 +0000 (11:06 +0100)]
s4:kdc: disable support for CROSS_ORGANIZATION domains

We don't support selective authentication yet,
so we shouldn't silently allow domain wide authentication
for such a trust.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Feb 28 19:45:13 CET 2018 on sn-devel-144

6 years agos4:kdc: only support LSA_TRUST_TYPE_UPLEVEL domains in samba_kdc_trust_message2entry()
Stefan Metzmacher [Thu, 1 Feb 2018 10:10:14 +0000 (11:10 +0100)]
s4:kdc: only support LSA_TRUST_TYPE_UPLEVEL domains in samba_kdc_trust_message2entry()

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agos4:kdc: make use of dsdb_trust_parse_tdo_info() in samba_kdc_trust_message2entry()
Stefan Metzmacher [Thu, 1 Feb 2018 10:10:14 +0000 (11:10 +0100)]
s4:kdc: make use of dsdb_trust_parse_tdo_info() in samba_kdc_trust_message2entry()

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agowinbindd: disable support for CROSS_ORGANIZATION domains
Stefan Metzmacher [Thu, 1 Feb 2018 10:06:10 +0000 (11:06 +0100)]
winbindd: disable support for CROSS_ORGANIZATION domains

We don't support selective authentication yet,
so we shouldn't silently allow domain wide authentication
for such a trust.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agoldb: version 1.3.2 ldb-1.3.2
Stefan Metzmacher [Tue, 27 Feb 2018 09:44:44 +0000 (10:44 +0100)]
ldb: version 1.3.2

* Expose the SHOW_BINARY, ENABLE_TRACING and DONT_CREATE_DB flag constants
  in the python api.
* Extend dn.is_child_of() test.
* Don't load LDB_MODULESDIR as a module file.
* Fix binary data in debug log (bug #13185).

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Feb 28 04:54:21 CET 2018 on sn-devel-144

6 years agosamba-tool: user setexpiry: Fix incorrect Example2
Rowland Penny [Tue, 27 Feb 2018 13:30:37 +0000 (13:30 +0000)]
samba-tool: user setexpiry: Fix incorrect Example2

Signed-off-by: Rowland Penny <rpenny@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Feb 27 20:31:39 CET 2018 on sn-devel-144

6 years agonbt_server: Factor out packet generation for netlogon reply
Volker Lendecke [Sat, 17 Feb 2018 20:02:41 +0000 (21:02 +0100)]
nbt_server: Factor out packet generation for netlogon reply

This also fixes an inaccuracy (or even a bug?):
The previous code pulled the reply mailslot always through
req.logon.mailslot_name, which is the union for
LOGON_SAM_LOGON_REQUESTs. The LOGON_PRIMARY_QUERY must be referenced by
req.pdc.mailslot_name. It might have worked by chance, but this should
be more correct.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Feb 27 14:10:14 CET 2018 on sn-devel-144

6 years agonbt_server: nbtd_netlogon_getdc doesn't need "src"
Volker Lendecke [Sat, 17 Feb 2018 19:09:03 +0000 (20:09 +0100)]
nbt_server: nbtd_netlogon_getdc doesn't need "src"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agonbt_server: Avoid a talloc call
Volker Lendecke [Sat, 17 Feb 2018 19:06:36 +0000 (20:06 +0100)]
nbt_server: Avoid a talloc call

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agonbt_server: Avoid an "else" branch
Volker Lendecke [Sat, 17 Feb 2018 19:04:23 +0000 (20:04 +0100)]
nbt_server: Avoid an "else" branch

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agonbt_server: nbtd_netlogon_samlogon needs the dst_name, not the packet
Volker Lendecke [Sat, 17 Feb 2018 16:33:32 +0000 (17:33 +0100)]
nbt_server: nbtd_netlogon_samlogon needs the dst_name, not the packet

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agonbt_server: nbtd_netlogon_getdc needs just the dst_name
Volker Lendecke [Sat, 17 Feb 2018 16:25:03 +0000 (17:25 +0100)]
nbt_server: nbtd_netlogon_getdc needs just the dst_name

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agonbt_server: Fix a typo ("domian->domain")
Volker Lendecke [Sat, 17 Feb 2018 16:22:11 +0000 (17:22 +0100)]
nbt_server: Fix a typo ("domian->domain")

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agonbt_server: nbtd_netlogon_samlogon needs the nbtsrv, not the inteface
Volker Lendecke [Sat, 17 Feb 2018 16:18:29 +0000 (17:18 +0100)]
nbt_server: nbtd_netlogon_samlogon needs the nbtsrv, not the inteface

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agonbt_server: nbtd_netlogon_getdc needs the nbtsrv, not the interface
Volker Lendecke [Sat, 17 Feb 2018 16:16:07 +0000 (17:16 +0100)]
nbt_server: nbtd_netlogon_getdc needs the nbtsrv, not the interface

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agonbt_server: Centralize a consistency check
Volker Lendecke [Sat, 17 Feb 2018 16:11:41 +0000 (17:11 +0100)]
nbt_server: Centralize a consistency check

This is a "should NEVER happen" and applies to both
LOGON_PRIMARY_QUERY and LOGON_SAM_LOGON_REQUEST

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agonbt_server: Make nbtd_mailslot_netlogon_handler a bit more idiomatic
Volker Lendecke [Sat, 17 Feb 2018 16:09:31 +0000 (17:09 +0100)]
nbt_server: Make nbtd_mailslot_netlogon_handler a bit more idiomatic

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agonbt_server: Factor out dgram sending from reply construction
Volker Lendecke [Sat, 17 Feb 2018 16:05:09 +0000 (17:05 +0100)]
nbt_server: Factor out dgram sending from reply construction

Separation of concerns. Only one call to dgram_mailslot_netlogon_reply, which
does the UDP send.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agonbt_server: Remove a pointless assignment
Volker Lendecke [Sat, 17 Feb 2018 15:49:00 +0000 (16:49 +0100)]
nbt_server: Remove a pointless assignment

I don't see how data.msg.dest_name.type is accessed further down

dgram_mailslot_netlogon_reply only accesses packet->src_addr, packet->src_port
and packet->data.msg.source_name, *not* data.msg.dest_name. Also, "packet" is
thrown away after this call.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agonbt_server: Remove some unused parameters
Volker Lendecke [Fri, 16 Feb 2018 19:21:17 +0000 (20:21 +0100)]
nbt_server: Remove some unused parameters

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agolibdgram: Remove an unused parameter
Volker Lendecke [Sat, 17 Feb 2018 19:45:22 +0000 (20:45 +0100)]
libdgram: Remove an unused parameter

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agolibdgram: Remove an unused parameter
Volker Lendecke [Sat, 17 Feb 2018 19:42:19 +0000 (20:42 +0100)]
libdgram: Remove an unused parameter

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agolibsocket: Add "mem_ctx" to socket_create()
Volker Lendecke [Thu, 15 Feb 2018 15:43:59 +0000 (16:43 +0100)]
libsocket: Add "mem_ctx" to socket_create()

Every caller did a talloc_steal() after socket_create(). Just pass in the
correct memory context.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agoreplace: Only warn if rpc/rpc.h haven't been found
Andreas Schneider [Mon, 26 Feb 2018 13:07:28 +0000 (14:07 +0100)]
replace: Only warn if rpc/rpc.h haven't been found

This is also used by talloc, tevent, etc. Those libs don't need or use
rpc.h

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Feb 27 03:23:37 CET 2018 on sn-devel-144

6 years agowinbindd: Remove "DUMP_EVENT_LIST" message
Volker Lendecke [Mon, 26 Feb 2018 10:04:31 +0000 (11:04 +0100)]
winbindd: Remove "DUMP_EVENT_LIST" message

This was no longer implemented, remove it completely

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agovfs_glusterfs: Fix the wrong pointer being sent in glfs_fsync_async
Poornima G [Thu, 22 Feb 2018 10:51:35 +0000 (16:21 +0530)]
vfs_glusterfs: Fix the wrong pointer being sent in glfs_fsync_async

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

Pair-Programmed-With: Anoop C S <anoopcs@redhat.com>
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Mon Feb 26 20:17:50 CET 2018 on sn-devel-144

6 years agoldb_debug tests: Fix binary data in debug log
Gary Lockyer [Fri, 23 Feb 2018 02:04:36 +0000 (15:04 +1300)]
ldb_debug tests: Fix binary data in debug log

Tests to ensure:
    When duplicate objects are added, the GUID was printed in the debug log
    are passed through the escape function.
    And that duplicate DN's do not generate debug log entries.

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

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Feb 26 07:29:49 CET 2018 on sn-devel-144

6 years agoldb_debug: Fix binary data in debug log
Andrew Bartlett [Mon, 26 Feb 2018 01:31:24 +0000 (14:31 +1300)]
ldb_debug: Fix binary data in debug log

When duplicate objects were added, the GUID was printed in the debug log
The GUID was not escaped and therefore displayed as binary content.

This patch splits out the duplicate DN creation error and the duplicate
GIUD error.  Duplicate DN's are a normal event and don't require debug
logging.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
6 years agoMinor cleanup to libnet_join_member
Swen Schillig [Thu, 25 Jan 2018 10:18:50 +0000 (11:18 +0100)]
Minor cleanup to libnet_join_member

Prevent code duplication by consolidating cleanup task
at the end of the function.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Feb 24 23:19:05 CET 2018 on sn-devel-144

6 years agotests/blackbox/smbcontrol: ping tests names ping target upon failure
Douglas Bagnall [Thu, 22 Feb 2018 01:20:51 +0000 (14:20 +1300)]
tests/blackbox/smbcontrol: ping tests names ping target upon failure

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agotext/python/blackbox: allow optional message in ProcessError
Douglas Bagnall [Thu, 22 Feb 2018 01:19:11 +0000 (14:19 +1300)]
text/python/blackbox: allow optional message in ProcessError

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agoldb tests: fix null test on incorrect variable
Gary Lockyer [Fri, 23 Feb 2018 02:03:20 +0000 (15:03 +1300)]
ldb tests: fix null test on incorrect variable

Fix up tests that were  performing a null check on the wrong variable
after a call to ldb_msg_new

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat Feb 24 15:50:35 CET 2018 on sn-devel-144

6 years agos4:lib:com: Fix function declartions
Andreas Schneider [Wed, 26 Jul 2017 16:16:43 +0000 (18:16 +0200)]
s4:lib:com: Fix function declartions

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:selftest: Run the smbtorture3 TLDAP test
Andreas Schneider [Thu, 21 Dec 2017 16:24:01 +0000 (17:24 +0100)]
s3:selftest: Run the smbtorture3 TLDAP test

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agorepl_md: avoid returning LDB_SUCCESS on failure
Douglas Bagnall [Wed, 14 Feb 2018 04:15:07 +0000 (17:15 +1300)]
repl_md: avoid returning LDB_SUCCESS on failure

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agotests: Authenticate again so make sure we are not locked out
Andreas Schneider [Thu, 22 Feb 2018 16:30:36 +0000 (17:30 +0100)]
tests: Authenticate again so make sure we are not locked out

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoselftest: Fail testsuite on unknown environment
Jamie McClymont [Tue, 13 Feb 2018 03:58:26 +0000 (16:58 +1300)]
selftest: Fail testsuite on unknown environment

The status quo was that tests in typo'd/unknown environments would be skipped.
This was a side effect of the mechanism by which samba3 tests were run, which
has now been changed.

For an example of this being a problem in the past, see commit 523bd03f (which
fixes an issue I noticed when reading subunit logs, and which did not fail the
test).

Signed-off-by: Jamie McClymont <jamiemcclymont@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 years agos3: smbd: Fix possible directory fd leak if the underlying OS doesn't support fdopendir()
Jeremy Allison [Wed, 14 Feb 2018 21:23:12 +0000 (13:23 -0800)]
s3: smbd: Fix possible directory fd leak if the underlying OS doesn't support fdopendir()

HPUX has this problem.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Feb 23 22:56:35 CET 2018 on sn-devel-144

6 years agowinbind: don't try to do an authenticated SMB connection as AD DC
Stefan Metzmacher [Thu, 22 Feb 2018 09:19:58 +0000 (10:19 +0100)]
winbind: don't try to do an authenticated SMB connection as AD DC

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Feb 23 17:58:23 CET 2018 on sn-devel-144

6 years agowinbind: set_dc_type_and_flags() is not needed on a DC
Stefan Metzmacher [Thu, 22 Feb 2018 10:24:38 +0000 (11:24 +0100)]
winbind: set_dc_type_and_flags() is not needed on a DC

On a DC we load the trusts in the parent in add_trusted_domains_dc()
from our local configuration. There's no need to find out the trust details
via network calls.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agowinbind: make sure we don't contact trusted domains via LDAP as AD DC
Stefan Metzmacher [Fri, 2 Feb 2018 15:55:01 +0000 (16:55 +0100)]
winbind: make sure we don't contact trusted domains via LDAP as AD DC

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agowinbind: make sure we don't contact trusted domains via SAMR as AD DC
Stefan Metzmacher [Thu, 22 Feb 2018 09:33:48 +0000 (10:33 +0100)]
winbind: make sure we don't contact trusted domains via SAMR as AD DC

This is not needed for the normal operation of an AD DC.

Administrators should just use other tools instead of
wbinfo to list and query users and groups.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agowinbind: let cm_connect_netlogon_transport() only work against direct trust as AD DC
Stefan Metzmacher [Thu, 22 Feb 2018 09:40:19 +0000 (10:40 +0100)]
winbind: let cm_connect_netlogon_transport() only work against direct trust as AD DC

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agowinbind: force the usage of schannel in cm_connect_lsa() as AD DC
Stefan Metzmacher [Thu, 22 Feb 2018 09:40:19 +0000 (10:40 +0100)]
winbind: force the usage of schannel in cm_connect_lsa() as AD DC

This makes sure we only talk to direct trusts.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agos3:smb_macros.h: add IS_AD_DC as addition to IS_DC
Stefan Metzmacher [Thu, 22 Feb 2018 09:03:23 +0000 (10:03 +0100)]
s3:smb_macros.h: add IS_AD_DC as addition to IS_DC

In the long run we should remove this again (as well as IS_DC).

But for now this makes some code changes in winbindd easier to
follow.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agodsdb/encrypted_secrets: remove dependency to libnettle and use our own aes_gcm_128_*()
Stefan Metzmacher [Thu, 22 Feb 2018 14:56:45 +0000 (15:56 +0100)]
dsdb/encrypted_secrets: remove dependency to libnettle and use our own aes_gcm_128_*()

We already rely on gnutls in order to implement SSL/TLS, so using that
to speed up crypto like aes gcm 128 is fine, but as we already have
code for that algorithm, we should use that instead of adding a new
dependency to libnettle.

Some (I guess newer versions) of gnutls use nettle internally, so
we may end up using that code, but we should not have a direct dependency.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agovfs_fruit: use off_t, not size_t for TM size calculations
Ralph Boehme [Thu, 22 Feb 2018 14:52:46 +0000 (15:52 +0100)]
vfs_fruit: use off_t, not size_t for TM size calculations

size_t is only a 32-bit integer on 32-bit platforms. We must use off_t
for file sizes.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agowinbind: Use one queue for all domain children
Stefan Metzmacher [Wed, 14 Feb 2018 14:04:01 +0000 (15:04 +0100)]
winbind: Use one queue for all domain children

If we have multiple domain children, it's important
that the first idle child takes over the next waiting request.

Before we had the problem that a request could get stuck in the
queue of a busy child, while later requests could get served fine by
other children.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Feb 23 09:04:23 CET 2018 on sn-devel-144

6 years agowinbind: Maintain a binding handle per domain and always go via wb_domain_request_send()
Volker Lendecke [Tue, 13 Feb 2018 15:04:44 +0000 (16:04 +0100)]
winbind: Maintain a binding handle per domain and always go via wb_domain_request_send()

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Volker Lendecke <vl@samba.org>
6 years agowinbind: make choose_domain_child() static
Stefan Metzmacher [Tue, 20 Feb 2018 13:43:38 +0000 (14:43 +0100)]
winbind: make choose_domain_child() static

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 years agowinbind: add locator_child_handle() and use it instead of child->binding_handle
Stefan Metzmacher [Wed, 14 Feb 2018 12:24:54 +0000 (13:24 +0100)]
winbind: add locator_child_handle() and use it instead of child->binding_handle

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 years agowinbind: add idmap_child_handle() and use it instead of child->binding_handle
Stefan Metzmacher [Wed, 14 Feb 2018 12:24:54 +0000 (13:24 +0100)]
winbind: add idmap_child_handle() and use it instead of child->binding_handle

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 years agowinbind: improve wb_domain_request_send() to use wb_dsgetdcname_send() for a foreign...
Stefan Metzmacher [Wed, 14 Feb 2018 14:11:50 +0000 (15:11 +0100)]
winbind: improve wb_domain_request_send() to use wb_dsgetdcname_send() for a foreign domain

Commit ed3bc614cccec6167c64ac58d78344b6426cd019 got the logic wrong while
trying to implement the logic we had in init_child_connection(),
which was removed by commit d61f3626b79e0523beadff355453145aa7b0195c.

Instead of doing a WINBINDD_GETDCNAME request (which would caused an error
because the implementation was removed in commit
958fdaf5c3ba17969a5110e6b2b08babb9096d7e), we sent the callers request
and interpreted the result as WINBINDD_GETDCNAME response, which
led to an empty dcname variable. As result the domain child
opened a connection to the primary domain in order to lookup
a dc.

If we want to connect the primary domain from the parent via
a domain child of the primary domain.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>