]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
6 years agotorture4: Use generate_random_u64() instead of random()
Volker Lendecke [Tue, 10 Dec 2019 10:31:22 +0000 (11:31 +0100)] 
torture4: Use generate_random_u64() instead of random()

random() returns an int, which is not necessarily a uint64

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agolib:crypto: Build intel aes-ni only if GnuTLS doesn't provide AES CMAC
Andreas Schneider [Tue, 10 Dec 2019 17:06:29 +0000 (18:06 +0100)] 
lib:crypto: Build intel aes-ni only if GnuTLS doesn't provide AES CMAC

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Dec 10 20:30:57 UTC 2019 on sn-devel-184

6 years agolib:crypto: Only build AES code if we need AES CMAC
Andreas Schneider [Tue, 10 Dec 2019 17:03:57 +0000 (18:03 +0100)] 
lib:crypto: Only build AES code if we need AES CMAC

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolib:crypto: Remove our implementation of AES GCM
Andreas Schneider [Tue, 10 Dec 2019 17:01:43 +0000 (18:01 +0100)] 
lib:crypto: Remove our implementation of AES GCM

We require GnuTLS >= 3.4.7 which provides AES GCM.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolib:crypto: Remove our implementation of AES CCM
Andreas Schneider [Tue, 10 Dec 2019 16:52:36 +0000 (17:52 +0100)] 
lib:crypto: Remove our implementation of AES CCM

We require GnuTLS >= 3.4.7 which provides AES CCM.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopidl:NDR/Parser: only include structs in ndr_interface_public_struct
Andrew Bartlett [Wed, 4 Dec 2019 22:37:05 +0000 (11:37 +1300)] 
pidl:NDR/Parser: only include structs in ndr_interface_public_struct

We only have ndrdump and the fuzzers set up for structures, not BITMAPS,
ENUMS etc.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Dec 10 17:45:46 UTC 2019 on sn-devel-184

6 years agoselftest: Confirm that ndrdump struct mode is not available for enums
Andrew Bartlett [Thu, 5 Dec 2019 22:00:57 +0000 (11:00 +1300)] 
selftest: Confirm that ndrdump struct mode is not available for enums

These are not passed by pointer so the structure dump system does not work
for these.  It is best to dump the containing structure instead.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agoCVE-2019-14870: mit-kdc: enforce delegation_not_allowed flag
Isaac Boukris [Thu, 21 Nov 2019 10:12:48 +0000 (11:12 +0100)] 
CVE-2019-14870: mit-kdc: enforce delegation_not_allowed flag

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Tue Dec 10 10:44:01 UTC 2019 on sn-devel-184

6 years agoCVE-2019-14870: heimdal: enforce delegation_not_allowed in S4U2Self
Isaac Boukris [Mon, 28 Oct 2019 00:54:09 +0000 (02:54 +0200)] 
CVE-2019-14870: heimdal: enforce delegation_not_allowed in S4U2Self

Signed-off-by: Isaac Boukris <iboukris@gmail.com>
6 years agoCVE-2019-14870: heimdal: add S4U test for delegation_not_allowed
Isaac Boukris [Wed, 30 Oct 2019 14:59:16 +0000 (15:59 +0100)] 
CVE-2019-14870: heimdal: add S4U test for delegation_not_allowed

Signed-off-by: Isaac Boukris <iboukris@gmail.com>
6 years agosamba-tool: add user-sensitive command to set not-delegated flag
Isaac Boukris [Sun, 27 Oct 2019 12:02:00 +0000 (14:02 +0200)] 
samba-tool: add user-sensitive command to set not-delegated flag

Signed-off-by: Isaac Boukris <iboukris@gmail.com>
6 years agoCVE-2019-14861: Test to demonstrate the bug
Andrew Bartlett [Tue, 29 Oct 2019 22:50:57 +0000 (11:50 +1300)] 
CVE-2019-14861: Test to demonstrate the bug

This test does not fail every time, but when it does it casues a segfault which
takes out the rpc_server master process, as this hosts the dnsserver pipe.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
6 years agoCVE-2019-14861: s4-rpc/dnsserver: Avoid crash in ldb_qsort() via dcesrv_DnssrvEnumRec...
Andrew Bartlett [Tue, 29 Oct 2019 01:15:36 +0000 (14:15 +1300)] 
CVE-2019-14861: s4-rpc/dnsserver: Avoid crash in ldb_qsort() via dcesrv_DnssrvEnumRecords)

