]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
2 months agoctdb-tests: Add an event script unit test for updateip
Martin Schwenke [Wed, 15 Oct 2025 23:42:22 +0000 (10:42 +1100)] 
ctdb-tests: Add an event script unit test for updateip

This illustrates the current failure where an unassigned public IP
address causes updateip to fail.

After commit 0536d7a98b832fc00d26b09c26bf14fb63dbf5fb (which improves
IP address state checking), this will almost certainly not occur on
platforms with getifaddrs(3) (e.g. Linux).  This means it is only
likely to occur in 4.21 when net.ipv4.ip_nonlocal_bind=1.

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

Reported-by: Bailey Allison <ballison@45drives.com>
Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoctdb-daemon: Fix a crash due to a failed updateip
Martin Schwenke [Wed, 15 Oct 2025 21:17:44 +0000 (08:17 +1100)] 
ctdb-daemon: Fix a crash due to a failed updateip

This should really be a takeip.  However, CTDB's weak check of the IP
address state (using bind(2)) incorrectly indicates that the IP
address is assigned to an interface so it is converted to an updateip.

After commit 0536d7a98b832fc00d26b09c26bf14fb63dbf5fb (which improves
IP address state checking), this will almost certainly not occur on
platforms with getifaddrs(3) (e.g. Linux).  This means it is only
likely to occur in 4.21 when net.ipv4.ip_nonlocal_bind=1.

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

Reported-by: Bailey Allison <ballison@45drives.com>
Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoCVE-2025-9640: s3/modules/vfs_streams_xattr fix unitialized write
Andrew Walker [Thu, 28 Aug 2025 19:36:19 +0000 (19:36 +0000)] 
CVE-2025-9640: s3/modules/vfs_streams_xattr fix unitialized write

This commit fixes a situation in which vfs_streams_xattr could
write unitialized memory into alternate data streams if the
user writes to an offset that is beyond the current end of file
to insert a hole in it.

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

Signed-off-by: Andrew Walker <andrew.walker@truenas.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Oct 16 19:47:19 UTC 2025 on atb-devel-224

2 months agoCVE-2025-9640: Add torture test for inserting hole in stream
Andrew Walker [Thu, 28 Aug 2025 19:39:34 +0000 (19:39 +0000)] 
CVE-2025-9640: Add torture test for inserting hole in stream

This commit adds an smb torture test for inserting a hole into
an alternate data stream and then verifying that hole contains
null bytes.

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

Signed-off-by: Andrew Walker <andrew.walker@truenas.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agosmbtorture: fix regression in smb2.bench
Ralph Boehme [Wed, 15 Oct 2025 14:30:20 +0000 (16:30 +0200)] 
smbtorture: fix regression in smb2.bench

The changes in b6757378be23 caused a regression where only the first
connection was used.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Thu Oct 16 18:42:05 UTC 2025 on atb-devel-224

2 months agotests: Run `dd` without any preloaded libraries
Andreas Schneider [Tue, 14 Oct 2025 09:57:04 +0000 (11:57 +0200)] 
tests: Run `dd` without any preloaded libraries

If AddressSanitizer is loaded it will detect alignment issues. The tool
is not ours, so ignore it.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Thu Oct 16 09:34:58 UTC 2025 on atb-devel-224

2 months agos3:util: Pass a memory context to get_challenge for ntlm_auth tests
Andreas Schneider [Tue, 14 Oct 2025 09:21:42 +0000 (11:21 +0200)] 
s3:util: Pass a memory context to get_challenge for ntlm_auth tests

Fixes memory leaks detected by LeakSanitizer.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agos3:utils: Use a talloc stackframe for diagnose_ntlm_auth()
Andreas Schneider [Tue, 14 Oct 2025 09:20:55 +0000 (11:20 +0200)] 
s3:utils: Use a talloc stackframe for diagnose_ntlm_auth()

This way we can use talloc_tos() and don't leak any memory. This will
make LeakSanitizer happy.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoctdb-tests: Don't hard code creation of $CTDB_BASE/events/legacy/
Martin Schwenke [Sat, 11 Oct 2025 06:52:32 +0000 (17:52 +1100)] 
ctdb-tests: Don't hard code creation of $CTDB_BASE/events/legacy/

setup_ctdb_base() should always create from etc-ctdb/.  That directory
may be changed to not include the legacy/ component subdirectory, so
don't hard-code this particular subdirectory.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Oct 14 17:57:49 UTC 2025 on atb-devel-224

2 months agoctdb-tests: Improve setup_ctdb_base() to fix local_daemons.sh bug
Martin Schwenke [Tue, 7 Oct 2025 11:27:06 +0000 (22:27 +1100)] 
ctdb-tests: Improve setup_ctdb_base() to fix local_daemons.sh bug

$ ctdb/tests/local_daemons.sh foo onnode 0 ctdb event script list legacy
Unable to find event script installation directory: foo/node.0/share/events/legacy

This happens if the $CTDB_BASE/share/events/legacy/ directory does not
exist.  This directory is (theoretically) for installed but not
necessarily enabled event scripts.  ctdb/tests/etc-ctdb/ contains
events/legacy/ but setup_ctdb_base() currently does not ensure
creation of the corresponding directory under $CTDB_BASE/share/.

Ensure that an event script component installation subdirectory exists
for each corresponding configuration subdirectory.

An alternative would be to continue to allow the existing failure, but
create directory ctdb/tests/etc-ctdb/share/events/legacy/ specifically
to make local_daemons.sh work.  However, it took 5 years to find the
current bug, so this may be too subtle for other users of
local_daemons.sh.  Anyone wanting to test the failure case can remove
unwanted subdirectories after "local_daemons.sh setup".

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 months agoctdb-event: Improve error message
Martin Schwenke [Sat, 11 Oct 2025 04:45:09 +0000 (15:45 +1100)] 
ctdb-event: Improve error message

The current message:

  Command script list finished with result=2

does not clearly explain the problem.

Improve it.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 months agoctdb-tests: Reformat with "shfmt -w -i 0 -fn "
Martin Schwenke [Tue, 7 Oct 2025 11:48:40 +0000 (22:48 +1100)] 
ctdb-tests: Reformat with "shfmt -w -i 0 -fn "

Best reviewed with "git show -w".

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 months agos3:libsmb: Fix heap-use-after-free in py_cli_notify_get_changes()
Andreas Schneider [Tue, 14 Oct 2025 09:33:00 +0000 (11:33 +0200)] 
s3:libsmb: Fix heap-use-after-free in py_cli_notify_get_changes()

