samba.git
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>
6 years agowinbind: use state->{ev,request} in wb_domain_request_send()
Stefan Metzmacher [Wed, 14 Feb 2018 14:09:51 +0000 (15:09 +0100)]
winbind: use state->{ev,request} in wb_domain_request_send()

This will reduce the diff for the following changes.

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>
6 years agowinbind: avoid using fstrcpy(dcname,...) in _dual_init_connection
Stefan Metzmacher [Thu, 15 Feb 2018 15:00:33 +0000 (16:00 +0100)]
winbind: avoid using fstrcpy(dcname,...) in _dual_init_connection

domain->dcname was converted from fstring to char * by commit
14bae61ba36814ea5eca7c51cf1cc039e9e6803f.

Luckily this was only ever called with an empty string in
state->request->data.init_conn.dcname.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
6 years agowinbind: cleanup winbindd_cli_state->pwent_state if winbindd_getpwent_recv() returns...
Stefan Metzmacher [Fri, 16 Feb 2018 15:13:16 +0000 (16:13 +0100)]
winbind: cleanup winbindd_cli_state->pwent_state if winbindd_getpwent_recv() returns an error

A client may skip the explicit endpwent() if getgrent() fails.

This allows client_is_idle() return true in more cases.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 years agowinbind: cleanup winbindd_cli_state->grent_state if winbindd_getgrent_recv() returns...
Stefan Metzmacher [Fri, 16 Feb 2018 15:13:16 +0000 (16:13 +0100)]
winbind: cleanup winbindd_cli_state->grent_state if winbindd_getgrent_recv() returns an error

A client may skip the explicit endgrent() if getgrent() fails.

This allows client_is_idle() return true in more cases.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 years agowinbind: call lp_winbind_enum_{users,groups}() already in set{pw,gr}ent()
Stefan Metzmacher [Fri, 16 Feb 2018 15:09:58 +0000 (16:09 +0100)]
winbind: call lp_winbind_enum_{users,groups}() already in set{pw,gr}ent()

This way we don't keep winbindd_cli_state->{pw,gr}ent_state arround forever,
if the client forgets an explicit end{pw,gr}ent().

This allows client_is_idle() return true in more cases.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 years agowinbind: protect a pending wb_child_request against a talloc_free()
Stefan Metzmacher [Fri, 16 Feb 2018 14:05:57 +0000 (15:05 +0100)]
winbind: protect a pending wb_child_request against a talloc_free()

If the (winbind) client gave up we call TALLOC_FREE(state->mem_ctx)
in remove_client(). This triggers a recursive talloc_free() for all
in flight requests.

In order to maintain the winbindd parent-child protocol, we need
to keep the orphaned wb_simple_trans request until the parent
got the response from the child.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 years agowinbind: use tevent_queue_wait_send/recv in wb_child_request_*()
Stefan Metzmacher [Fri, 16 Feb 2018 14:02:42 +0000 (15:02 +0100)]
winbind: use tevent_queue_wait_send/recv in wb_child_request_*()

We need a way to keep the child->queue blocked without relying on
the current 'req' (wb_child_request_state).

The next commit will make use of this.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 years agotevent: version 0.9.36 tevent-0.9.36
Stefan Metzmacher [Tue, 20 Feb 2018 12:54:49 +0000 (13:54 +0100)]
tevent: version 0.9.36

* improve documentation of tevent_queue_add_optimize_empty()
* add tevent_queue_entry_untrigger()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 years agotevent: add tevent_queue_entry_untrigger()
Stefan Metzmacher [Thu, 15 Feb 2018 13:47:25 +0000 (14:47 +0100)]
tevent: add tevent_queue_entry_untrigger()

Pair-Programmed-With: Volker Lendecke <vl@samba.org>

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Volker Lendecke <vl@samba.org>
6 years agotevent: improve documentation of tevent_queue_add_optimize_empty()
Stefan Metzmacher [Fri, 16 Feb 2018 15:47:57 +0000 (16:47 +0100)]
tevent: improve documentation of tevent_queue_add_optimize_empty()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 years agos4:auth_sam: allow logons with an empty domain name
Stefan Metzmacher [Tue, 9 Jan 2018 07:54:11 +0000 (08:54 +0100)]
s4:auth_sam: allow logons with an empty domain name

It turns out that an empty domain name maps to the local SAM.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Feb 23 04:08:26 CET 2018 on sn-devel-144

6 years agotests/bind.py: Add a bind test with NTLMSSP with no domain
Garming Sam [Mon, 8 Jan 2018 03:34:02 +0000 (16:34 +1300)]
tests/bind.py: Add a bind test with NTLMSSP with no domain

Confirmed to pass against Windows 2012 R2.

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

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agotests/py_creds: Add a SamLogonEx test with an empty string domain
Garming Sam [Mon, 8 Jan 2018 00:36:59 +0000 (13:36 +1300)]
tests/py_creds: Add a SamLogonEx test with an empty string domain