dns_name_compare() had logic to put @ and the top record in the tree being
enumerated first, but if a domain had both then this would break the
older qsort() implementation in ldb_qsort() and cause a read of memory
before the base pointer.

By removing this special case (not required as the base pointer
is already seperatly located, no matter were it is in the
returned records) the crash is avoided.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
6 years agoCVE-2019-14861: s4-rpc_server: Remove special case for @ in dns_build_tree()
Andrew Bartlett [Sun, 20 Oct 2019 23:12:10 +0000 (12:12 +1300)] 
CVE-2019-14861: s4-rpc_server: Remove special case for @ in dns_build_tree()

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
6 years agoCVE-2019-14861: s4-rpc/dnsserver: Confirm sort behaviour in dcesrv_DnssrvEnumRecords
Andrew Bartlett [Tue, 29 Oct 2019 04:25:28 +0000 (17:25 +1300)] 
CVE-2019-14861: s4-rpc/dnsserver: Confirm sort behaviour in dcesrv_DnssrvEnumRecords

The sort behaviour for child records is not correct in Samba so
we add a flapping entry.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
6 years agobootstrap: Add chrpath as a required package
Andrew Bartlett [Sat, 7 Dec 2019 04:35:26 +0000 (17:35 +1300)] 
bootstrap: Add chrpath as a required package

This is used to test build.sh, part of the oss-fuzz integration, and so also that we
correctly build our fuzzers.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Dec 10 09:15:43 UTC 2019 on sn-devel-184

6 years agobuild: Skip build of python bindings when in fuzzing mode
Andrew Bartlett [Sat, 7 Dec 2019 00:37:10 +0000 (13:37 +1300)] 
build: Skip build of python bindings when in fuzzing mode

This will just save a bit of time and space.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 years agolib/fuzzing Truncate the original files after RUNPATH manipulation in build.sh
Andrew Bartlett [Sat, 7 Dec 2019 18:45:58 +0000 (07:45 +1300)] 
lib/fuzzing Truncate the original files after RUNPATH manipulation in build.sh

This saves space on the rackspace runners in particular.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 years agolib/fuzzing Add comments to explain RUNPATH manipulation in build.sh
Andrew Bartlett [Sat, 7 Dec 2019 18:44:45 +0000 (07:44 +1300)] 
lib/fuzzing Add comments to explain RUNPATH manipulation in build.sh

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 years agolib/fuzzing: Support an oss-fuzz build with either address or undefined behaviour...
Andrew Bartlett [Sat, 7 Dec 2019 00:01:58 +0000 (13:01 +1300)] 
lib/fuzzing: Support an oss-fuzz build with either address or undefined behaviour sanitizers

Add handler for $SANITIZER in build.sh

This allows a build with the undefined behaviour sanitizer.

Otherwise we fail the oss-fuzz CI because the UBSan build links with ASan.

Once this in in then https://github.com/google/oss-fuzz/pull/3094
can be merged to oss-fuzz.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 years agolib/fuzzing: Remove oss-fuzz build.sh stub from the Samba repo
Andrew Bartlett [Sat, 7 Dec 2019 18:22:33 +0000 (07:22 +1300)] 
lib/fuzzing: Remove oss-fuzz build.sh stub from the Samba repo

We need to ship the stub build.sh in the oss-fuzz repo, not ours.
This is because otherwise the travis CI checks skip the build
(it thinks we are not set up yet, or have been disabled).

See https://github.com/google/oss-fuzz/pull/3094 for the PR
creating a similar file there.  This is very similar to how
janus-gateway operates, so this is an accepted pattern.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 years agooss-fuzz: Align build.sh sh parameters with pattern from the oss-fuzz project
Andrew Bartlett [Fri, 6 Dec 2019 23:06:37 +0000 (12:06 +1300)] 
oss-fuzz: Align build.sh sh parameters with pattern from the oss-fuzz project

We should run build_samba.sh with -eux to ensure we exit on failure,
refuse to use an unset varible and print the commands we are running.

(The suggested build.sh on the oss-fuzz side uses -eu).

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 years agofuzz/decode_ndr_X_crash: -f to filter crashes by regex
Douglas Bagnall [Thu, 5 Dec 2019 22:10:05 +0000 (11:10 +1300)] 
fuzz/decode_ndr_X_crash: -f to filter crashes by regex