==556308==ERROR: AddressSanitizer: heap-use-after-free on address 0x7d2f14452360 at pc 0x7baf0a5c3a8b bp 0x7ffe6e1eb2e0 sp 0x7ffe6e1eb2d8                      11:26:39 [1226/65848]
READ of size 4 at 0x7d2f14452360 thread T0
    #0 0x7baf0a5c3a8a in py_cli_notify_get_changes ../../source3/libsmb/pylibsmb.c:2291
    #1 0x7faf165ba239  (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x1ba239) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #2 0x7faf1658c798 in PyObject_Vectorcall (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x18c798) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #3 0x7faf165a366e in _PyEval_EvalFrameDefault (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x1a366e) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #4 0x7faf165db031  (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x1db031) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #5 0x7faf1659fa1d in _PyEval_EvalFrameDefault (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x19fa1d) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #6 0x7faf1658ce9b  (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x18ce9b) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #7 0x7faf1667a637  (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x27a637) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #8 0x7faf1658a726 in _PyObject_MakeTpCall (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x18a726) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #9 0x7faf1659ae9b in _PyEval_EvalFrameDefault (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x19ae9b) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #10 0x7faf165db031  (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x1db031) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #11 0x7faf1659fa1d in _PyEval_EvalFrameDefault (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x19fa1d) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #12 0x7faf1658ce9b  (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x18ce9b) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #13 0x7faf1667a637  (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x27a637) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #14 0x7faf1658a726 in _PyObject_MakeTpCall (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x18a726) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #15 0x7faf1659ae9b in _PyEval_EvalFrameDefault (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x19ae9b) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #16 0x7faf165db031  (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x1db031) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #17 0x7faf1659fa1d in _PyEval_EvalFrameDefault (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x19fa1d) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #18 0x7faf1658ce9b  (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x18ce9b) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #19 0x7faf1667a637  (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x27a637) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #20 0x7faf1658a726 in _PyObject_MakeTpCall (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x18a726) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #21 0x7faf1659e0ae in _PyEval_EvalFrameDefault (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x19e0ae) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #22 0x7faf165db031  (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x1db031) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #23 0x7faf1659fa1d in _PyEval_EvalFrameDefault (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x19fa1d) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #24 0x7faf1658ce9b  (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x18ce9b) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #25 0x7faf1667a637  (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x27a637) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #26 0x7faf1658a726 in _PyObject_MakeTpCall (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x18a726) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #27 0x7faf1659e0ae in _PyEval_EvalFrameDefault (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x19e0ae) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #28 0x7faf1658cf1b  (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x18cf1b) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #29 0x7faf165c3c5a  (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x1c3c5a) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #30 0x7faf1658a9b5  (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x18a9b5) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #31 0x7faf1658a726 in _PyObject_MakeTpCall (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x18a726) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #32 0x7faf165a366e in _PyEval_EvalFrameDefault (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x1a366e) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #33 0x7faf1662f875 in PyEval_EvalCode (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x22f875) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #34 0x7faf166498fc  (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x2498fc) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #35 0x7faf165b17fe  (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x1b17fe) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #36 0x7faf1658c798 in PyObject_Vectorcall (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x18c798) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #37 0x7faf1659e0ae in _PyEval_EvalFrameDefault (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x19e0ae) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #38 0x7faf16664a89  (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x264a89) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #39 0x7faf16663a38 in Py_RunMain (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x263a38) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #40 0x7faf1661e3b5 in Py_BytesMain (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x21e3b5) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)
    #41 0x7faf1602b2fa in __libc_start_call_main (/lib64/libc.so.6+0x2b2fa) (BuildId: 8523b213e7586a93ab00f6dd476418b1e521e62c)
    #42 0x7faf1602b3ca in __libc_start_main_impl (/lib64/libc.so.6+0x2b3ca) (BuildId: 8523b213e7586a93ab00f6dd476418b1e521e62c)
    #43 0x564f2695f074 in _start (/usr/bin/python3.13+0x1074) (BuildId: 381e7a168bb2c479b5b88bcfd875777e342d6b45)

0x7d2f14452360 is located 736 bytes inside of 861-byte region [0x7d2f14452080,0x7d2f144523dd)
freed by thread T0 here:
    #0 0x7faf16d208eb  (/lib64/libasan.so.8+0x1208eb) (BuildId: 61b31c4760766f5f2552c32e175755894d8f6565)
    #1 0x7faf14560a72 in _tc_free_poolmem ../../lib/talloc/talloc.c:1080
    #2 0x7faf1455f71b in _tc_free_internal ../../lib/talloc/talloc.c:1215
    #3 0x7faf1455ee1b in _tc_free_children_internal ../../lib/talloc/talloc.c:1669
    #4 0x7faf1455ee1b in _tc_free_internal ../../lib/talloc/talloc.c:1184
    #5 0x7faf14560315 in _talloc_free_internal ../../lib/talloc/talloc.c:1248
    #6 0x7faf14560315 in _talloc_free ../../lib/talloc/talloc.c:1792
    #7 0x7baf0a5c3883 in py_cli_notify_get_changes ../../source3/libsmb/pylibsmb.c:2274
    #8 0x7faf165ba239  (/lib64/glibc-hwcaps/x86-64-v3/libpython3.13.so.1.0+0x1ba239) (BuildId: 3925b60e845f4803e4de04e1fdf7845f2e54ecb0)

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Oct 14 12:35:37 UTC 2025 on atb-devel-224

2 months agovfs_fake_acls: Fix error path return in fake_acls_fstatat()
Volker Lendecke [Mon, 13 Oct 2025 09:18:35 +0000 (11:18 +0200)] 
vfs_fake_acls: Fix error path return in fake_acls_fstatat()

Thanks to Jeremy for pointing this out to me!

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Oct 14 08:27:39 UTC 2025 on atb-devel-224

2 months agos4:torture:vfs:fruit fix Clang compilation issue
Gary Lockyer [Sun, 12 Oct 2025 20:46:16 +0000 (09:46 +1300)] 
s4:torture:vfs:fruit fix Clang compilation issue

Fix:

[4176/4995] Compiling source4/torture/vfs/fruit.c
../../source4/torture/vfs/fruit.c:7900:2: error: variable 'h' is used
    uninitialized whenever 'if' condition is true
    [-Werror,-Wsometimes-uninitialized]
 7900 |         CHECK_STATUS(status, NT_STATUS_OK);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Mon Oct 13 04:42:16 UTC 2025 on atb-devel-224

