summaryrefslogtreecommitdiff
path: root/selftest/knownfail.d
Commit message (Collapse)AuthorAgeFilesLines
* selftest: Run libsmbclient with and without unix extensionsVolker Lendecke2020-02-271-2/+2
| | | | | | | | | | | | | The libsmbclient readdir tests are broken just for the unix extension case. For example they assume our "map archive" behaviour. This will have to be parameterized once unix extensions become better implemented in libsmbclient Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Feb 27 19:34:36 UTC 2020 on sn-devel-184
* idl: drsuapi_DsaAddressListItem_V1 limit recursionGary Lockyer2020-02-271-1/+0
| | | | | | | | | | | | Limit number of drsuapi_DsaAddressListItem_V1 elements to 1024 Credit to OSS-Fuzz REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19820 BUG: https://bugzilla.samba.org/show_bug.cgi?id=14254 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* librpc ndr: Stack-overflow in ndr_pull_drsuapi_DsaAddressListItem_V1Gary Lockyer2020-02-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Reproducer for oss-fuzz Issue 19280 Project: samba Fuzzing Engine: libFuzzer Fuzz Target: fuzz_ndr_drsuapi_TYPE_OUT Job Type: libfuzzer_asan_samba Platform Id: linux Crash Type: Stack-overflow Crash Address: 0x7ffcb4cc2ff8 Crash State: ndr_pull_drsuapi_DsaAddressListItem_V1 Sanitizer: address (ASAN) Credit to OSS-Fuzz REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19280 BUG: https://bugzilla.samba.org/show_bug.cgi?id=14254 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libsmb: Pass the correct path to cli_posix_stat()Volker Lendecke2020-02-251-0/+2
| | | | | | | | | | | | | This fixes doing strlen() on talloc_tos(), about which valgrind is pretty unhappy. Without this patch we survive the tests because we have fallbacks to the non-posix flavors of stat(). With this patch in place cli_posix_stat() becomes functional in this code path. This creates conflicts with the readdir libsmbclient tests, which need fixing separately. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14101 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Separate aio_pthread indicator from normal EINTRVolker Lendecke2020-02-201-1/+0
| | | | | | | | | | | | | | | | | | According to Posix and the Linux open(2) manpage, the open-syscall can return EINTR. If that happens, core smbd saw this as an indication that aio_pthread's open function was doing its job. With a real EINTR without aio_pthread this meant we ended up in a server_exit after 20 seconds, because there was nobody to do the retry. EINTR is mapped to NT_STATUS_RETRY. Handle this by just retrying after a second. Bug: https://bugzilla.samba.org/show_bug.cgi?id=14285 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Feb 20 22:14:25 UTC 2020 on sn-devel-184
* test: Show that smbd does not handle EINTR from open() correctlyVolker Lendecke2020-02-201-0/+1
| | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=14285 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4-auth: Allow simple bind login of a user with an @ in the samAccountNameAndrew Bartlett2020-02-141-1/+0
| | | | | | | | | | | | | | | | LDAP Simple BIND authentications have already been mapped to a DOMAIN\username pair and should not be mapped twice. This appears to be a regression in 09e24ce40f89ac2f03d0c5fefa8b59f0d113fa6b included in Samba 4.7. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13598 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Isaac Boukris <iboukris@samba.org> Autobuild-User(master): Isaac Boukris <iboukris@samba.org> Autobuild-Date(master): Fri Feb 14 17:13:33 UTC 2020 on sn-devel-184
* auth/credentials: Test connecting to LDAP with a "virtual user" style accountAndrew Bartlett2020-02-141-0/+1
| | | | | | | | | | | This type of account is often used by e-mail hosting platforms that do not wish to create an AD domain for each DNS domain that they host mail for. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13598 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Isaac Boukris <iboukris@samba.org>
* libprc ndr tests: Fix ndrdump test ntlmssp_CHALLENGE_MESSAGEGary Lockyer2020-02-071-1/+0
| | | | | | | | | | | | | | | | Fix the expected data in fuzzed_ntlmssp-CHALLENGE_MESSAGE.txt, as it contained source code line numbers. Andrew this test needs to be altered to us a regular expression and remove the dependency on source line numbers. Credit to OSS-Fuzz REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20083 BUG: https://bugzilla.samba.org/show_bug.cgi?id=14236 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* librpc ndr: ndr_pull_advance check for unsigned overflow.Gary Lockyer2020-02-071-2/+1
| | | | | | | | | | | | Handle uint32 overflow in ndr_pull_advance Credit to OSS-Fuzz REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20083 BUG: https://bugzilla.samba.org/show_bug.cgi?id=14236 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* librpc ndr tests: Unsigned overflow in ndr_pull_advanceGary Lockyer2020-02-071-0/+1
| | | | | | | | | | | | Check that uint32 overflow is handled correctly by ndr_pull_advance. Credit to OSS-Fuzz REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20083 BUG: https://bugzilla.samba.org/show_bug.cgi?id=14236 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* librpc ndr: NDR_PULL_ALIGN check for unsigned overflowGary Lockyer2020-02-071-1/+0
| | | | | | | | | | | | Handle uint32 overflow in NDR_PULL_ALIGN Credit to OSS-Fuzz REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20083 BUG: https://bugzilla.samba.org/show_bug.cgi?id=14236 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* librpc ndr tests: uint32 overflow in NDR_PULL_ALIGNGary Lockyer2020-02-071-0/+1
| | | | | | | | | | | | Check that uint32 overflow is handled correctly by NDR_NEED_BYTES. Credit to OSS-Fuzz REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20083 BUG: https://bugzilla.samba.org/show_bug.cgi?id=14236 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* librpc ndr: Heap-buffer-overflow in lzxpress_decompressGary Lockyer2020-02-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reproducer for oss-fuzz Issue 20083 Project: samba Fuzzing Engine: libFuzzer Fuzz Target: fuzz_ndr_drsuapi_TYPE_OUT Job Type: libfuzzer_asan_samba Platform Id: linux Crash Type: Heap-buffer-overflow READ 1 Crash Address: 0x6040000002fd Crash State: lzxpress_decompress ndr_pull_compression_xpress_chunk ndr_pull_compression_start Sanitizer: address (ASAN) Recommended Security Severity: Medium Credit to OSS-Fuzz REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20083 BUG: https://bugzilla.samba.org/show_bug.cgi?id=14236 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* source4/scripting/bin: Swap machine account password scriptsAndrew Bartlett2020-02-061-1/+1
| | | | | | | | | | | | | | | | | I regularly get requests for my simple script to print the password from the secrets.tdb (or secrets.ldb on the AD DC). This removes the old script that only reads the secrets.ldb. Neither new nor old script has tests, however it seems better to have it in the tree where it can be found rather that me digging it out of my outbound e-mail. Originally posted here: https://lists.samba.org/archive/samba/2017-November/212362.html Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:auth_sam: map an empty domain or '.' to the local SAM nameStefan Metzmacher2020-02-051-1/+1
| | | | | | | | | | | | | When a domain member gets an empty domain name or '.', it should not forward the authentication to domain controllers of the primary domain. But we need to keep passing UPN account names with an empty domain to the DCs as a domain member. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14247 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:selftest: test authentication with an empty userdomain and upn namesStefan Metzmacher2020-02-051-0/+7
| | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14247 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* CVE-2019-14902 dsdb: Change basis of descriptor module deferred processing ↵Andrew Bartlett2020-01-211-1/+0
| | | | | | | | | | | | | | | | to be GUIDs We can not process on the basis of a DN, as the DN may have changed in a rename, not only that this module can see, but also from repl_meta_data below. Therefore remove all the complex tree-based change processing, leaving only a tree-based sort of the possible objects to be changed, and a single stopped_dn variable containing the DN to stop processing below (after a no-op change). BUG: https://bugzilla.samba.org/show_bug.cgi?id=12497 Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* CVE-2019-14902 repl_meta_data: Set renamed = true (and so do SD inheritance) ↵Andrew Bartlett2020-01-211-1/+0
| | | | | | | | | | | after any rename Previously if there was a conflict, but the incoming object would still win, this was not marked as a rename, and so inheritence was not done. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12497 Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* CVE-2019-14902 repl_meta_data: Fix issue where inherited Security ↵Andrew Bartlett2020-01-211-1/+0
| | | | | | | | Descriptors were not replicated. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12497 Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* CVE-2019-14902 selftest: Add test for a special case around replicated renamesAndrew Bartlett2020-01-211-0/+1
| | | | | | | | It appears Samba is currently string-name based in the ACL inheritence code. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12497 Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* CVE-2019-14902 selftest: Add test for replication of inherited security ↵Andrew Bartlett2020-01-211-0/+2
| | | | | | | | descriptors BUG: https://bugzilla.samba.org/show_bug.cgi?id=12497 Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* lib: Fix contending with a READ lockVolker Lendecke2019-12-221-1/+0
| | | | | | | | | | | | | | | When contending a WRITE with an existing READ, the contender puts himself into the exclusive slot, waiting for the READers to go away. If the async lock request is canceled before we got the lock, we need to remove ourselves again. This is done in the destructor of the g_lock_lock_state. In the successful case, the destructor needs to go away. Signed-off-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 22 18:57:17 UTC 2019 on sn-devel-184
* torture3: Add a test that contends with a READ, not a WRITE lockVolker Lendecke2019-12-221-0/+1
| | | | | | | | This walks different code paths in the subsequent locker. And the one that we did not test so far is in fact buggy Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* librpc: Do not access name[-1] trying to push "" into a dnsp_nameAndrew Bartlett2019-12-201-1/+0
| | | | | | | | | | | | | | | | | | | | | This simply matches the behaviour from before e7b1acaddf2ccc7de0301cc67f72187ab450e7b5 when the logic for a trailing . was added. This matches what is added in the dnsRecord attribute for a name of "." over the dnsserver RPC management interface and is based on what Windows does for that name in (eg) an MX record. No a security bug because we use talloc and so name will be just the end of the talloc header. Credit to OSS-Fuzz Found using the fuzz_ndr_X fuzzer Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Fri Dec 20 11:33:52 UTC 2019 on sn-devel-184
* selftest: Confirm parse of dnsProperty recordsAndrew Bartlett2019-12-201-0/+1
| | | | | | | This confirms a name of "." will round-trip correctly. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* upgradedns: ensure lmdb lock files linkedGary Lockyer2019-12-201-1/+0
| | | | | | | | | | | | | Ensure that the '-lock' files for the dns partitions as well as the data files are linked when running samba_dnsupgrade --dns-backend=BIND9_DLZ failure to create these links can cause corruption of the corresponding data file. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14199 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* test upgradedns: ensure lmdb lock files linkedGary Lockyer2019-12-201-0/+1
| | | | | | | | | | | | | Add tests to check that the '-lock' files for the dns partitions as well as the data files are linked when running samba_dnsupgrade --dns-backend=BIND9_DLZ failure to create these links can cause corruption of the corresponding data file. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14199 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* librpc: Fix manually written printer for drsuapi_DsAttributeValueAndrew Bartlett2019-12-181-1/+0
| | | | | | | | | Credit to OSS-Fuzz Found using the ndr_fuzz_X target. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* sefltest: Demonstrate crash in manually written printer for ↵Andrew Bartlett2019-12-181-0/+1
| | | | | | | drsuapi_DsAttributeValue Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* librpc: Do not follow a NULL pointer when calculating the size of a unionAndrew Bartlett2019-12-121-1/+0
| | | | | | | | | | Found by Douglas Bagnall using Hongfuzz and the new fuzz_ndr_X fuzzer. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13876 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* pidl: Mismatch between set and get of relative base pointersAndrew Bartlett2019-12-121-1/+0
| | | | | | | | | | | The set was within the switch, the get was before the switch. The difference is shown when there is an empty default element. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13876 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* librpc: Do not follow a NULL pointer when calculating the size of a structureAndrew Bartlett2019-12-121-1/+0
| | | | | | | | | | Found by Douglas Bagnall using Hongfuzz and the new fuzz_ndr_X fuzzer. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13876 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* selftest: Add test for ndr_size_struct() faulting on a NULL pointerAndrew Bartlett2019-12-121-0/+1
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13876 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* selftest: Add test for ndr_size_union() faulting on a NULL pointerAndrew Bartlett2019-12-121-0/+1
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13876 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* selftest: Add test for structure with NDR_BUFFERS only in a unionAndrew Bartlett2019-12-121-0/+1
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13876 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* librpc/idl/dnsserver.idl: Ensure DnsProperty id matches what is pulled from ↵Andrew Bartlett2019-12-121-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the stored buffer There are two concerns here, assuming the attacker can place arbitary values in a dnsProperty attribute over LDAP (eg is a DNS administrator). This comes from the fact that id is used as the switch value at the C layer but at the NDR layer the wDataLength value is considered first. One concern is that a pull/push round-trip could include server memory: The previous switch_is() behaviour could store the server memory back into the attribute. However this pattern of pull/push only happens in ndrdump and fuzzing tools, as dnsserver_db_do_reset_dword() operates only on the uint32/bitmap union arms, and fully initialises those. The other is that a pull of the attacker-supplied value could cause the server to expose memory. This would be over the network via DNS or the RPC dnsserver protocols. However at all times the ndr_pull_struct_blob is passed zeroed memory. The final concern (which fuzz_ndr_X found) is that in the ndr_size_dnsPropertyData() the union descriminent is only id. This has no impact as only zeroed memory is used so there will be a zero value in all scalars, including data->d_ns_servers.AddrArray. Therefore the server will not crash processing the attacker-supplied blob [MS-DNSP] 2.3.2.1 dnsProperty has no mention of this special behaviour. https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-dnsp/445c7843-e4a1-4222-8c0f-630c230a4c80 This was known as CVE-2019-14908 before being triaged back to a normal bug. Found by Douglas Bagnall using Hongfuzz and the new fuzz_ndr_X fuzzer. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14206 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@samba.org>
* librpc dnsp test: Ensure length matches union selectorGary Lockyer2019-12-121-0/+2
| | | | | | | | | | | | Ensure that a dnsp_DnsProperty is rejected if the length data does not not correspond to the length indicated by the union id. It was possible for the union to be referencing memory past the end of the structure. Found by Douglas Bagnall using Hongfuzz and the new fuzz_ndr_X fuzzer. Bug: https://bugzilla.samba.org/show_bug.cgi?id=14206 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* torture: Run durable_v2_reconnect_delay_msec with leasesVolker Lendecke2019-12-101-0/+2
| | | | | | | | | | | | | | | | This will show a leases.tdb record leak. If you SIGSTOP the smbtorture process while it's in the 10-second wait, you will find locking.tdb and share_entries.tdb empty after the scavenger has cleaned up. But there will be an entry in leases.tdb left. I have no clue how to test this properly, or how to have a reasonably cheap assert in smbd during normal operations. The problem is that this leak can't really be distinguished from a "normal" leak that a crashed smbd would leave behind. Possibly we need a background job walking leases.tdb to clean this up properly. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* pidl:NDR/Parser: only include structs in ndr_interface_public_structAndrew Bartlett2019-12-101-1/+0
| | | | | | | | | | | | | 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
* selftest: Confirm that ndrdump struct mode is not available for enumsAndrew Bartlett2019-12-101-0/+1
| | | | | | | | 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>
* CVE-2019-14870: heimdal: enforce delegation_not_allowed in S4U2SelfIsaac Boukris2019-12-101-1/+0
| | | | Signed-off-by: Isaac Boukris <iboukris@gmail.com>
* CVE-2019-14870: heimdal: add S4U test for delegation_not_allowedIsaac Boukris2019-12-101-0/+1
| | | | Signed-off-by: Isaac Boukris <iboukris@gmail.com>
* librpc/ndr: Do not follow a client-supplied NULL pointer in ↵Andrew Bartlett2019-12-101-2/+0
| | | | | | | | | | | | _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>
* selftest: Add ndrdump tests for malformed drsuapi trafficAndrew Bartlett2019-12-101-0/+2
| | | | | | | | | 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>
* smbd: Fix a share_entries.tdb record leakVolker Lendecke2019-12-081-1/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Test cleanup of disconnected durable handle recordsVolker Lendecke2019-12-081-0/+1
| | | | | | | | | | | | | | 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>
* smbd: fix handling of sentinel timestamp valuesRalph Boehme2019-12-061-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | This implements two core changes: * use NTTIME instead of struct timespec at the database layer * use struct timespec { .tv_nsec = SAMBA_UTIME_OMIT } as special sentinel value in smbd when processing timestamps Using NTTIME at the database layer is only done to avoid storing the special struct timespec sentinel values on disk. Instead, with NTTIME the sentinel value for an "unset" timestamp is just 0 on-disk. The NTTIME value of 0 gets translated by nt_time_to_full_timespec() to the struct timespec sentinel value { .tv_nsec = SAMBA_UTIME_OMIT }. The function is_omit_timespec() can be used to check this. Beside nt_time_to_full_timespec(), there are various other new time conversion functions with *full* in their name that can be used to safely convert between different types with the changed sentinel value. BUG: https://bugzilla.samba.org/show_bug.cgi?id=7771 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbclient: use full_timespec_to_nt_time()Ralph Boehme2019-12-061-2/+0
| | | | | | | | | Needed to support dates corresponding to (time_t)0 and (time_t)-1. BUG: https://bugzilla.samba.org/show_bug.cgi?id=7771 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:lib: use nt_time_to_full_timespec() in interpret_long_date()Ralph Boehme2019-12-061-2/+0
| | | | | | | | | | interpret_long_date() is now only used in the client. To enable correct processing of dates before the UNIX epoch, call nt_time_to_full_timespec(). BUG: https://bugzilla.samba.org/show_bug.cgi?id=7771 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>