If you go:

$ ./lib/fuzzing/decode_ndr_X_crash -H HONGGFUZZ_REPORT.txt -f 'SIG[^V]' > ./crash.sh

you will get all the crashes and not the timeouts (which have SIGVTALARM).

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolib/fuzzing: Add mode for the AFL fuzzer
Andrew Bartlett [Wed, 4 Dec 2019 08:23:06 +0000 (21:23 +1300)] 
lib/fuzzing: Add mode for the AFL fuzzer

This is helpful for ensuring the fuzzers still compile in autobuild as no
library support is required.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 years agolib/fuzzing: Also confirm we can make a string filter from the parsed tree in fuzz_ld...
Andrew Bartlett [Wed, 4 Dec 2019 09:07:26 +0000 (22:07 +1300)] 
lib/fuzzing: Also confirm we can make a string filter from the parsed tree in fuzz_ldb_parse_tree

This also avoids tree being an unused variable.

This is similar to doing an ndr_push() in ndr_fuzz_X, it
catches some of the cases where the parse is successful but
the application code could misinterpret the structure.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 years agolib/fuzzing: Tell the compiler we know we are ignoring errors in fuzz_reg_parse
Andrew Bartlett [Wed, 4 Dec 2019 08:39:49 +0000 (21:39 +1300)] 
lib/fuzzing: Tell the compiler we know we are ignoring errors in fuzz_reg_parse

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 years agolib/fuzzer: Allow building a fuzz binary for just one interface
Andrew Bartlett [Sat, 30 Nov 2019 07:23:18 +0000 (20:23 +1300)] 
lib/fuzzer: Allow building a fuzz binary for just one interface

This helps direct the fuzzer at a particular function that we are concerned about.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 years agolib/fuzzer: Remove rudundent install=False flag from fuzz_ndr_X build rule
Andrew Bartlett [Sat, 30 Nov 2019 07:22:26 +0000 (20:22 +1300)] 
lib/fuzzer: Remove rudundent install=False flag from fuzz_ndr_X build rule

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 years agolib/fuzzing: Link only the required NDR_ subsystems into ndr_fuzz_X binaries
Andrew Bartlett [Thu, 28 Nov 2019 23:07:34 +0000 (12:07 +1300)] 
lib/fuzzing: Link only the required NDR_ subsystems into ndr_fuzz_X binaries

This reduces the binary size and shows that we are linked against the correct
ndr_table_ global variable.  This might help the fuzzing engine know there
is not much more of the binary to find if unreachable code is not included.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 years agolibrpc: Fill in full deps for NDR_* subsystems
Andrew Bartlett [Thu, 28 Nov 2019 23:06:01 +0000 (12:06 +1300)] 
librpc: Fill in full deps for NDR_* subsystems

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 years agofuzzing/decode_ndr_X: read crashes from a HONGGFUZZ report
Douglas Bagnall [Tue, 3 Dec 2019 22:57:02 +0000 (11:57 +1300)] 
fuzzing/decode_ndr_X: read crashes from a HONGGFUZZ report

In theory, you should be able to run honggfuzz and go

$ lib/fuzzing/decode_ndr_X_crash -H HONGGFUZZ-REPORT.txt > crash-crash-crash.sh

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolib/fuzzing/decode_ndr_X: print less by default, avoid pipe
Douglas Bagnall [Tue, 3 Dec 2019 22:35:40 +0000 (11:35 +1300)] 
lib/fuzzing/decode_ndr_X: print less by default, avoid pipe

ndrdump can now take base64 input directly.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agofuzzing: Add script decode_ndr_X_crash to decode crash results
Douglas Bagnall [Tue, 5 Nov 2019 01:26:56 +0000 (14:26 +1300)] 
fuzzing: Add script decode_ndr_X_crash to decode crash results

This interprets a file that crashes an fuzz_ndr_X binary

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agodcerpc: developer option to save ndr_fuzz_X seeds
Douglas Bagnall [Wed, 6 Nov 2019 04:27:08 +0000 (17:27 +1300)] 
dcerpc: developer option to save ndr_fuzz_X seeds

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Pair-programmed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolib/fuzzing: add fuzz_ndr_X
Douglas Bagnall [Thu, 31 Oct 2019 03:28:28 +0000 (16:28 +1300)] 
lib/fuzzing: add fuzz_ndr_X