2 months agos4:kdc:db-glue-tests Fix CID 1666664
Gary Lockyer [Sun, 12 Oct 2025 20:44:49 +0000 (09:44 +1300)] 
s4:kdc:db-glue-tests Fix CID 1666664

Fix Coverity issue CID 1666664

115      char* ts = ldb_timestring(msg, created);
>>>     CID 1666664:         Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing a pointer that might be "NULL" "ts" when calling
>>>     "ldb_msg_add_string".
116      ldb_msg_add_string(msg, "whenCreated", ts);

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 months agosmbd: only increment lease epoch if a lease was granted
Ralph Boehme [Tue, 23 Sep 2025 12:14:22 +0000 (14:14 +0200)] 
smbd: only increment lease epoch if a lease was granted

From MS-SMB2 3.3.5.9.11 "Handling the SMB2_CREATE_REQUEST_LEASE_V2 Create
Context":

  If the object store succeeds this request, Lease.LeaseState MUST be set to the
  new caching state.  The server MUST increment Lease.Epoch by 1.

try_lease_upgrade() already has the same logic when checking for a possible
upgrade of an exisiting lease.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Oct 10 17:02:26 UTC 2025 on atb-devel-224

2 months agosmbtorture: add test "smb2.lease.lease-epoch"
Ralph Boehme [Sat, 27 Sep 2025 11:01:32 +0000 (13:01 +0200)] 
smbtorture: add test "smb2.lease.lease-epoch"

Verifies the lease epoch is not incremented by the server (returns what the
client sent in the request) if a lease was not granted ie lease_level=NONE.

Test passes against Windows 2025.