This test passes against 4.6, but failed against 4.7.5 and master.

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

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agos3:cliconnect.c: remove useless ';'
Stefan Metzmacher [Tue, 9 Jan 2018 07:57:05 +0000 (08:57 +0100)]
s3:cliconnect.c: remove useless ';'

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:libsmb: allow -U"\\administrator" to work
Stefan Metzmacher [Tue, 9 Jan 2018 07:55:48 +0000 (08:55 +0100)]
s3:libsmb: allow -U"\\administrator" to work

cli_credentials_get_principal() returns NULL in that case.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agobuild: fix libceph-common detection
Günther Deschner [Mon, 15 Jan 2018 22:20:39 +0000 (23:20 +0100)]
build: fix libceph-common detection

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

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Thu Feb 22 19:30:12 CET 2018 on sn-devel-144

6 years agoutil/rfc1738: update preamble
Douglas Bagnall [Mon, 19 Feb 2018 01:24:42 +0000 (14:24 +1300)]
util/rfc1738: update preamble

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 Feb 22 06:13:49 CET 2018 on sn-devel-144

6 years agoutil/rfc1738: simplify and fix rfc1738_escape_part()
Douglas Bagnall [Tue, 20 Feb 2018 10:56:11 +0000 (23:56 +1300)]
util/rfc1738: simplify and fix rfc1738_escape_part()

We now encode according to RFC 3986 (section 2.1 - 2.3).

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoutil/rfc1738: remove unused versions of rfc1738_escape
Douglas Bagnall [Fri, 16 Feb 2018 22:23:44 +0000 (11:23 +1300)]
util/rfc1738: remove unused versions of rfc1738_escape

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoutil/rfc1738: simplify and fix rfc1738_unescape()
Douglas Bagnall [Mon, 19 Feb 2018 01:12:03 +0000 (14:12 +1300)]
util/rfc1738: simplify and fix rfc1738_unescape()

Improvements:

* NULL is returned when the string is incorrectly formed.

* Badly formed escapes like "% b" that were accepted by sscanf() are now
  rejected.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoutil/tests: add rfc1738 cmocka tests
Douglas Bagnall [Sat, 17 Feb 2018 20:53:32 +0000 (09:53 +1300)]
util/tests: add rfc1738 cmocka tests

These don't pass yet.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoutil/rfc1738_unescape(): return end pointer or NULL on error
Douglas Bagnall [Fri, 16 Feb 2018 21:46:44 +0000 (10:46 +1300)]
util/rfc1738_unescape(): return end pointer or NULL on error

At present we don't detect errors, but when we do we'll return NULL.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoshift read_hex_bytes() and parse_guid_string() into lib/util
Douglas Bagnall [Fri, 16 Feb 2018 04:53:15 +0000 (17:53 +1300)]
shift read_hex_bytes() and parse_guid_string() into lib/util

read_hex_bytes() is going to be used in lib/util/rfc1738.c.

parse_guid_string() is shifted for two reasons: Firstly, it is called
very often in some operations, sometimes constituting a few percent of
the CPU load, and it makes several calls to read_hex_bytes(). We want
the compiler to be able to inline those calls if it thinks that is
wise. Secondly, there are other places that could do with fast GUID
parsing.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoselftest/tests.py: remove always-needed, never-set with_cmocka flag
Douglas Bagnall [Wed, 21 Feb 2018 22:54:45 +0000 (11:54 +1300)]
selftest/tests.py: remove always-needed, never-set with_cmocka flag

We have cmocka in third_party, so we are never without it.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agounittests.lib_util_modules: test module probe with "skel", not "unix"
Douglas Bagnall [Wed, 21 Feb 2018 22:26:00 +0000 (11:26 +1300)]
unittests.lib_util_modules: test module probe with "skel", not "unix"

The unix module is not available as a module on some systems.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoselftest: subunithelper needs to follow the subunit spec more closely
Douglas Bagnall [Wed, 21 Feb 2018 23:46:47 +0000 (12:46 +1300)]
selftest: subunithelper needs to follow the subunit spec more closely

In particular allow ]\n without \n]\n as used by cmocka

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos4:rpc_server: fix call_id truncation in dcesrv_find_fragmented_call()
Stefan Metzmacher [Tue, 20 Feb 2018 23:49:55 +0000 (00:49 +0100)]
s4:rpc_server: fix call_id truncation in dcesrv_find_fragmented_call()

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Feb 21 19:02:56 CET 2018 on sn-devel-144

6 years agotests:dcerpc/raw_protocol: reproduce call_id truncation bug
Stefan Metzmacher [Tue, 20 Feb 2018 23:50:26 +0000 (00:50 +0100)]
tests:dcerpc/raw_protocol: reproduce call_id truncation bug

We need to make sure the server handles call_id values > UINT16_MAX.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agoheimdal_build: use closefrom from libreplace
Bjoern Jacke [Wed, 21 Feb 2018 09:51:42 +0000 (01:51 -0800)]
heimdal_build: use closefrom from libreplace

this silences a lot of "... has been redefined" compiler warnings on
platforms that don't have closefrom

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>