This NDR fuzzer links with each "interface" in the IDL files to
create avsingle binary.  This tries to matches what the fuzzing
engines desire.

It started as a copy of ndrdump but very little of that remains
in place.

The fancy build rules try to avoid needing a lof of boilerplate
in the wscript_build files and ensure new fuzzers are generated
and run when new IDL is added automatically.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Pair-programmed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopidl/tests/samba-ndr.pl: remove duplicate import
Douglas Bagnall [Sat, 30 Nov 2019 11:44:52 +0000 (00:44 +1300)] 
pidl/tests/samba-ndr.pl: remove duplicate import

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Dec 10 04:16:31 UTC 2019 on sn-devel-184

6 years agopidl s4::Python: silence warnings
Douglas Bagnall [Sat, 30 Nov 2019 11:43:52 +0000 (00:43 +1300)] 
pidl s4::Python: silence warnings

- do not redeclare variables in the same scope.
- use $1 instead of \1, which perl just prefers.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopidl Parse::Pidl::NDR: silence two warnings about undefined strings
Douglas Bagnall [Sat, 30 Nov 2019 11:43:02 +0000 (00:43 +1300)] 
pidl Parse::Pidl::NDR: silence two warnings about undefined strings

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopidl Parse::Pidl::NDR: add HRESULT alignment
Douglas Bagnall [Sat, 30 Nov 2019 11:42:22 +0000 (00:42 +1300)] 
pidl Parse::Pidl::NDR: add HRESULT alignment

this is a guess

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopidl Parse::Pidl::NDR: warn of unknown scalar alignments
Douglas Bagnall [Sat, 30 Nov 2019 11:41:42 +0000 (00:41 +1300)] 
pidl Parse::Pidl::NDR: warn of unknown scalar alignments

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopidl s4::NDR::Parser: silence a warning
Douglas Bagnall [Sat, 30 Nov 2019 10:05:56 +0000 (23:05 +1300)] 
pidl s4::NDR::Parser: silence a warning

At level 0 there is no previous level so $pl is undefined thus so is ->{TYPE}

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopidl s4::NDR::Parser: correct has_fast_array logic
Douglas Bagnall [Sat, 30 Nov 2019 09:52:23 +0000 (22:52 +1300)] 
pidl s4::NDR::Parser: correct has_fast_array logic

Here we fix two bugs that cancelled each other out completely, so this
patch leaves us with exactly the same functionally as before.

Bug 1: In perl, return is *syntactically* a function.

That means 'return X or Y' is read as 'return(X) or Y', as in the
'open(X) or die "..."' construct -- Y is only evaluated if return
returns false. But return never returns, so Y is dead code. If in
doubt, try these:

perl -e "sub x {return 0 or die;} x"
perl -e "sub x {return (0 or die);} x"

What we *meant* here is 'return (X or Y)', BUT it turns out we were
confused -- the Y case was bogus.

Bug 2: string arrays never had "fast array logic" in the first place.

The fast array logic is for arrays of bytes, and can be fast (i.e.
memcpy) because there is no endianness to worry about. A string array
is an array of pointers not bytes.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopidl s4::NDR::Parser: read hex numbers as numbers for ranges
Douglas Bagnall [Sat, 30 Nov 2019 10:37:08 +0000 (23:37 +1300)] 
pidl s4::NDR::Parser: read hex numbers as numbers for ranges

Hex numbers in IDL are not parsed as numbers, resulting in warnings
like

Argument 0x2000 isn't numeric in numeric lt (<) at /home/douglas/src/samba/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm line 981

not to mention problematic code. We add a utility function to convert
these numbers to numbers.

A typical difference this makes is:

 --- old/default/librpc/gen_ndr/ndr_dcerpc.c     2019-11-30 23:40:32.915816967 +1300
 +++ new/default/librpc/gen_ndr/ndr_dcerpc.c     2019-11-30 17:00:09.055733660 +1300
 @@ -1893,7 +1893,7 @@
         if (ndr_flags & NDR_SCALARS) {
                 NDR_CHECK(ndr_pull_align(ndr, 4));
                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ReceiveWindowSize));
 -               if (r->ReceiveWindowSize > 0x40000) {
 +               if (r->ReceiveWindowSize < 8192 || r->ReceiveWindowSize > 262144) {
                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
                 }
                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));