From MS-SMB2 3.3.5.9.11 "Handling the SMB2_CREATE_REQUEST_LEASE_V2 Create
Context":

  If the object store succeeds this request, Lease.LeaseState MUST be set to the
  new caching state.  The server MUST increment Lease.Epoch by 1.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agosmbtorture: correctly handle scale-out shares in smb2.durable-v2-open.[persistent...
Ralph Boehme [Sat, 4 Aug 2018 14:40:14 +0000 (16:40 +0200)] 
smbtorture: correctly handle scale-out shares in smb2.durable-v2-open.[persistent-]open-oplock

This ensures the tests work correctly against Windows on cluster shares with and
without SMB2_SHARE_CAP_SCALEOUT.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agosmbtorture: correctly handle scale-out shares in smb2.durable-v2-open.create-blob
Ralph Boehme [Fri, 28 Feb 2025 05:15:26 +0000 (06:15 +0100)] 
smbtorture: correctly handle scale-out shares in smb2.durable-v2-open.create-blob

On a share with SMB2_SHARE_CAP_SCALEOUT capability the cluster doesn't
grant batch oplocks, at most level-II oplocks and it also doesn't
grant durable-handles (v1 or v2) as they require an RWH-lease.

With this change the test passes against Windows Server 2025.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agosmbtorture: fix smb2.durable-v2-open.open-lease and smb2.durable-v2-open.persistent...
Ralph Boehme [Wed, 9 May 2018 06:25:51 +0000 (08:25 +0200)] 
smbtorture: fix smb2.durable-v2-open.open-lease and smb2.durable-v2-open.persistent-open-lease

Only check the resulting lease state if we actually requested a lease and
correctly deal with SMB2_SHARE_CAP_SCALEOUT shares where the server grants at
most R leases and no Durable Handles.

With this change the test passes against Windows Server 2025.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agosmbstatus: avoid a crash with --json output if the access_mask has SEC_STD_WRITE_OWNER
Ralph Boehme [Wed, 16 Jul 2025 14:50:25 +0000 (16:50 +0200)] 
smbstatus: avoid a crash with --json output if the access_mask has SEC_STD_WRITE_OWNER

This was missing in access_mask[] triggering an assert when printing the access
mask string:

 ...
 #4  0x00007ffff79553cc in smb_panic (why=0x207b5c "assert failed: tomap == 0") at ../../lib/util/fault.c:209
 #5  0x000000000021ea2c in map_mask_to_json (root_json=0x7fffffffcd60, tomap=524288, table=0x223440 <access_mask>) at ../../source3/utils/status_json.c:142
 ...

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agosmbd: avoid clobbering the file size, use info instead
Ralph Boehme [Wed, 24 Sep 2025 17:30:08 +0000 (19:30 +0200)] 
smbd: avoid clobbering the file size, use info instead

This is a better implementation of 215b2c741a93023d13e8a9f82739ac3e91b64a66 and
also prepares for future changes where I'll need the current size.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agosmbd: move lp_locking() check inside file_has_brlocks()
Ralph Boehme [Mon, 22 Sep 2025 15:28:23 +0000 (17:28 +0200)] 
smbd: move lp_locking() check inside file_has_brlocks()

Avoids doing the check at every caller.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agosmbd: remove remnants from write cache handling which was removed a long time ago
Ralph Boehme [Wed, 1 Oct 2025 09:45:43 +0000 (11:45 +0200)] 
smbd: remove remnants from write cache handling which was removed a long time ago

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agos3:smbd: remove an else branch in exit_server_common()
Ralph Boehme [Sun, 25 Feb 2018 08:48:53 +0000 (09:48 +0100)] 
s3:smbd: remove an else branch in exit_server_common()

No change in behaviour.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agosmbd: fix handing of oplock_request and INTERNAL_OPEN_ONLY
Ralph Boehme [Sun, 24 Aug 2025 06:45:39 +0000 (08:45 +0200)] 
smbd: fix handing of oplock_request and INTERNAL_OPEN_ONLY

Avoid overwriting INTERNAL_OPEN_ONLY in oplock_request and fix setting
oplock_request to INTERNAL_OPEN_ONLY.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agos3/rpc_server: fix "log file = %m"
Ralph Boehme [Sat, 27 Sep 2025 10:02:35 +0000 (12:02 +0200)] 
s3/rpc_server: fix "log file = %m"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agosmbd-scavenger: call set_remote_machine_name()
Ralph Boehme [Sat, 27 Sep 2025 09:32:29 +0000 (11:32 +0200)] 
smbd-scavenger: call set_remote_machine_name()

Makes "log file = %m" work.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agosmbd-cleanupd: call set_remote_machine_name() and reopen_logs()
Ralph Boehme [Sat, 27 Sep 2025 09:32:02 +0000 (11:32 +0200)] 
smbd-cleanupd: call set_remote_machine_name() and reopen_logs()

Makes "log file = %m" work.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agosmbd-notifyd: call set_remote_machine_name()
Ralph Boehme [Sat, 27 Sep 2025 09:31:04 +0000 (11:31 +0200)] 
smbd-notifyd: call set_remote_machine_name()

Makes "log file = %m" work.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agos3/locking: comment reformatting
Ralph Boehme [Thu, 17 Jul 2025 09:23:34 +0000 (11:23 +0200)] 
s3/locking: comment reformatting

Prepares for upcoming changes.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agosmbd: use op->global->open_global_id for the share_mode_entry.share_file_id
Ralph Boehme [Thu, 9 Oct 2025 13:27:31 +0000 (15:27 +0200)] 
smbd: use op->global->open_global_id for the share_mode_entry.share_file_id

open_global_id is an uint32_t, share_file_id is an uint64_t.

For internal opens that don't have an smbXsrv_open_global.tdb entry, continue to
use a generation counter starting at UINT32_MAX + 1.

We don't expose internal opens via srvsrc, which imposes the requirement for
using an uint32_t, so we can use larger ids for the internal opens as srvsvc
never sees them (as they're not in smbXsrv_open_global.tdb and srvsvc as any
other component listing open files like smbstatus lists smbXsrv_open_global.tdb).

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Oct 10 11:43:16 UTC 2025 on atb-devel-224

2 months agosmbd: move calling fsp_set_gen_id() to fsp_bind_smb()
Ralph Boehme [Thu, 9 Oct 2025 13:17:38 +0000 (15:17 +0200)] 
smbd: move calling fsp_set_gen_id() to fsp_bind_smb()

No change in behaviour. fsp_set_gen_id() sets the primary key for the
share_mode_entry of the corresponding open file handle. None of the pathref fsp
needs that before being passed to SMB_VFS_CREATE_FILE().

As file_new() calls fsp_bind_smb(), all fsps will get an id when
create_file_unixpath() either calls file_new when creating files or it calls
fsp_bind_smb() when "converting" an pathref fsp that was passed into
SMB_VFS_CREATE_FILE() to an FSA fsp.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agomdssvc: implement elasticsearch:default_fields
Ralph Boehme [Mon, 1 Sep 2025 12:55:04 +0000 (14:55 +0200)] 
mdssvc: implement elasticsearch:default_fields

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agomdssvc: fix filtering by share path prefix
Ralph Boehme [Thu, 4 Sep 2025 15:41:44 +0000 (17:41 +0200)] 
mdssvc: fix filtering by share path prefix

To correctly filter by share path, use a filter with a prefix match.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agomdssvc: fix running test command manually
Ralph Boehme [Thu, 2 Oct 2025 15:08:55 +0000 (17:08 +0200)] 
mdssvc: fix running test command manually

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agovfs_fruit: ignore Set-ACL requests with zero ACEs
Ralph Boehme [Sat, 6 Sep 2025 06:48:44 +0000 (08:48 +0200)] 
vfs_fruit: ignore Set-ACL requests with zero ACEs

Workaround for a new behaviour in latest macOS versions.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agosmbd: hang directory pattern matching case sensitivity on the pathname
Ralph Boehme [Thu, 18 Sep 2025 18:35:22 +0000 (20:35 +0200)] 
smbd: hang directory pattern matching case sensitivity on the pathname

For the SMB3 POSIX client both posix_open=true and (fsp->fsp_name->flags &
SMB_FILENAME_POSIX_PATH) will always be the case, so this is no change in
behaviour for that case.

However, for the macOS client fruit will carefully setup both flags as
posix_open=true but SMB_FILENAME_POSIX_PATH will not be set.

This is a deliberate hack to give the macOS client POSIX behaviour for some
operations, but not for others, while also allowing the POSIX-ified macOS client
to continue to get case insensitive behavour.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agosmbd: hang posix brl per-handle check on the pathname
Ralph Boehme [Thu, 18 Sep 2025 21:44:34 +0000 (23:44 +0200)] 
smbd: hang posix brl per-handle check on the pathname

For the SMB3 POSIX client both posix_open=true and (fsp->fsp_name->flags &
SMB_FILENAME_POSIX_PATH) will always be the case, so this is no change in
behaviour for that case.

However, for the macOS client fruit will carefully setup both flags as
posix_open=true but SMB_FILENAME_POSIX_PATH will not be set.

This is a deliberate hack to give the macOS client POSIX behaviour for some
operations, but not for others, while also allowing the POSIX-ified macOS client
to continue to get case insensitive behavour.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agovfs_fruit: add option "fruit:posix_opens = yes|no" (default: yes)
Ralph Boehme [Mon, 10 Mar 2025 14:01:42 +0000 (15:01 +0100)] 
vfs_fruit: add option "fruit:posix_opens = yes|no" (default: yes)

Tags alls opens as POSIX by setting fsp_flags.posix_open to true.

POSIX handles have different behaviour compared to Windows:

Behaviour                          | POSIX      | Windows    | macOS     |fruit:posix_opens = yes
-----------------------------------+------------+----------------------------------------
Deleting files with open handles   | yes        | no         | yes       | yes
Moving directories with open files | yes        | no         | yes       | yes
Byterange locks behaviour          | POSIX-ish  | Window-ish | POSIX-ish | POSIX-ish
Sticky writetime                   | no         | yes        | no        | no
Case sensitive                     | no         | yes        | yes       | yes
Streams allowed                    | no         | yes        | yes       | yes

macOS follows POSIX for the first four, but needs case insensitive behaviour
and needs streams.

By carefully setting fsp_flags.posix_open to true *after* going through the path
resolution logic, but before opens are added to locking.tdb, with
"fruit:posix_opens = yes" we get closest to macOS semantics.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agosmbtorture: add test vfs.fruit.case_insensitive_find
Ralph Boehme [Fri, 19 Sep 2025 04:43:57 +0000 (06:43 +0200)] 
smbtorture: add test vfs.fruit.case_insensitive_find

Verifies case insensitive directory scanning works.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agosmbtorture: add test vfs.fruit.readonly-exclusive-lock
Ralph Boehme [Thu, 18 Sep 2025 22:20:43 +0000 (00:20 +0200)] 
smbtorture: add test vfs.fruit.readonly-exclusive-lock

Verify macOS clients get Windows byterange lock behavour by trying to set an
exclusive lock on a file opened in read-only mode.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agosmbd: don't use sticky write times on POSIX handles
Ralph Boehme [Fri, 1 Aug 2025 15:28:04 +0000 (17:28 +0200)] 
smbd: don't use sticky write times on POSIX handles

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agosmbtorture: fix locking offset in test_fruit_locking_conflict()
Ralph Boehme [Wed, 13 Aug 2025 15:02:16 +0000 (17:02 +0200)] 
smbtorture: fix locking offset in test_fruit_locking_conflict()

AD_FILELOCK_RSRC_DENY_WR = AD_FILELOCK_BASE + 6
 = (0x7FFFFFFFFFFFFFFF - 9) + 6
 = 0x7FFFFFFFFFFFFFFC

No change in behaviour though, just stumpled across it.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agovfs_fake_acls: Call fake_acls_fstatat() from fake_acls_[l]stat()
Volker Lendecke [Sat, 4 Oct 2025 16:55:42 +0000 (18:55 +0200)] 
vfs_fake_acls: Call fake_acls_fstatat() from fake_acls_[l]stat()

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): Fri Oct 10 09:26:47 UTC 2025 on atb-devel-224