Where the minimum ("0x2000" == 8192) was read as a string, thus
treated as zero.

The treatment as zero was introduced in 142b2a61f8a77b3065ce4c78b459ab714d6d190a
accidentially, which shows why warnings are important.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopidl: use perl warnings
Douglas Bagnall [Sat, 30 Nov 2019 09:34:54 +0000 (22:34 +1300)] 
pidl: use perl warnings

Warnings are good. If we turn on warnings with 'use warnings', we will
see bugs that have lain latent for years.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolibrpc/ndr: Do not follow a client-supplied NULL pointer in _print_drsuapi_DsAttribut...
Andrew Bartlett [Wed, 4 Dec 2019 20:56:44 +0000 (09:56 +1300)] 
librpc/ndr: Do not follow a client-supplied NULL pointer in _print_drsuapi_DsAttributeValue_attid()

This is not a security issue as it only happens when printing the structure
during debugging, not normal production.

Found by Michael Hanselmann using an NDR fuzzer and Hongfuzz.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 years agoselftest: Add ndrdump tests for malformed drsuapi traffic
Andrew Bartlett [Wed, 4 Dec 2019 22:10:14 +0000 (11:10 +1300)] 
selftest: Add ndrdump tests for malformed drsuapi traffic

Thanks to Douglas Bagnall for the samples, produced from seeds
generated by Samba's make test traffic, fuzzed by ndr_fuzz_X
and Hongfuzz.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 years agopidl: Remove Parse/Yapp/Driver.pm
Andreas Schneider [Thu, 5 Dec 2019 12:48:52 +0000 (13:48 +0100)] 
pidl: Remove Parse/Yapp/Driver.pm

This file is provided by Parse::Yapp and on install we overwrite the
orignal file.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Dec 10 01:54:02 UTC 2019 on sn-devel-184

6 years agosmbdes: remove old unused DES builtin-crypto
Isaac Boukris [Mon, 21 Oct 2019 17:03:04 +0000 (20:03 +0300)] 
smbdes: remove old unused DES builtin-crypto

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosess_crypt_blob can only crypt blobs whose size divides by 8
Isaac Boukris [Thu, 21 Nov 2019 14:13:19 +0000 (15:13 +0100)] 
sess_crypt_blob can only crypt blobs whose size divides by 8

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosession: convert sess_crypt_blob to use gnutls
Isaac Boukris [Thu, 21 Nov 2019 13:02:03 +0000 (14:02 +0100)] 
session: convert sess_crypt_blob to use gnutls

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosmbdes: convert des_crypt112_16 to use gnutls
Isaac Boukris [Wed, 20 Nov 2019 15:02:16 +0000 (16:02 +0100)] 
smbdes: convert des_crypt112_16 to use gnutls

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosmbdes: convert des_crypt112 to use gnutls
Isaac Boukris [Wed, 20 Nov 2019 14:41:02 +0000 (15:41 +0100)] 
smbdes: convert des_crypt112 to use gnutls

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosmbdes: convert E_old_pw_hash to use gnutls
Isaac Boukris [Wed, 20 Nov 2019 14:28:39 +0000 (15:28 +0100)] 
smbdes: convert E_old_pw_hash to use gnutls

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosmbdes: convert des_crypt128() to use gnutls
Isaac Boukris [Fri, 8 Nov 2019 16:49:48 +0000 (17:49 +0100)] 
smbdes: convert des_crypt128() to use gnutls

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosmbdes: convert E_P24() and SMBOWFencrypt to use gnutls
Isaac Boukris [Fri, 8 Nov 2019 14:40:01 +0000 (15:40 +0100)] 
smbdes: convert E_P24() and SMBOWFencrypt to use gnutls

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosmbdes: remove D_P16() (not used)
Isaac Boukris [Fri, 8 Nov 2019 11:04:48 +0000 (12:04 +0100)] 
smbdes: remove D_P16() (not used)

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosmbdes: convert E_P16() to use gnutls
Isaac Boukris [Thu, 7 Nov 2019 15:16:26 +0000 (16:16 +0100)] 
smbdes: convert E_P16() to use gnutls

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosmbdes: convert sam_rid_crypt() to use gnutls
Isaac Boukris [Thu, 7 Nov 2019 17:40:03 +0000 (18:40 +0100)] 
smbdes: convert sam_rid_crypt() to use gnutls

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoSMBsesskeygen_lm_sess_key: use gnutls and return NTSTATUS
Isaac Boukris [Thu, 7 Nov 2019 12:39:20 +0000 (13:39 +0100)] 
SMBsesskeygen_lm_sess_key: use gnutls and return NTSTATUS

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agonetlogon_creds_des_encrypt/decrypt_LMKey: use gnutls and return NTSTATUS
Isaac Boukris [Thu, 7 Nov 2019 11:53:52 +0000 (12:53 +0100)] 
netlogon_creds_des_encrypt/decrypt_LMKey: use gnutls and return NTSTATUS

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosmbdes: add des_crypt56_gnutls() using DES-CBC with zeroed IV
Isaac Boukris [Sat, 19 Oct 2019 20:48:19 +0000 (23:48 +0300)] 
smbdes: add des_crypt56_gnutls() using DES-CBC with zeroed IV

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoselftest: test sess_crypt_blob
Isaac Boukris [Wed, 20 Nov 2019 22:44:10 +0000 (23:44 +0100)] 
selftest: test sess_crypt_blob

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoselftest: test SMBsesskeygen_lm_sess_key
Isaac Boukris [Tue, 19 Nov 2019 23:14:31 +0000 (00:14 +0100)] 
selftest: test SMBsesskeygen_lm_sess_key

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoselftest: test des_crypt112_16
Isaac Boukris [Tue, 19 Nov 2019 19:02:49 +0000 (20:02 +0100)] 
selftest: test des_crypt112_16

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoselftest: test des_crypt112 and fix (unused) decryption
Isaac Boukris [Tue, 19 Nov 2019 18:49:09 +0000 (19:49 +0100)] 
selftest: test des_crypt112 and fix (unused) decryption

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoselftest: test des_crypt128
Isaac Boukris [Tue, 19 Nov 2019 18:10:18 +0000 (19:10 +0100)] 
selftest: test des_crypt128

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoselftest: test E_old_pw_hash
Isaac Boukris [Tue, 19 Nov 2019 17:49:58 +0000 (18:49 +0100)] 
selftest: test E_old_pw_hash

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoselftest: test E_P24 and SMBOWFencrypt
Isaac Boukris [Tue, 19 Nov 2019 17:26:13 +0000 (18:26 +0100)] 
selftest: test E_P24 and SMBOWFencrypt

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoselftest: test sam_rid_crypt
Isaac Boukris [Tue, 19 Nov 2019 15:08:49 +0000 (16:08 +0100)] 
selftest: test sam_rid_crypt

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoselftest: test E_P16
Isaac Boukris [Tue, 19 Nov 2019 08:46:18 +0000 (09:46 +0100)] 
selftest: test E_P16

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolibcli/auth: test des_crypt56() and add test_gnutls to selftest
Isaac Boukris [Sat, 9 Nov 2019 16:47:33 +0000 (17:47 +0100)] 
libcli/auth: test des_crypt56() and add test_gnutls to selftest

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoauth:tests: Only enable torture_gnutls_aes_128_cfb() on GnuTLS >= 3.6.11
Andreas Schneider [Fri, 6 Dec 2019 07:49:54 +0000 (08:49 +0100)] 
auth:tests: Only enable torture_gnutls_aes_128_cfb() on GnuTLS >= 3.6.11

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoauth:tests: Improve debug output of test_gnutls
Andreas Schneider [Fri, 6 Dec 2019 07:12:34 +0000 (08:12 +0100)] 
auth:tests: Improve debug output of test_gnutls

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:lib: Move NULL check before messaging_dgm_out_rearm_idle_timer()
Andreas Schneider [Mon, 9 Dec 2019 09:47:46 +0000 (10:47 +0100)] 
s3:lib: Move NULL check before messaging_dgm_out_rearm_idle_timer()

We dereference out in messaging_dgm_out_rearm_idle_timer().

Found by covscan.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:smbd: Fix possible NULL deref in smbd_do_qfilepathinfo()
Andreas Schneider [Mon, 9 Dec 2019 09:45:31 +0000 (10:45 +0100)] 
s3:smbd: Fix possible NULL deref in smbd_do_qfilepathinfo()