2 months agovfs_fake_acls: Implement fake_acls_fstatat()
Volker Lendecke [Sat, 4 Oct 2025 16:51:20 +0000 (18:51 +0200)] 
vfs_fake_acls: Implement fake_acls_fstatat()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 months agovfs_fake_acls: Reduce indentation in fake_acls_stat()
Volker Lendecke [Sat, 4 Oct 2025 16:36:47 +0000 (18:36 +0200)] 
vfs_fake_acls: Reduce indentation in fake_acls_stat()

Use an early error return

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 months agovfs_fake_acls: Reduce indentation in fake_acls_lstat()
Volker Lendecke [Sat, 4 Oct 2025 16:32:55 +0000 (18:32 +0200)] 
vfs_fake_acls: Reduce indentation in fake_acls_lstat()

Use an early return

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 months agovfs_fake_acls: Reduce indentation in fake_acls_stat()
Volker Lendecke [Sat, 4 Oct 2025 16:31:36 +0000 (18:31 +0200)] 
vfs_fake_acls: Reduce indentation in fake_acls_stat()

Use an early return

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 months agovfs_fake_acls: Introduce fake_acls_fuidgid()
Volker Lendecke [Sat, 4 Oct 2025 16:28:46 +0000 (18:28 +0200)] 
vfs_fake_acls: Introduce fake_acls_fuidgid()

The callers want both

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 months agovfs_streams_depot: Use NEXT_UNLINKAT when deleting a stream
Volker Lendecke [Thu, 2 Oct 2025 12:09:50 +0000 (14:09 +0200)] 
vfs_streams_depot: Use NEXT_UNLINKAT when deleting a stream

With other modules in the chain funny things can happen

I don't have a concrete bug that I could write a test for, but with
the upcoming patches this becomes necessary.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 months agos4:kdc:sdb_to_hdb strong/flexible certificate mappings
Gary Lockyer [Sun, 7 Sep 2025 22:29:36 +0000 (10:29 +1200)] 
s4:kdc:sdb_to_hdb strong/flexible certificate mappings

Map the content of sdb_certificate_mappings to the hdb extension
HDB_Ext_CertificateMapping

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Autobuild-User(master): Jennifer Sutton <jsutton@samba.org>
Autobuild-Date(master): Fri Oct 10 02:30:06 UTC 2025 on atb-devel-224

2 months agos4:kdc:sdb Support Windows flexible cert mappings
Gary Lockyer [Mon, 1 Sep 2025 21:59:13 +0000 (09:59 +1200)] 
s4:kdc:sdb Support Windows flexible cert mappings

Extract certificate mappings from the altSecurityIdentities attribute and
populate the new sdb_certificate_mappings element of sdb

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
2 months agotests:s4:kdc Add tests for pkinit certificate mapping
Gary Lockyer [Mon, 22 Sep 2025 03:40:58 +0000 (15:40 +1200)] 
tests:s4:kdc Add tests for pkinit certificate mapping

Tests for pkinit with "strong certificate binding enforcement"
See: https://support.microsoft.com/en-us/topic/
     kb5014754-certificate-based-authentication-changes-on-windows-domain
     -controllers-ad2c23b0-15d8-4340-a468-4d4f3b188f16

     KB5014754: Certificate-based authentication changes on Windows
     domain controllers

Test environment configuration:
   ad_dc       none
   ad_dc_ntcfs compatibility
   ad_dc_smb1  full

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
2 months agopython:domain:user Add altSecurityIdentities
Gary Lockyer [Mon, 22 Sep 2025 03:42:31 +0000 (15:42 +1200)] 
python:domain:user Add altSecurityIdentities

Add altSecurityIdentities to the User domain model so that it can be used by
the key certificate binding enforcement tests.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
2 months agoselftest: Add certificate binding configuration
Gary Lockyer [Mon, 22 Sep 2025 03:45:27 +0000 (15:45 +1200)] 
selftest: Add certificate binding configuration

Configure the ad_dc and ad_dc_ntvfs test environments for pkinit certificate
binding tests:

ad_dc_ntvfs:
strong certificate binding enforcement = compatibility
certificate backdating compensation = 1500

To allow testing of compatibility mode

ad_dc:
strong certificate binding enforcement = none

To test no enforcement, and to avoid breaking existing kerberos tests

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
2 months agoconfig: add certificate backdating compensation
Gary Lockyer [Thu, 28 Aug 2025 23:05:10 +0000 (11:05 +1200)] 
config: add certificate backdating compensation

When preforming certificate based kerberos authentication (PKINIT) with
"strong certificate binding enforcement = compatibility"", for WEAK mappings
the certificate issue date must be after the date the user record was created.

This parameter relaxes that constraint by allowing the certificate to have been
issued up to the specified number of minutes before the user record was created.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
2 months agoconfig: add strong certificate binding enforcement
Gary Lockyer [Thu, 28 Aug 2025 01:07:01 +0000 (13:07 +1200)] 
config: add strong certificate binding enforcement

This parameter controls the enforcement of Windows Certificate bindings as
outlined in "KB5014754: Certificate-based authentication changes on Windows
domain controllers",
when preforming certificate based kerberos authentication (PKINIT)

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
2 months agodocs: smb.conf: add auth info audit logging
Douglas Bagnall [Wed, 8 Oct 2025 01:29:13 +0000 (14:29 +1300)] 
docs: smb.conf: add auth info audit logging

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2 months agoWHATSNEW: auth info audit logging
Douglas Bagnall [Wed, 8 Oct 2025 01:28:29 +0000 (14:28 +1300)] 
WHATSNEW: auth info audit logging

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2 months agos4:dsdb:audit_log clean up doc comments
Gary Lockyer [Mon, 6 Oct 2025 03:04:41 +0000 (16:04 +1300)] 
s4:dsdb:audit_log clean up doc comments

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 months agos4:dsdb:audit_log change action for auth info
Gary Lockyer [Mon, 6 Oct 2025 01:28:19 +0000 (14:28 +1300)] 
s4:dsdb:audit_log change action for auth info