Found by covscan.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:torture: Do not segfault if cli is NULL
Andreas Schneider [Mon, 9 Dec 2019 09:35:55 +0000 (10:35 +0100)] 
s3:torture: Do not segfault if cli is NULL

This can happen if we fail early and cli hasn't been initialized yet.

Found by covscan.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:rpc_server: Fix string compare for utmp entries
Andreas Schneider [Mon, 9 Dec 2019 09:22:52 +0000 (10:22 +0100)] 
s3:rpc_server: Fix string compare for utmp entries

The members of struct utmp are marked as nonstring. This means they
might not be nil-terminated.

Found by covscan.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos4:lib: Make sure we close fd's in error path
Andreas Schneider [Mon, 9 Dec 2019 08:58:42 +0000 (09:58 +0100)] 
s4:lib: Make sure we close fd's in error path

Found by covscan.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agobuild: Fix the build without system gssapi headers
Volker Lendecke [Mon, 9 Dec 2019 12:49:47 +0000 (13:49 +0100)] 
build: Fix the build without system gssapi headers

source4/heimdal/lib/gssapi/gssapi/gssapi_krb5.h and gssapi_spnego.h
have an #include <gssapi.h> which they need to find via the -I paths

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Tue Dec 10 00:29:55 UTC 2019 on sn-devel-184

6 years agolib: spelling fix
Ralph Boehme [Mon, 9 Dec 2019 17:56:59 +0000 (18:56 +0100)] 
lib: spelling fix

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Dec  9 19:23:10 UTC 2019 on sn-devel-184

6 years agosmbd: Give a better error message for non-existing share modes
Volker Lendecke [Tue, 3 Dec 2019 20:26:24 +0000 (21:26 +0100)] 
smbd: Give a better error message for non-existing share modes

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Dec  9 17:33:42 UTC 2019 on sn-devel-184

6 years agonet: Extend some debug information
Volker Lendecke [Fri, 29 Nov 2019 14:45:56 +0000 (15:45 +0100)] 
net: Extend some debug information

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agosmbd: Call reopen_logs() in the notifyd
Volker Lendecke [Tue, 3 Dec 2019 12:23:06 +0000 (13:23 +0100)] 
smbd: Call reopen_logs() in the notifyd

If you have per-process logfiles with %d, the notifyd will get its
own logfile

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agosmbd: Call reopen_logs() in the smbd scavenger
Volker Lendecke [Tue, 3 Dec 2019 12:22:06 +0000 (13:22 +0100)] 
smbd: Call reopen_logs() in the smbd scavenger

If you have per-process logfiles with %d, the scavenger will get its
own logfile

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agotorture: Use sizeof() where appropriate
Volker Lendecke [Tue, 3 Dec 2019 11:52:09 +0000 (12:52 +0100)] 
torture: Use sizeof() where appropriate

One magic number less that needs to be verified manually

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agosmbd: Use NULL instead of 0 for a pointer type
Volker Lendecke [Wed, 4 Dec 2019 13:43:02 +0000 (14:43 +0100)] 
smbd: Use NULL instead of 0 for a pointer type

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agolib: add a comment to nt_time_to_full_timespec()
Ralph Boehme [Fri, 6 Dec 2019 16:48:19 +0000 (16:48 +0000)] 
lib: add a comment to nt_time_to_full_timespec()

Add a hint explaining why and how -1 should be treated differently in the
future. Also make use of the helper function make_omit_timespec().

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agolib: harden full_timespec_to_nt_time()
Ralph Boehme [Fri, 6 Dec 2019 16:45:04 +0000 (16:45 +0000)] 
lib: harden full_timespec_to_nt_time()

This protects against overflows when tv_sec is less then
TIME_FIXUP_CONSTANT_INT.

It also correctly limits the range of returned values to be
[NTTIME_MIN, NTTIME_MAX].

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agolib: add NTTIME_MAX, NTTIME_MIN, NTTIME_OMIT and NTTIME_FREEZE definitions
Ralph Boehme [Fri, 6 Dec 2019 16:44:37 +0000 (16:44 +0000)] 
lib: add NTTIME_MAX, NTTIME_MIN, NTTIME_OMIT and NTTIME_FREEZE definitions

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agos3:smbspool: Leave early if we print as root
Andreas Schneider [Fri, 29 Nov 2019 07:28:28 +0000 (08:28 +0100)] 
s3:smbspool: Leave early if we print as root

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Mon Dec  9 14:18:11 UTC 2019 on sn-devel-184

6 years agos3:smbspool: print a hint about smbspool_krb5_wrapper
Mikhail Novosyolov [Sat, 2 Nov 2019 22:47:51 +0000 (01:47 +0300)] 
s3:smbspool: print a hint about smbspool_krb5_wrapper

When I first met with the situation that Kerberos kredentials cache of root
user was looked for instead of the one of the printing task creator,
it took a lot of time to understand that smbspool_krb5_wrapper will resolve this.

Signed-off-by: Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
6 years agos3:smbspool_krb5_wrapper: ignore unknown values of AUTH_INFO_REQUIRED
Mikhail Novosyolov [Sat, 2 Nov 2019 22:28:13 +0000 (01:28 +0300)] 
s3:smbspool_krb5_wrapper: ignore unknown values of AUTH_INFO_REQUIRED

To make smbspool_krb5_wrapper usable as a default destination for symlink
/usr/lib/cups/backend/smb in Linux ditros, it has to be well-prepared
for any possible values of AUTH_INFO_REQUIRED set by cupsd and correctly
pass printing tasks to smbspool if it sees that Kerberos authentication
is not needed.

Discussed here: https://lists.samba.org/archive/samba-technical/2019-October/134470.html

Signed-off-by: Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
6 years agos3:smbspool_krb5_wrapper: Map AUTH_INFO_REQUIRED=none to anonymous
Andreas Schneider [Mon, 28 Oct 2019 08:38:08 +0000 (09:38 +0100)] 
s3:smbspool_krb5_wrapper: Map AUTH_INFO_REQUIRED=none to anonymous

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
6 years agos3:smbspool: Map AUTH_INFO_REQUIRED=none to anonymous connection
Andreas Schneider [Mon, 28 Oct 2019 08:35:34 +0000 (09:35 +0100)] 
s3:smbspool: Map AUTH_INFO_REQUIRED=none to anonymous connection

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
6 years agos3:selfest: Do not print the env twice
Andreas Schneider [Fri, 8 Nov 2019 13:32:44 +0000 (14:32 +0100)] 
s3:selfest: Do not print the env twice

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Dec  9 11:57:52 UTC 2019 on sn-devel-184

6 years agos3:tests: Remove the -I SERVER_IP so that Kerberos auth works
Andreas Schneider [Wed, 6 Nov 2019 14:54:45 +0000 (14:54 +0000)] 
s3:tests: Remove the -I SERVER_IP so that Kerberos auth works

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@samba.org>
6 years agodocs-xml/Samba-Developers-Guide/vfs.xml: Fix incorrect VFS func names.
Richard Sharpe [Fri, 6 Dec 2019 05:07:11 +0000 (00:07 -0500)] 
docs-xml/Samba-Developers-Guide/vfs.xml: Fix incorrect VFS func names.

Use SMB_VFS_P{READ,WRITE} since the others have been retired.

Also, fix up the definitions.

Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sun Dec  8 21:50:52 UTC 2019 on sn-devel-184

6 years agos4:smbtorture: also test for date >> UINT32_MAX in timestamps test
Ralph Boehme [Fri, 6 Dec 2019 10:27:22 +0000 (10:27 +0000)] 
s4:smbtorture: also test for date >> UINT32_MAX in timestamps test

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agosmbd: Fix a share_entries.tdb record leak
Volker Lendecke [Tue, 3 Dec 2019 20:27:09 +0000 (21:27 +0100)] 
smbd: Fix a share_entries.tdb record leak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agosmbd: Test cleanup of disconnected durable handle records
Volker Lendecke [Tue, 3 Dec 2019 20:33:28 +0000 (21:33 +0100)] 
smbd: Test cleanup of disconnected durable handle records

Right now this panics the scavenger daemon, preventing it from doing
its work. The reopen we expect to fail with
NT_STATUS_OBJECT_NAME_NOT_FOUND thus succeeds. I know that we should
more precisely detect the scavenger crash and with Jeremy's pattern in
46899ecf836 this would be possible. However, this is C code right now,
and scanning the logfile for the panic is more I have time for right
now. The test successfully indicates failure, as the next commit will
show.

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