Change the action logged for authentication information changes from
"Public key change" to "Auth info change". To reflect that it's not just
changes to public keys that get logged.

This doesn't require a JSON log format version change, because the
version was recently bumped in c9e752ab18f43758d704951f7f31e39dafa6fdb4
and there hasn't been a Samba release in the meantime.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 months agos4:dsdb:audit_log log auth info changes
Gary Lockyer [Mon, 6 Oct 2025 00:06:12 +0000 (13:06 +1300)] 
s4:dsdb:audit_log log auth info changes

Log changes to altSecurityIdentities, dNSHostName, msDS-additionalDnsHostNames
and servicePrincipal name in the same way that changes to mdDS-keyCredentialLink
changes are logged.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 months agotests:audit_log_pass_change add tests for auth info logging
Gary Lockyer [Sun, 5 Oct 2025 23:46:44 +0000 (12:46 +1300)] 
tests:audit_log_pass_change add tests for auth info logging

Add tests for the logging of changes to altSecurityIdentities, dnsHostName,
servicePrincipalName and msDS-AdditionalDnsHostNames

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 months agotests:audit_log_pass_change refactor the tests
Gary Lockyer [Sun, 5 Oct 2025 21:29:28 +0000 (10:29 +1300)] 
tests:audit_log_pass_change refactor the tests

Refactor python/samba/tests/audit_log_pass_change.py to make it easier add tests
for the logging of changes to alternateSecurityIdentities, dNSHostName,
servicePrincipleName

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 months agothird_party:heimdal: import lorikeet-heimdal-202509242121
Gary Lockyer [Mon, 29 Sep 2025 23:25:51 +0000 (12:25 +1300)] 
third_party:heimdal: import lorikeet-heimdal-202509242121

(commit beffefde5c6767589603cca98065378250eaae2c)

Changes to heimdal to implement Windows strong and flexible certificate mapping
as outlined in

KB5014754: Certificate-based authentication changes
           on Windows domain controllers
https://support.microsoft.com/en-us/topic/kb5014754-certificate-based-
                                          authentication-changes-on-windows-
                                          domain-controllers-
                                          ad2c23b0-15d8-4340-a468-4d4f3b188f16

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Autobuild-User(master): Jennifer Sutton <jsutton@samba.org>
Autobuild-Date(master): Wed Oct  8 21:12:44 UTC 2025 on atb-devel-224

2 months agovfs_fruit: Call fruit_fstatat() from fruit_[l]stat()
Volker Lendecke [Thu, 2 Oct 2025 19:56:59 +0000 (21:56 +0200)] 
vfs_fruit: Call fruit_fstatat() from fruit_[l]stat()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Oct  8 09:02:25 UTC 2025 on atb-devel-224

2 months agovfs_fruit: Implement fstatat
Volker Lendecke [Thu, 2 Oct 2025 10:45:18 +0000 (12:45 +0200)] 
vfs_fruit: Implement fstatat

This violates the abstraction in adouble.[ch], but passing "dirfsp"
and "relname" through ad_get() & friends would have been a more churn,
and with this violation of abstraction we only do fgetxattr once where
with a separate update_btime we do it twice. So in theory it should be
more efficient.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 months agolib: Add adouble_buf_parse()
Volker Lendecke [Thu, 2 Oct 2025 08:38:24 +0000 (10:38 +0200)] 
lib: Add adouble_buf_parse()

Simplified version of ad_get that takes a buffer and does basic parsing of an
AppleDouble file format. The entries are represented as DATA_BLOBs directly
pointing at "buf" to avoid offset calculations in users of this.

Yes, this is a duplication of logic, but it makes the next patch
possible. Future patches could use this in ad_unpack()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 months agovfs_fruit: Use all_zero() to check for an all-0 buffer
Volker Lendecke [Wed, 1 Oct 2025 15:23:16 +0000 (17:23 +0200)] 
vfs_fruit: Use all_zero() to check for an all-0 buffer

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 months agovfs_fruit: Fix signed/unsigned comparison warnings
Volker Lendecke [Tue, 30 Sep 2025 10:24:51 +0000 (12:24 +0200)] 
vfs_fruit: Fix signed/unsigned comparison warnings

It also factors out the tevent_req_post() in pread/pwrite_send()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 months agovfs_fruit: Modernize a DEBUG
Volker Lendecke [Tue, 30 Sep 2025 09:35:56 +0000 (11:35 +0200)] 
vfs_fruit: Modernize a DEBUG

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 months agolib: Simplify data definitions
Volker Lendecke [Mon, 29 Sep 2025 19:40:58 +0000 (21:40 +0200)] 
lib: Simplify data definitions

C calculates the array size itself

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 months agolib: Avoid a talloc_zero in afpinfo_new()
Volker Lendecke [Mon, 29 Sep 2025 17:25:41 +0000 (19:25 +0200)] 
lib: Avoid a talloc_zero in afpinfo_new()

Use a struct assignment.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 months agovfs_fruit: Make struct allocation in fruit_freaddir_attr() more common
Volker Lendecke [Mon, 29 Sep 2025 12:33:18 +0000 (14:33 +0200)] 
vfs_fruit: Make struct allocation in fruit_freaddir_attr() more common

Just assign the output buffer on success

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 months agolib: Fix typos
Volker Lendecke [Sat, 27 Sep 2025 07:59:33 +0000 (09:59 +0200)] 
lib: Fix typos

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 months agolib: Slightly simplify ad_read_rsrc_adouble()
Volker Lendecke [Thu, 2 Oct 2025 09:46:40 +0000 (11:46 +0200)] 
lib: Slightly simplify ad_read_rsrc_adouble()

We have the MIN() macro for this

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 months agovfs_fruit: Slightly simplify readdir_attr_meta_finderi_stream()
Volker Lendecke [Mon, 29 Sep 2025 11:38:55 +0000 (13:38 +0200)] 
vfs_fruit: Slightly simplify readdir_attr_meta_finderi_stream()

"&buf[0]" is equivalent to just "buf" in this case

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 months agomdssvc: call mangle_reset_cache()
Ralph Boehme [Tue, 7 Oct 2025 14:13:43 +0000 (16:13 +0200)] 
mdssvc: call mangle_reset_cache()

Bug: https://bugzilla.samba.org/show_bug.cgi?id=15931
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Oct  8 07:54:48 UTC 2025 on atb-devel-224

2 months agoctdb-event: Replace "no data" event scripts with previous data
Martin Schwenke [Mon, 29 Sep 2025 07:24:53 +0000 (17:24 +1000)] 
ctdb-event: Replace "no data" event scripts with previous data

If an event script list contains results with "no data" (summary ==
-ENODATA), then overwrite these with results from the previous run,
where possible.

To maintain current behaviour in "ctdb event status ...", stop
processing scripts if the begin timestamp in the list goes backwards.
This maintains backward compatibility, where only status for scripts
from the most recent run are shown.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Oct  7 11:09:41 UTC 2025 on atb-devel-224

2 months agoctdb-event: Don't replace an existing result with NULL
Martin Schwenke [Fri, 26 Sep 2025 05:58:26 +0000 (15:58 +1000)] 
ctdb-event: Don't replace an existing result with NULL

If script_list is NULL then event->script_list is set to NULL by
TALLOC_FREE().  This seems like the wrong thing to do because NULL
indicates a problem running the current event.  We should keep the
previous result because it contains useful information.

In theory, this can't happen because the caller checks for NULL.
However, given that the check is here, it might as well do the right
thing... and this simplifies a subsequent change.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 months agoctdb-common: Make run_event return full script list
Martin Schwenke [Mon, 29 Sep 2025 05:24:10 +0000 (15:24 +1000)] 
ctdb-common: Make run_event return full script list

run_event currently truncates the resulting script list after the
first failure.

Instead, return the full script list, with scripts that weren't run
flagged with ENODATA in their summary.  This structure is zeroed on
allocation, so this is the only field that needs to be set.

For now, have the event tool skip such scripts.  Do this in
print_status() instead of print_status_one(), since there will soon be
additional checks in print_status() and it makes sense to put them
together.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 months agoctdb-common: Factor out new function run_event_fail()
Martin Schwenke [Mon, 29 Sep 2025 04:58:01 +0000 (14:58 +1000)] 
ctdb-common: Factor out new function run_event_fail()

Mostly due to future indentation requirements.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
2 months agogpfs: Fetch GPFS DOS attributes asynchronously
Pawan Sahu [Fri, 20 Jun 2025 03:42:01 +0000 (05:42 +0200)] 
gpfs: Fetch GPFS DOS attributes asynchronously

This change introduces asynchronous handling of GPFS DOS attributes
using the pthreadpool infrastructure. This is part of the overall
effort to improve SMB directory listing performance in environments
with GPFS as the backend filesystem.

Signed-off-by: Pawan Sahu <Pawan.Sahu1@ibm.com>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Tue Sep 30 13:08:16 UTC 2025 on atb-devel-224

2 months agosmbd: Add vfswrap_check_async_with_thread_creds() helper
Pawan Sahu [Wed, 4 Jun 2025 06:13:08 +0000 (08:13 +0200)] 
smbd: Add vfswrap_check_async_with_thread_creds() helper

Move the logic that checks for sufficient threads and per-thread credential
support into a dedicated helper function: vfswrap_check_async_with_thread_creds().

Signed-off-by: Pawan Sahu <Pawan.Sahu1@ibm.com>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2 months agosmbd: Introduce struct vfs_pthread_pool_job_state
Pawan Sahu [Fri, 9 May 2025 06:19:03 +0000 (23:19 -0700)] 
smbd: Introduce struct vfs_pthread_pool_job_state

Refactor the vfswrap_getattrat_state structure by extracting the members
specific to pthreadpool job handling into a new struct vfs_pthread_pool_job_state.
This improves code clarity and allows reuse of the job-related
state in other contexts.

Signed-off-by: Pawan Sahu <Pawan.Sahu1@ibm.com>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2 months agolib: Add a safeguard for misconfigured directory permissions
Volker Lendecke [Fri, 26 Sep 2025 11:56:37 +0000 (13:56 +0200)] 
lib: Add a safeguard for misconfigured directory permissions

An installation I've seen had the path to the msg.lock directory set
up such that only root could access it. We're calling
serverid_exists() as non-root, so this is a pretty bad error. Log this
as an error in syslog by default and assume this PID still exists.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Sep 29 08:14:22 UTC 2025 on atb-devel-224

2 months agolib: Remove an #include "includes.h"
Volker Lendecke [Fri, 26 Sep 2025 11:52:14 +0000 (13:52 +0200)] 
lib: Remove an #include "includes.h"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agolib/util: Fix CID 1414760 - Resource leak
Shweta Sodani [Mon, 22 Sep 2025 09:06:58 +0000 (14:36 +0530)] 
lib/util: Fix CID 1414760 - Resource leak

If read is failed torture_assert could return without freeing the t.
Fixing the leak.

Signed-off-by: Shweta Sodani <ssodani@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Sun Sep 28 09:30:56 UTC 2025 on atb-devel-224

2 months agolib:crypto: Use gnutls_cipher_decrypt3() if possible
Andreas Schneider [Wed, 10 Sep 2025 08:12:02 +0000 (10:12 +0200)] 
lib:crypto: Use gnutls_cipher_decrypt3() if possible

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Sep 26 18:38:57 UTC 2025 on atb-devel-224

2 months agolib:crypto: Use gnutls_cipher_encrypt3() if possible
Andreas Schneider [Wed, 10 Sep 2025 08:07:40 +0000 (10:07 +0200)] 
lib:crypto: Use gnutls_cipher_encrypt3() if possible

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agos3/rpc_server/samr: fix CID 1509008 - time_t truncation
Xavi Hernandez [Thu, 25 Sep 2025 08:42:30 +0000 (10:42 +0200)] 
s3/rpc_server/samr: fix CID 1509008 - time_t truncation

The call to get_time_t_max() doesn't work as expected when time_t is a
64-bits type and the returned value is stored into a 32-bits unsigned
integer. Truncating a 64-bits constant to a 32-bits number won't return,
in general, the same value we would get if time_t were a 32-bits type.
It's unsafe and could even return small numbers very far from the
intended maximum.

This patch completely avoids the need to use get_time_t_max() by
assuming that when pwd_max_age is 0 or -1, it means no maximum age is
defined, so the password never expires and we don't need to do any
comparison.

A small adjustment has also been made to avoid calling
pdb_get_account_policy() if it's not necessary.

Signed-off-by: Xavi Hernandez <xhernandez@gmail.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Fri Sep 26 05:23:30 UTC 2025 on atb-devel-224

2 months agoctdb-common: Only respect CTDB_SOCKET in CTDB_TEST_MODE
Martin Schwenke [Fri, 15 Aug 2025 05:01:58 +0000 (15:01 +1000)] 
ctdb-common: Only respect CTDB_SOCKET in CTDB_TEST_MODE

At the moment CTDB_SOCKET can be used outside of test mode even though
nobody should do this.  So, no longer allow this.

This means ensuring CTDB_TEST_MODE is set in the in the
"clusteredmember" selftest environment, so that CTDB_SOCKET is
respected there..

Details...

The associated use of chown(2) and chmod(2), used to secure the socket
in ctdb_daemon.c:ux_socket_bind(), potentially enables a symlink race
attack.  However, the chown(2) is currently not done in test mode, so
restricting the use of CTDB_SOCKET to test mode solves the potential
security issue.

Also, sprinkle warnings about use of CTDB_TEST_MODE in appropriate
places, just to attempt to limit unwanted behaviour.

An alternative could be to use the socket file descriptor with
fchown(2) and fchmod(2).  However, these system calls are not well
defined on sockets.  Still, this was previously done in CTDB's early
days (using the poorly documented method where they are allowed in
Linux (only?) before calling bind(2)).  It was removed (due to
portability issues, via commits
cf1056df94943ddcc3d547d4533b4bc04f57f265 and
2da3fe1b175a468fdff4aa4f65627facd2c28394) and replaced with the
current post-bind chown(2) and chmod(2).

I would like to remove the CTDB_SOCKET environment variable entirely,
since setting CTDB_TEST_MODE and CTDB_BASE covers all reasonable test
environments.  However, I have a feeling that people use it for
interactive testing, and that can still be done in CTDB_TEST_MODE.

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

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reported-by: *GUIAR OQBA * <techokba@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Sep 25 09:02:06 UTC 2025 on atb-devel-224

2 months agoctdb-common: Factor out checking of CTDB_TEST_MODE
Martin Schwenke [Fri, 15 Aug 2025 04:59:49 +0000 (14:59 +1000)] 
ctdb-common: Factor out checking of CTDB_TEST_MODE

For use elsewhere.

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

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
2 months agoctdb-pmda: Do not directly support CTDB_SOCKET environment variable
Martin Schwenke [Fri, 15 Aug 2025 02:08:47 +0000 (12:08 +1000)] 
ctdb-pmda: Do not directly support CTDB_SOCKET environment variable

Always use whatever CTDB uses in the current environment.

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

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agoctdb-ib: Replace uses of sprintf()
Martin Schwenke [Thu, 18 Sep 2025 05:24:32 +0000 (15:24 +1000)] 
ctdb-ib: Replace uses of sprintf()

An unbounded sprintf() into ibw_lasterr (a 512-byte static data
buffer) can potentially cause overflow into other BSS data.

However, the risk is effectively minimised to zero due to:

* This code not being executed at all in ctdbd.  It is only executed
  in the accompanying test code:

  - The function ibw_process_init_attrs() can cause a buffer overflow
    if its 2nd argument, nattr, is non-zero and one of the structs in
    the array pointed to by its 1st argument, attr, contains a name
    member that is too long.

  - ibw_process_init_attrs() is only called by ibw_init(), which also
    has attr and nattr as its 1st and 2nd args, and it just passes them
    straight through.

  - ibw_init() is called in 2 places:

    1. In ibwrapper_test.c, which is targeted test code.

    2. In ibw_ctdb_init.c:ctdb_ibw_init(), which is the initialisation
       function use to initialise the IB transport in ctdbd.  Here, NULL
       and 0 are passed as the relevant arguments to ibw_init().  Both
       arguments are flagged with TODO comments.  :-)

* This code is not built by default (--enable-infiniband is
  required).

  It appears that Debian and Red Hat family Linux distributions have
  never distributed binaries with this enabled.

* Documentation (ctdb(7) and the wiki) recommends that private
  addresses are configured on a private network that is separate from
  client networks.  So, even if the TODOs were done and the relevant
  arguments could come off the wire, the attack surface should be very
  small.

Only the instance with %s in the format is potentially problematic.
The others can not overflow the current 512 byte buffer.  However, it
makes sense to change them all in case someone foolishly reduces the
size of the buffer and makes other changes so that the buffer can be
overflowed in ctdbd.

Now, will static analysers complain that the result of snprintf() is
not checked even though snprintf() always NUL-terminates?

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reported-by: Marcos “Tr0p” Tolosa <marcos.tolosa@owasp.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agos4:kdc:sdb_to_hdb: Fix CID 1665466
Gary Lockyer [Sun, 21 Sep 2025 21:04:02 +0000 (09:04 +1200)] 
s4:kdc:sdb_to_hdb: Fix CID 1665466

Fix:
*** CID 1665466:         Resource leaks  (RESOURCE_LEAK)
/source4/kdc/sdb_to_hdb.c: 482             in sdb_entry_to_hdb_entry()
476      }
477
478      h->context = ske;
479      if (ske != NULL) {
480      ske->kdc_entry = h;
481      }
>>>     CID 1665466:         Resource leaks  (RESOURCE_LEAK)
>>>     Variable "kt" going out of scope leaks the storage "kt.val" points to.
482      return 0;
483     error:
484      free_hdb_entry(h);
485      return rc;

This is almost certainly a false positive as when kt.len == 0, kt.val will be
NULL. But changing the condition to kt.val != NULL, will not do any harm.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Thu Sep 25 07:13:28 UTC 2025 on atb-devel-224

3 months agopassdb: Fixing CID 1509029 for time_t in DEBUG statement
Rabinarayan Panigrahi [Wed, 17 Sep 2025 11:32:26 +0000 (17:02 +0530)] 
passdb: Fixing CID 1509029 for time_t in DEBUG statement

In the most likely scenario of time_t being 64 bit signed, we do the
typecast to intmax_t to also log negative values correctly.

Signed-off-by: Rabinarayan Panigrahi <rapanigr@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Wed Sep 24 06:44:50 UTC 2025 on atb-devel-224

3 months agonsswitch/libwbclient: Fix CID #1034858, #1034859, #1034860 Resource leak
Shweta Sodani [Tue, 23 Sep 2025 05:43:26 +0000 (11:13 +0530)] 
nsswitch/libwbclient: Fix CID #1034858, #1034859, #1034860 Resource leak

Signed-off-by: Shweta Sodani <ssodani@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Tue Sep 23 12:53:10 UTC 2025 on atb-devel-224