]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
7 hours agoVERSION: Disable GIT_SNAPSHOT for the 4.23.3 release. v4-23-stable samba-4.23.3
Jule Anger [Fri, 7 Nov 2025 13:14:53 +0000 (14:14 +0100)] 
VERSION: Disable GIT_SNAPSHOT for the 4.23.3 release.

Signed-off-by: Jule Anger <janger@samba.org>
7 hours agoWHATSNEW: Add release notes for Samba 4.23.3.
Jule Anger [Fri, 7 Nov 2025 13:13:49 +0000 (14:13 +0100)] 
WHATSNEW: Add release notes for Samba 4.23.3.

Signed-off-by: Jule Anger <janger@samba.org>
29 hours agos3:script: Avoid UnicodeDecodeError for samba-log-parser processing whole directory
Pavel Filipenský [Wed, 9 Jul 2025 20:38:02 +0000 (22:38 +0200)] 
s3:script: Avoid UnicodeDecodeError for samba-log-parser processing whole directory

When log directory contains zipped files like
old/log.rpcd_spoolss-20250831.gz we get error.
We want to ignore such files.

$ samba-log-parser --traceid 6 --merge-by-timestamp
Traceback (most recent call last):
  File "/usr/bin/samba-log-parser", line 382, in <module>
    main()
    ~~~~^^
  File "/usr/bin/samba-log-parser", line 311, in main
    process_file(
    ~~~~~~~~~~~~^
        record_list,
        ^^^^^^^^^^^^
    ...<3 lines>...
        options.traceid,
        ^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/bin/samba-log-parser", line 92, in process_file
    data = infile.readlines()
  File "<frozen codecs>", line 325, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte

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

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org>
Autobuild-Date(master): Tue Sep  9 13:50:00 UTC 2025 on atb-devel-224

(cherry picked from commit f636bd3ec08271e79feea6cdd48e48da2af5b1d8)

Autobuild-User(v4-23-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-23-test): Thu Nov  6 15:41:09 UTC 2025 on atb-devel-224

2 days agovfs_recycle: Make recycle:touch/touch_mtime work again if recycle:keeptree is set
Pavel Filipenský [Fri, 24 Oct 2025 22:24:35 +0000 (00:24 +0200)] 
vfs_recycle: Make recycle:touch/touch_mtime work again if recycle:keeptree is set

Problem: Since commit c7839fa smbd: Remove non_widelink_open()

the atime/mtime is not updated if recycle:keeptree is set

        recycle:keeptree = yes
        recycle:touch = yes
        recycle:touch_mtime = yes

Cause: recycle_do_touch() fails since the path ".deleted/administrator/./file"
contains a dot '.' - openat_pathref_fsp_nosymlink() loops over all
components and fails if there is a dot:

[2025/10/24 20:09:24.618003, 10, pid=95965, effective(65534, 65534), real(65534, 0)] ../../source3/smbd/files.c:1144(openat_pathref_fsp_nosymlink)
  openat_pathref_fsp_nosymlink: .deleted/administrator/. contains a dot
[2025/10/24 20:09:24.618007,  5, pid=95965, effective(65534, 65534), real(65534, 0)] ../../source3/smbd/files.c:2337(file_free)
  file_free: freed files structure 0 (4 used)
[2025/10/24 20:09:24.618010, 10, pid=95965, effective(65534, 65534), real(65534, 0)] ../../source3/smbd/filename.c:811(filename_convert_dirfsp_nosymlink)
  filename_convert_dirfsp_nosymlink: opening directory .deleted/administrator/. failed: NT_STATUS_OBJECT_NAME_INVALID
[2025/10/24 20:09:24.618014, 10, pid=95965, effective(65534, 65534), real(65534, 0)] ../../source3/smbd/open.c:568(fd_openat)
  fd_openat: filename_convert_dirfsp_rel returned NT_STATUS_OBJECT_PATH_NOT_FOUND
[2025/10/24 20:09:24.618021, 10, pid=95965, effective(65534, 65534), real(65534, 0)] ../../source3/smbd/files.c:487(openat_pathref_fullname)
  openat_pathref_fullname: Opening pathref for [.deleted/administrator/./file] failed: NT_STATUS_OBJECT_NAME_NOT_FOUND

Here is a backtrace when openat_pathref_fsp_nosymlink() hits: DBG_DEBUG("%s contains a dot\n", path_in);

0  openat_pathref_fsp_nosymlink (mem_ctx=0x353463c0, conn=0x35322350, in_dirfsp=0x3532a820, path_in=0x3533afe0 ".trash/.", twrp=0, posix=true, _smb_fname=0x7ffdb25df138, _symlink_err=0x7ffdb25df140) at ../../source3/smbd/files.c:1144
1  filename_convert_dirfsp_nosymlink (mem_ctx=0x353463c0, conn=0x35322350, basedir=0x3532a820, name_in=0x35321a80 ".trash/./mmm", ucf_flags=8, twrp=0, _dirfsp=0x7ffdb25df370, _smb_fname=0x7ffdb25df378, _smb_fname_rel=0x7ffdb25df380, _symlink_err=0x7ffdb25df2d8) at ../../source3/smbd/filename.c:782
2  filename_convert_dirfsp_rel (mem_ctx=0x353463c0, conn=0x35322350, basedir=0x3532a820, name_in=0x35321a80 ".trash/./mmm", ucf_flags=8, twrp=0, _dirfsp=0x7ffdb25df370, _smb_fname=0x7ffdb25df378, _smb_fname_rel=0x7ffdb25df380) at ../../source3/smbd/filename.c:1097
3  fd_openat (dirfsp=0x3532a820, smb_fname=0x35321950, fsp=0x3531b670, _how=0x7ffdb25df4b0) at ../../source3/smbd/open.c:549
4  openat_pathref_fullname (conn=0x35322350, dirfsp=0x3532a820, full_fname=0x7ffdb25df498, smb_fname=0x35321950, how=0x7ffdb25df4b0) at ../../source3/smbd/files.c:437
5  openat_pathref_fsp (dirfsp=0x3532a820, smb_fname=0x35321950) at ../../source3/smbd/files.c:545
6  synthetic_pathref (mem_ctx=0x353463c0, dirfsp=0x3532a820, base_name=0x35346ef0 ".trash/./mmm", stream_name=0x0, psbuf=0x0, twrp=0, flags=0, _smb_fname=0x7ffdb25df578) at ../../source3/smbd/files.c:1871
7  recycle_do_touch (handle=0x35311cb0, smb_fname=0x35346dc0, touch_mtime=true) at ../../source3/modules/vfs_recycle.c:439
8  recycle_unlink_internal (handle=0x35311cb0, dirfsp=0x352592a0, smb_fname=0x35335eb0, flags=0) at ../../source3/modules/vfs_recycle.c:726
9  recycle_unlinkat (handle=0x35311cb0, dirfsp=0x352592a0, smb_fname=0x35335eb0, flags=0) at ../../source3/modules/vfs_recycle.c:746
10 smb_vfs_call_unlinkat (handle=0x35311cb0, dirfsp=0x352592a0, smb_fname=0x35335eb0, flags=0) at ../../source3/smbd/vfs.c:1987
11 close_remove_share_mode (fsp=0x35344a40, close_type=NORMAL_CLOSE) at ../../source3/smbd/close.c:624
12 close_normal_file (req=0x35336eb0, fsp=0x35344a40, close_type=NORMAL_CLOSE) at ../../source3/smbd/close.c:932
13 close_file_smb (req=0x35336eb0, fsp=0x35344a40, close_type=NORMAL_CLOSE) at ../../source3/smbd/close.c:1414

Fix: If the path_name is '.', just do not add it.

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

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org>
Autobuild-Date(master): Tue Nov  4 11:38:52 UTC 2025 on atb-devel-224

(cherry picked from commit 9bbdfee7f2fdeee3cf530becb2a6f06345627b23)

Autobuild-User(v4-23-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-23-test): Wed Nov  5 14:28:30 UTC 2025 on atb-devel-224

2 days agovfs_recycle: Fix trailing whitespace in vfs_recycle.c
Pavel Filipenský [Fri, 24 Oct 2025 22:24:33 +0000 (00:24 +0200)] 
vfs_recycle: Fix trailing whitespace in vfs_recycle.c

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

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 5124acec34c20391cdfeb9d9005365047b7d7eee)

2 days agoselftest: Add a test for recycle:touch,touch_mtime,keeptree
Pavel Filipenský [Sun, 26 Oct 2025 20:01:40 +0000 (21:01 +0100)] 
selftest: Add a test for recycle:touch,touch_mtime,keeptree

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

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 498984cf346630c17169dbdb13a232854309f6a8)

4 days agomdssvc: add support for parsing date ranges
Ralph Boehme [Wed, 15 Oct 2025 13:01:16 +0000 (15:01 +0200)] 
mdssvc: add support for parsing date ranges

Example:

  InRange(kMDItemContentCreationDate,$time.iso(2024-12-31T23:00:00Z),$time.iso(2025-12-31T23:00:00Z))

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Oct 20 10:59:03 UTC 2025 on atb-devel-224

(cherry picked from commit c00de32585bf47ec4753f966fe9ac4dd2fb8f4e7)

Autobuild-User(v4-23-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-23-test): Mon Nov  3 14:56:14 UTC 2025 on atb-devel-224

4 days agomdssvc: add a test for parsing Spotlight date ranges
Ralph Boehme [Fri, 17 Oct 2025 10:38:53 +0000 (12:38 +0200)] 
mdssvc: add a test for parsing Spotlight date ranges

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 1239e5a4c7f5930a4a1b3a6a7a005f4d543a5ea5)

4 days agomdssvc: reduce a log level to DEBUG
Ralph Boehme [Wed, 15 Oct 2025 12:56:51 +0000 (14:56 +0200)] 
mdssvc: reduce a log level to DEBUG

The expression

  InRange(*,$time.iso(2024-12-31T23:00:00Z),$time.iso(2025-12-31T23:00:00Z))

in a Spotlight query produces the following log message:

  map_fts: Mapping fts [757378800] unexpected op [~]

However, when

    elasticsearch:ignore unknown attribute = yes

is set, the parser will ignore the failed expression and continue
parsing given the expression is part of a larger expression like
"subexpression1 OR subexpression2". Avoid spamming the log and reduce
the loglevel when we hit this case.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 3b2b50983901ad5039124b82f149b30675c80a9a)

4 days agoctdb-scripts: Avoid failing updateip when IP is not assigned
Martin Schwenke [Thu, 16 Oct 2025 02:54:22 +0000 (13:54 +1100)] 
ctdb-scripts: Avoid failing updateip when IP is not assigned

There is no use failing this when it could behave more like takeip.

Use old interface of "__none__" as a hint that ctdbd doesn't think the
IP is assigned either.  In this case print a warning instead of an
error.  Take some care to avoid spurious errors in 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.

Update test to match.

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>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Fri Oct 17 06:28:30 UTC 2025 on atb-devel-224

(cherry picked from commit 0e73781bf84a1e8e596d8be3f55eeb5f8f927990)

4 days agoctdb-scripts: Avoid printing a message if no connections
Martin Schwenke [Thu, 16 Oct 2025 02:51:27 +0000 (13:51 +1100)] 
ctdb-scripts: Avoid printing a message if no connections

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

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
(cherry picked from commit 01d3d25c0139a3dd49a2322a9416698d08733377)

4 days 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>
(cherry picked from commit a98ffb96efc4a9ea2110c654860a4ba3896ab3d5)

4 days 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>
(cherry picked from commit d08f9ebd2755671d30c73a4e979029d353848828)

3 weeks 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

(cherry picked from commit 9f45eae2928bd2cb46fc827a348531acb471a549)

Autobuild-User(v4-23-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-23-test): Wed Oct 15 15:10:19 UTC 2025 on atb-devel-224

3 weeks 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>
(cherry picked from commit ca0363e5a7f53cde4ae7223c36f21c2ae12318f9)

3 weeks 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

(cherry picked from commit 708ae38a76a13a5b77373770149678233b4b3c37)

3 weeks 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>
(cherry picked from commit 2b5cbb955ab2cf278272aa8457a672aa27ff1020)

3 weeks 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>
(cherry picked from commit 594eb4eb0eb4a6c87c5b136106afd05357b80e91)

3 weeks 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>
(cherry picked from commit a8791c0cad4fb03606ea484c2da7ee69d9de5d48)

3 weeks 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>
(backported from commit a112978ed1240c399eb90e4472d5c43d867c49d9)
[slow@samba.org: conflict due to option veto_localized present only in master]

3 weeks 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>
(cherry picked from commit b3132202cf787cc9fb061e39eaf1509157f53953)

3 weeks 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>
(cherry picked from commit 75fa416f911f1f30aae8bdf14b423140874acaa0)

3 weeks 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>
(backported from commit e86f0c2de80e2409bfe3fc12df24e94470988e3c)
[slow@samba.org: conflict due to optino veto_localized only present in master]

3 weeks 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>
(cherry picked from commit 68ed6279335cfac13a624ae8a7738dac3d9b0d1a)

3 weeks 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>
(cherry picked from commit 777db5b50689d28c53d6b0116818601fd8e52aa8)

3 weeks 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>
(cherry picked from commit 795a8c0e84f2bf2b70c8070737183e33f4254a54)

3 weeks 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>
(cherry picked from commit 3052839636f185307edb8832de9bdba4b2e2c83c)

3 weeks agoVERSION: Bump version up to Samba 4.23.3...
Jule Anger [Wed, 15 Oct 2025 12:59:30 +0000 (14:59 +0200)] 
VERSION: Bump version up to Samba 4.23.3...

and re-enable GIT_SNAPSHOT.

Signed-off-by: Jule Anger <janger@samba.org>
3 weeks agoVERSION: Disable GIT_SNAPSHOT for the 4.23.2 release. samba-4.23.2
Jule Anger [Tue, 14 Oct 2025 14:40:38 +0000 (16:40 +0200)] 
VERSION: Disable GIT_SNAPSHOT for the 4.23.2 release.

Signed-off-by: Jule Anger <janger@samba.org>
3 weeks agoWHATSNEW: Add release notes for Samba 4.23.2.
Jule Anger [Tue, 14 Oct 2025 14:39:58 +0000 (16:39 +0200)] 
WHATSNEW: Add release notes for Samba 4.23.2.

Signed-off-by: Jule Anger <janger@samba.org>
3 weeks 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>
3 weeks 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>
3 weeks agoCVE-2025-10230: s4:wins: restrict names fed to shell
Douglas Bagnall [Wed, 3 Sep 2025 02:20:24 +0000 (14:20 +1200)] 
CVE-2025-10230: s4:wins: restrict names fed to shell

If the "wins hook" smb.conf parameter is set, the WINS server will
attempt to execute that value in a shell command line when a client
asks to modify a name. The WINS system is a trusting one, and clients
can claim any NETBIOS name they wish.

With the source3 nmbd WINS server (since the 1999 commit now called
3db52feb1f3b2c07ce0b06ad4a7099fa6efe3fc7) the wins hook will not be
run for names that contain shell metacharacters. This restriction has
not been present on the source4 nbt WINS server, which is the WINS
server that will be used in the event that an Active Directory Domain
Controller is also running WINS.

This allowed an unauthenticated client to execute arbitrary commands
on the server.

This commit brings the nmbd check into the nbt WINS server, so that
the wins hook will only be run for names that contain only letters,
digits, hyphens, underscores and periods. This matches the behaviour
described in the smb.conf man page.

The source3 nmbd WINS server has another layer of protection, in that
it uses the smb_run() exec wrapper that tries to escape arguments. We
don't do that here.

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

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
3 weeks agoCVE-2025-10230: s4/tests: check that wins hook sanitizes names
Douglas Bagnall [Tue, 9 Sep 2025 01:36:16 +0000 (13:36 +1200)] 
CVE-2025-10230: s4/tests: check that wins hook sanitizes names

An smb.conf can contain a 'wins hook' parameter, which names a script
to run when a WINS name is changed. The man page says

    The second argument is the NetBIOS name. If the name is not a
    legal name then the wins hook is not called. Legal names contain
    only letters, digits, hyphens, underscores and periods.

but it turns out the legality check is not performed if the WINS
server in question is the source4 nbt one. It is not expected that
people will run this server, but they can. This is bad because the
name is passed unescaped into a shell command line, allowing command
injection.

For this test we don't care whether the WINS server is returning an
error code, just whether it is running the wins hook. The tests show
it often runs the hook it shouldn't, though some characters are
incidentally blocked because the name has to fit in a DN before it
gets to the hook, and DNs have a few syntactic restrictions (e.g.,
blocking '<', '>', and ';').

The source3 WINS server that is used by Samba when not run as a DC is
not affected and not here tested.

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

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
6 weeks agoVERSION: Bump version up to Samba 4.23.2...
Jule Anger [Fri, 26 Sep 2025 13:45:42 +0000 (15:45 +0200)] 
VERSION: Bump version up to Samba 4.23.2...

and re-enable GIT_SNAPSHOT.

Signed-off-by: Jule Anger <janger@samba.org>
6 weeks agoVERSION: Disable GIT_SNAPSHOT for the 4.23.1 release. samba-4.23.1
Jule Anger [Fri, 26 Sep 2025 13:45:23 +0000 (15:45 +0200)] 
VERSION: Disable GIT_SNAPSHOT for the 4.23.1 release.

Signed-off-by: Jule Anger <janger@samba.org>
6 weeks agoWHATSNEW: Add release notes for Samba 4.23.1.
Jule Anger [Fri, 26 Sep 2025 13:44:21 +0000 (15:44 +0200)] 
WHATSNEW: Add release notes for Samba 4.23.1.

Signed-off-by: Jule Anger <janger@samba.org>
6 weeks 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

(cherry picked from commit 7e2358fcf7be177d6e5de6e26f9d7c5af4acbb0c)

Autobuild-User(v4-23-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-23-test): Fri Sep 26 13:32:06 UTC 2025 on atb-devel-224

6 weeks 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>
(cherry picked from commit 4c12a36eb5b44fb08d0461e6fa77fcdb4a128433)

6 weeks 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>
(cherry picked from commit c4794e40529c63c696ecc3f8f27c810c22dd63a5)

6 weeks agoFix crash in DLZ plugin for incorrect setup
Alexander Bokovoy [Fri, 19 Sep 2025 13:23:41 +0000 (16:23 +0300)] 
Fix crash in DLZ plugin for incorrect setup

When bind is not yet setup properly, logging errors should be done
through the temporary handle.

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

Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Sat Sep 20 06:49:37 UTC 2025 on atb-devel-224

(cherry picked from commit 821cf798d87162b1f3b5d7388891d15fea0a969a)

Autobuild-User(v4-23-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-23-test): Fri Sep 26 10:36:53 UTC 2025 on atb-devel-224

6 weeks agovfs_ceph_new: Use integer value instead of boolean
Anoop C S [Mon, 22 Sep 2025 05:41:46 +0000 (11:11 +0530)] 
vfs_ceph_new: Use integer value instead of boolean

ceph_ll_fsync() API[1] accepts the third and final argument as integer
and not a boolean value.

[1] https://github.com/ceph/ceph/blob/main/src/include/cephfs/libcephfs.h#L2041

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

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Mon Sep 22 12:24:35 UTC 2025 on atb-devel-224

(cherry picked from commit 5200c120f34c4a28fa9f4cb55b46dbb9d90eb758)

6 weeks agovfs_ceph_new: dont use ceph_ll_nonblocking_readv_writev for fsync_send
Shachar Sharon [Wed, 17 Sep 2025 11:25:27 +0000 (14:25 +0300)] 
vfs_ceph_new: dont use ceph_ll_nonblocking_readv_writev for fsync_send

Commit 4ae922413844 ("vfs_ceph_new: use libcephfs nonblocking API for
async-io ops") uses ceph_ll_nonblocking_readv_writev for fsync_send.
However, the actual behaviour of libcephfs when using this API with
'fsync=true' is not async-fsync, as one may assume. Instead,
vfs_ceph_new should use a nonblocking fsync API[1], once it is ready.

Removed the usage of ceph_ll_nonblocking_readv_writev for fsync.

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

[1] https://github.com/ceph/ceph/commit/c88a21c30d8b265adb152f631d2629d29539f7b7

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Xavi Hernandez <xhernandez@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit 82c0988a8bc3d3e364e2d56ad8ea27e359fbc3f0)

7 weeks agowinbind: Initialize idmap in winbindd_getgroups
Volker Lendecke [Fri, 12 Sep 2025 16:19:29 +0000 (18:19 +0200)] 
winbind: Initialize idmap in winbindd_getgroups

Bug: https://bugzilla.samba.org/show_bug.cgi?id=15914
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): Sat Sep 13 05:44:20 UTC 2025 on atb-devel-224

(cherry picked from commit beaf661b1ec1f048efc8eb2b383fc989a79ae009)

Autobuild-User(v4-23-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-23-test): Wed Sep 17 08:48:10 UTC 2025 on atb-devel-224

7 weeks agoctdb: Fix redefinitoin of pmdaResult
Andreas Schneider [Fri, 12 Sep 2025 13:37:38 +0000 (15:37 +0200)] 
ctdb: Fix redefinitoin of pmdaResult

../../ctdb/utils/pmda/pmda_ctdb.c:52:9: warning: 'pmdaResult' redefined
   52 | #define pmdaResult pmResult
      |         ^~~~~~~~~~
In file included from ../../ctdb/utils/pmda/pmda_ctdb.c:35:
/usr/include/pcp/pmda.h:30:9: note: this is the location of the previous definition
   30 | #define pmdaResult pmResult_v2
      |         ^~~~~~~~~~

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Sat Sep 13 08:12:42 UTC 2025 on atb-devel-224

(cherry picked from commit d4b448c305f674646001e293d8aa6ebc0ca6dc77)

8 weeks agoWHATSNEW: fix typo
Jule Anger [Fri, 12 Sep 2025 08:45:13 +0000 (10:45 +0200)] 
WHATSNEW: fix typo

8 weeks agoVERSION: Bump version up to Samba 4.23.1...
Jule Anger [Fri, 12 Sep 2025 08:23:25 +0000 (10:23 +0200)] 
VERSION: Bump version up to Samba 4.23.1...

and re-enable GIT_SNAPSHOT.

Signed-off-by: Jule Anger <janger@samba.org>
8 weeks agoVERSION: Disable GIT_SNAPSHOT for the 4.23.0 release. samba-4.23.0
Jule Anger [Fri, 12 Sep 2025 08:22:43 +0000 (10:22 +0200)] 
VERSION: Disable GIT_SNAPSHOT for the 4.23.0 release.

Signed-off-by: Jule Anger <janger@samba.org>
8 weeks agoWHATSNEW: Add release notes for Samba 4.23.0.
Jule Anger [Fri, 12 Sep 2025 08:22:31 +0000 (10:22 +0200)] 
WHATSNEW: Add release notes for Samba 4.23.0.

Signed-off-by: Jule Anger <janger@samba.org>
8 weeks agos4:auth: Fix 'no delegation' logic in gensec_gssapi_start()
Andreas Schneider [Wed, 10 Sep 2025 13:13:37 +0000 (15:13 +0200)] 
s4:auth: Fix 'no delegation' logic in gensec_gssapi_start()

This fixes samba4.ntvfs.cifs.krb5.base.lock test with MIT Kerberos.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Alexander Bokovoy <ab@samba.org>
(cherry picked from commit 66d3e5e49d34b0a4bfb8f2c862d48d11e27b2ea2)

Autobuild-User(v4-23-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-23-test): Fri Sep 12 07:23:04 UTC 2025 on atb-devel-224

8 weeks agothird_party: Bump version for socket_wrapper
Andreas Schneider [Thu, 11 Sep 2025 10:39:49 +0000 (12:39 +0200)] 
third_party: Bump version for socket_wrapper

Commit be007c2cf41085a8648965fc904f37d25d35a453 forgot to do that.

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

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): Thu Sep 11 17:05:00 UTC 2025 on atb-devel-224

(cherry picked from commit f4af0960a6e67319dba00da5e21c7ae95d719d64)

8 weeks agopytest: safe_tarfile: accept NotADirectoryError as bad path rejection
Douglas Bagnall [Fri, 22 Aug 2025 03:24:34 +0000 (15:24 +1200)] 
pytest: safe_tarfile: accept NotADirectoryError as bad path rejection

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

After recent upstream Python fixes for various path escape and symlink
CVEs in tarfile, in particular this commit:

  commit 3612d8f51741b11f36f8fb0494d79086bac9390a
  Author: Łukasz Langa <lukasz@langa.pl>
  Date:   Tue Jun 3 12:42:11 2025 +0200

  gh-135034: Normalize link targets in tarfile, add `os.path.realpath(strict='allow_missing')` (#135037)

  Addresses CVEs 2024-12718, 2025-4138, 2025-4330, and 2025-4517.

Signed-off-by: Łukasz Langa <lukasz@langa.pl>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
our ../../ test that looks for a tarfile.OutsideDestinationError now
meets a NotADirectoryError in recent Python versions (this from 3.13,
Fedora 42):

UNEXPECTED(error): samba.tests.safe_tarfile.samba.tests.safe_tarfile.SafeTarFileTestCase.test_dots(none)
REASON: Exception: Exception: Traceback (most recent call last):
  File "/tmp/samba-testbase/b1/samba-o3/bin/python/samba/tests/safe_tarfile.py", line 48, in test_dots
    self.assertRaises(tarfile.OutsideDestinationError,
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      stf.extractall,
                      ^^^^^^^^^^^^^^^
                      tarname)
                      ^^^^^^^^
  File "/usr/lib64/python3.13/unittest/case.py", line 795, in assertRaises
    return context.handle('assertRaises', args, kwargs)
           ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.13/unittest/case.py", line 238, in handle
    callable_obj(*args, **kwargs)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.13/tarfile.py", line 2343, in extractall
    tarinfo, unfiltered = self._get_extract_tarinfo(
                          ~~~~~~~~~~~~~~~~~~~~~~~~~^
        member, filter_function, path)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.13/tarfile.py", line 2432, in _get_extract_tarinfo
    self._handle_fatal_error(e)
    ~~~~~~~~~~~~~~~~~~~~~~~~^^^
  File "/usr/lib64/python3.13/tarfile.py", line 2430, in _get_extract_tarinfo
    filtered = filter_function(unfiltered, path)
  File "/usr/lib64/python3.13/tarfile.py", line 842, in tar_filter
    new_attrs = _get_filtered_attrs(member, dest_path, False)
  File "/usr/lib64/python3.13/tarfile.py", line 783, in _get_filtered_attrs
    target_path = os.path.realpath(os.path.join(dest_path, name),
                                   strict=os.path.ALLOW_MISSING)
  File "<frozen posixpath>", line 457, in realpath
NotADirectoryError: [Errno 20] Not a directory: '/tmp/samba-testbase/b1/samba-o3/bin/ab/tmp/tmpbn6e69ci/tar.tar'

In this commit, we say that a NotADirectoryError is OK.

When we started safe_tarfile we were acting in advance of upstream
Python, but now they are well ahead of us. If we trust their work in
recent versions and accept the error conditions they choose, we can
more easily get rid of our safe_tarfile when the time is right.

For the moment we still support as far back as Python 3.6 for some old
enterprise distros, and it is for those that we continue to maintain
safe_tarfile. In versions before 3.11 we will see
tarfile.ExtractError, and the test for that is unaffected by this
change.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 7a5b22e4221ea2a0960a26cf79339168f0899d0c)

Autobuild-User(v4-23-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-23-test): Thu Sep 11 10:18:00 UTC 2025 on atb-devel-224

8 weeks agoselftest: Do not use wrappers for samba.tests.docs
Andreas Schneider [Wed, 10 Sep 2025 11:31:11 +0000 (13:31 +0200)] 
selftest: Do not use wrappers for samba.tests.docs

We will run into issues with Python 3.14 passing sockets for
concurrently running tasks.

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

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): Wed Sep 10 19:21:55 UTC 2025 on atb-devel-224

(cherry picked from commit 6cf1bf540e7f433e05a0a4119cff4bdaa608359e)

8 weeks agoprinting: Fix an uninitialized read
Volker Lendecke [Mon, 8 Sep 2025 16:19:01 +0000 (18:19 +0200)] 
printing: Fix an uninitialized read

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Björn Baumbach <bb@sernet.de>
Autobuild-User(master): Björn Baumbach <bb@sernet.de>
Autobuild-Date(master): Tue Sep  9 11:06:34 UTC 2025 on atb-devel-224

(cherry picked from commit a6dcf78483d7ae492e695d30c5c783df8e7879d8)

8 weeks agos4:torture: Fix stack buffer overflow in test_dirlease_oplocks()
Andreas Schneider [Tue, 9 Sep 2025 07:24:47 +0000 (09:24 +0200)] 
s4:torture: Fix stack buffer overflow in test_dirlease_oplocks()

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Sep  9 09:27:33 UTC 2025 on atb-devel-224

(cherry picked from commit c5c238a879182a2dfe528ae49f97da75e242afe7)

8 weeks agos3:net: Pass down the server from cmdline to sync_pw2keytabs()
Andreas Schneider [Mon, 28 Jul 2025 08:43:36 +0000 (10:43 +0200)] 
s3:net: Pass down the server from cmdline to sync_pw2keytabs()

This makes sure that during 'net ads join' the keytab create code
- sync_pw2keytabs() talks to the same DC at what the machine account
was created.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Pair-Programmed-With: Pavel Filipenský <pfilipensky@samba.org>

Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org>
Autobuild-Date(master): Fri Sep  5 13:38:33 UTC 2025 on atb-devel-224

(cherry picked from commit 5d1d3a8b568b5a07ed1ed537d20aa93820cecc14)

Autobuild-User(v4-23-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-23-test): Tue Sep  9 12:46:31 UTC 2025 on atb-devel-224

8 weeks agotests: Add test for 'net ads join' to a preferred DC
Pavel Filipenský [Mon, 4 Aug 2025 09:20:54 +0000 (11:20 +0200)] 
tests: Add test for 'net ads join' to a preferred DC

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

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
(cherry picked from commit 36f6ac547c09f492d1dcab11570e8bcbd377cf26)

8 weeks agoselftest: Add the short name for localvampiredc to hosts file
Pavel Filipenský [Tue, 29 Jul 2025 09:19:07 +0000 (11:19 +0200)] 
selftest: Add the short name for localvampiredc to hosts file

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

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
(cherry picked from commit 5d2f60ae5aa96751b74901ae5384291ef338b152)

8 weeks agoctdb: fix build against PCP 7.0.0
Alexander Bokovoy [Wed, 3 Sep 2025 12:42:46 +0000 (15:42 +0300)] 
ctdb: fix build against PCP 7.0.0

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

Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Mon Sep  8 04:47:37 UTC 2025 on atb-devel-224

(cherry picked from commit 83ff87f3dab0d6b22031614e9481b880f1dd99e8)

2 months agoVERSION: Bump version up to Samba 4.23.0rc5...
Jule Anger [Fri, 5 Sep 2025 11:05:35 +0000 (13:05 +0200)] 
VERSION: Bump version up to Samba 4.23.0rc5...

and re-enable GIT_SNAPSHOT.

Signed-off-by: Jule Anger <janger@samba.org>
2 months agoVERSION: Disable GIT_SNAPSHOT for the 4.23.0rc4 release. samba-4.23.0rc4
Jule Anger [Fri, 5 Sep 2025 11:05:19 +0000 (13:05 +0200)] 
VERSION: Disable GIT_SNAPSHOT for the 4.23.0rc4 release.

Signed-off-by: Jule Anger <janger@samba.org>
2 months agoWHATSNEW: Add release notes for Samba 4.23.0rc4.
Jule Anger [Fri, 5 Sep 2025 11:03:05 +0000 (13:03 +0200)] 
WHATSNEW: Add release notes for Samba 4.23.0rc4.

Signed-off-by: Jule Anger <janger@samba.org>
2 months agos3:net: fix "net ads group"
MikeLiu [Fri, 29 Aug 2025 09:31:36 +0000 (17:31 +0800)] 
s3:net: fix "net ads group"

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

Signed-off-by: MikeLiu <mikeliu@qnap.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Sep  4 09:33:27 UTC 2025 on atb-devel-224

(cherry picked from commit 8738fa1cc42d913e3ab2b54fe1e75ca4da37073f)

Autobuild-User(v4-23-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-23-test): Fri Sep  5 09:20:08 UTC 2025 on atb-devel-224

2 months agokrb5: handle GSS-Proxy credentials lifetime
Alexander Bokovoy [Tue, 2 Sep 2025 07:36:11 +0000 (10:36 +0300)] 
krb5: handle GSS-Proxy credentials lifetime

GSS-Proxy stores its credential in encrypted form in the Kerberos ccache
with a start and end time of 0 and a server principal in the realm named
'X-GSSPROXY:'. This credential is accessed through GSS-Proxy interposer
mechanism in MIT Kerberos and cannot be analysed with raw krb5 API.

As MIT Kerberos has no krb5_cc_get_lifetime() implementation, add check
for the GSS-Proxy credential to smb_krb5_cc_get_lifetime() wrapper to
return KRB5_PLUGIN_NO_HANDLE. The two places where
smb_krb5_cc_get_lifetime() is used then handle this return code to avoid
deciding on the 'expired' lifetime to cause a kinit.

This fixes FreeIPA use case where an IPA API endpoint uses Samba Python
bindings with a GSS-Proxy-controlled credential cache.

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

Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org>
Autobuild-Date(master): Wed Sep  3 10:15:50 UTC 2025 on atb-devel-224

(cherry picked from commit c00b98ad840706cda222bb610d0d4860b98c72d4)

2 months agoVERSION: Bump version up to Samba 4.23.0rc4...
Jule Anger [Fri, 29 Aug 2025 12:09:05 +0000 (14:09 +0200)] 
VERSION: Bump version up to Samba 4.23.0rc4...

and re-enable GIT_SNAPSHOT.

Signed-off-by: Jule Anger <janger@samba.org>
2 months agoVERSION: Disable GIT_SNAPSHOT for the 4.23.0rc3 release. samba-4.23.0rc3
Jule Anger [Fri, 29 Aug 2025 12:08:48 +0000 (14:08 +0200)] 
VERSION: Disable GIT_SNAPSHOT for the 4.23.0rc3 release.

Signed-off-by: Jule Anger <janger@samba.org>
2 months agoWHATSNEW: Add release notes for Samba 4.23.0rc3.
Jule Anger [Fri, 29 Aug 2025 12:07:49 +0000 (14:07 +0200)] 
WHATSNEW: Add release notes for Samba 4.23.0rc3.

Signed-off-by: Jule Anger <janger@samba.org>
2 months agoWHATSNEW: unify format
Jule Anger [Thu, 28 Aug 2025 08:26:05 +0000 (10:26 +0200)] 
WHATSNEW: unify format

Signed-off-by: Jule Anger <janger@samba.org>
Autobuild-User(v4-23-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-23-test): Thu Aug 28 10:39:47 UTC 2025 on atb-devel-224

2 months agoWHATSNEW: add Initial version of smb_prometheus_endpoint
Jule Anger [Thu, 28 Aug 2025 08:22:49 +0000 (10:22 +0200)] 
WHATSNEW: add Initial version of smb_prometheus_endpoint

Signed-off-by: Ralph Boehme <slow@samba.org>
2 months agoWHATSNEW: add Modern write time update logic
Jule Anger [Thu, 28 Aug 2025 08:21:49 +0000 (10:21 +0200)] 
WHATSNEW: add Modern write time update logic

Signed-off-by: Ralph Boehme <slow@samba.org>
2 months agoWHATSNEW: add SMB3 Unix Extensions
Jule Anger [Thu, 28 Aug 2025 08:20:32 +0000 (10:20 +0200)] 
WHATSNEW: add SMB3 Unix Extensions

Signed-off-by: Ralph Boehme <slow@samba.org>
2 months agoWHATSNEW: add support for SMB3 over QUIC
Jule Anger [Thu, 28 Aug 2025 08:18:01 +0000 (10:18 +0200)] 
WHATSNEW: add support for SMB3 over QUIC

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2 months agos4:lib/tls: add additional dns hostnames as GNUTLS_SAN_DNSNAME for self-signed certif...
Stefan Metzmacher [Tue, 26 Aug 2025 13:22:10 +0000 (15:22 +0200)] 
s4:lib/tls: add additional dns hostnames as GNUTLS_SAN_DNSNAME for self-signed certificates

It's better to include X509v3 Subject Alternative Name with
DNS names also for additional dns hostnames.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Aug 26 22:00:26 UTC 2025 on atb-devel-224

(cherry picked from commit 499656a05011a462b2e44faea7318a02c847de5e)

2 months agos4:lib/tls: set GNUTLS_SAN_DNSNAME for self-signed certificates
Stefan Metzmacher [Tue, 26 Aug 2025 09:55:40 +0000 (11:55 +0200)] 
s4:lib/tls: set GNUTLS_SAN_DNSNAME for self-signed certificates

It's better to include X509v3 Subject Alternative Name with
DNS names in the self-signed certificate...

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 49e179963f56e749dac4e20284dc567e382ccdb2)

2 months agos4:lib/tls: let tstream_tls_params_server_lpcfg() use lpcfg_dns_hostname() internally
Stefan Metzmacher [Tue, 26 Aug 2025 09:22:43 +0000 (11:22 +0200)] 
s4:lib/tls: let tstream_tls_params_server_lpcfg() use lpcfg_dns_hostname() internally

This is simpler and the next step will also make use of
lpcfg_additional_dns_hostnames() too...

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 6116bc64961fb2330df5ff4256b4ef75dca08cf0)

2 months agoauth:creds: Update the documentation for set_principal and set_realm
Andreas Schneider [Wed, 6 Aug 2025 05:54:52 +0000 (07:54 +0200)] 
auth:creds: Update the documentation for set_principal and set_realm

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Alexander Bokovoy <ab@samba.org>
Autobuild-Date(master): Mon Aug 25 12:08:22 UTC 2025 on atb-devel-224

(cherry picked from commit 7a19fde92605a3a3699998fb226e3e787de0b5ca)

2 months agoauth:creds: Make sure to uppercase the realm of a principal
Andreas Schneider [Wed, 6 Aug 2025 14:33:21 +0000 (16:33 +0200)] 
auth:creds: Make sure to uppercase the realm of a principal

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
(cherry picked from commit 5879410caf9303a378f3d90365e60928a735e65a)

2 months agoauth:creds: Validate realm names in set_realm and set_principal
Andreas Schneider [Tue, 5 Aug 2025 13:25:54 +0000 (15:25 +0200)] 
auth:creds: Validate realm names in set_realm and set_principal

See also
https://web.mit.edu/kerberos/krb5-latest/doc/admin/realm_config.html#realm-name

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
(cherry picked from commit e848671f34f969634d55eb7b846d70e6334034ae)

2 months agos3:utils: Keep password secret in ntlm_auth get_password()
Andreas Schneider [Thu, 7 Aug 2025 11:48:26 +0000 (13:48 +0200)] 
s3:utils: Keep password secret in ntlm_auth get_password()

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
(cherry picked from commit f86739e3abd63ba0b7ba632d796968fec9fa2f8f)

2 months agoauth:creds: Keep password secret in cmdline_get_userpassword()
Andreas Schneider [Thu, 7 Aug 2025 11:48:04 +0000 (13:48 +0200)] 
auth:creds: Keep password secret in cmdline_get_userpassword()

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
(cherry picked from commit 34482f4ad014a09c84b484097a8d03dfec4f6512)

2 months agoauth:creds: Keep the password secret
Andreas Schneider [Thu, 7 Aug 2025 11:45:48 +0000 (13:45 +0200)] 
auth:creds: Keep the password secret

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
(cherry picked from commit 705db6c8b295f65f40b7dcd0d5dc0f6db901c8d7)

2 months agoauth:creds: Allow to reset the principal by passing NULL to set_principal
Andreas Schneider [Wed, 6 Aug 2025 12:42:51 +0000 (14:42 +0200)] 
auth:creds: Allow to reset the principal by passing NULL to set_principal

We do that e.g. in cli_credentials_set_anonymous()

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
(cherry picked from commit 67c2feba290764c62ab01602d5bc9d4d122c2c12)

2 months agoauth:creds: Also uppercase realm set via a callback
Andreas Schneider [Thu, 7 Aug 2025 11:32:47 +0000 (13:32 +0200)] 
auth:creds: Also uppercase realm set via a callback

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
(cherry picked from commit 4f8ff3a567d6318c71b0960345592224721c9594)

2 months agoauth:creds: Allow to reset the realm by passing NULL
Andreas Schneider [Wed, 6 Aug 2025 12:40:34 +0000 (14:40 +0200)] 
auth:creds: Allow to reset the realm by passing NULL

This is e.g. done by cli_credentials_set_anonymous().

We can't call TALLOC_FREE(cred->realm), as this would break
cli_credentials_shallow_copy().

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
(cherry picked from commit e5608cdb2e5a7ef2641ec0e7b0ce0b4640a02ce1)

2 months agosmbd: return correct reparse tag DFS when listing directories
Ralph Boehme [Fri, 15 Aug 2025 08:13:33 +0000 (10:13 +0200)] 
smbd: return correct reparse tag DFS when listing directories

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

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 Aug 15 15:37:05 UTC 2025 on atb-devel-224

(cherry picked from commit 0be53d7ac0a39d6a48c6c5e2144f342c0d406781)

2 months agoCI: add Python test samba.tests.dcerpc.dfs.DfsTests.test_dfs_reparse_tag
Ralph Boehme [Thu, 14 Aug 2025 15:18:08 +0000 (17:18 +0200)] 
CI: add Python test samba.tests.dcerpc.dfs.DfsTests.test_dfs_reparse_tag

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 43ee86c0c757e95712ed52bd336d2085485498ba)

2 months agopython/tests: also populate self.server in calls LibsmbTests setup()
Ralph Boehme [Fri, 15 Aug 2025 09:49:27 +0000 (11:49 +0200)] 
python/tests: also populate self.server in calls LibsmbTests setup()

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 5f7b31927733b0ff3e1207be242f1ddb2cb699bd)

2 months agopylibsmb: add SMB2_FIND_ID_BOTH_DIRECTORY_INFO
Ralph Boehme [Fri, 15 Aug 2025 08:14:53 +0000 (10:14 +0200)] 
pylibsmb: add SMB2_FIND_ID_BOTH_DIRECTORY_INFO

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 698a0195f72a091e9ed6b0448160c79e37761840)

2 months agovfs_xattr_tdb: fix dangling symlink detection
Ralph Boehme [Fri, 15 Aug 2025 09:50:26 +0000 (11:50 +0200)] 
vfs_xattr_tdb: fix dangling symlink detection

The caller might not have called stat on smb_fname.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 2e88ba4b4de146327c19682d59bbe34d68158bf7)

2 months agos3/rpc_server/dfs: fix creating a DFS link
Ralph Boehme [Thu, 14 Aug 2025 17:20:02 +0000 (19:20 +0200)] 
s3/rpc_server/dfs: fix creating a DFS link

If there's no existing link, get_referred_path() returns NT_STATUS_OBJECT_PATH_NOT_FOUND.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 2cb2991ccdd5d4f63e4c5b3ccc4454a6b39d6afe)

2 months agoVERSION: Bump version up to Samba 4.23.0rc3...
Jule Anger [Fri, 22 Aug 2025 15:31:25 +0000 (17:31 +0200)] 
VERSION: Bump version up to Samba 4.23.0rc3...

and re-enable GIT_SNAPSHOT.

Signed-off-by: Jule Anger <janger@samba.org>
2 months agoVERSION: Disable GIT_SNAPSHOT for the 4.23.0rc2 release. samba-4.23.0rc2
Jule Anger [Fri, 22 Aug 2025 15:30:46 +0000 (17:30 +0200)] 
VERSION: Disable GIT_SNAPSHOT for the 4.23.0rc2 release.

Signed-off-by: Jule Anger <janger@samba.org>
2 months agoWHATSNEW: Add release notes for Samba 4.23.0rc2.
Jule Anger [Fri, 22 Aug 2025 15:30:02 +0000 (17:30 +0200)] 
WHATSNEW: Add release notes for Samba 4.23.0rc2.

Signed-off-by: Jule Anger <janger@samba.org>
2 months agoWHATSNEW: samba-tool domain backup --no-secrets changes
Douglas Bagnall [Wed, 20 Aug 2025 00:18:53 +0000 (12:18 +1200)] 
WHATSNEW: samba-tool domain backup --no-secrets changes

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 months agothird_party:quic_ko_wrapper Fix compilation with clang-20
Gary Lockyer [Thu, 14 Aug 2025 21:38:07 +0000 (09:38 +1200)] 
third_party:quic_ko_wrapper Fix compilation with clang-20

Rework the code to remove the non portable variable length array in the union.
Based on the code in wrap_msghdr_add_cmsghdr().

NOTE: this removes the 64 bit alignment, which I think should be ok.

./../third_party/quic_ko_wrapper/quic_ko_wrapper.c:3523:11: error:
   fields must have a constant size: 'variable length array in structure'
   extension will never be supported
  3523 |                 uint8_t cmbuf[cmspace];
       |                         ^
1 error generated.

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

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Björn Baumbach <bb@sernet.de>
Autobuild-Date(master): Wed Aug 20 15:04:34 UTC 2025 on atb-devel-224

(cherry picked from commit 26065e1f1ee111f5ddfb64782638492af65aeb95)

Autobuild-User(v4-23-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-23-test): Fri Aug 22 13:11:45 UTC 2025 on atb-devel-224

2 months agothird_party:quic Fix compilation with clang-20
Gary Lockyer [Thu, 14 Aug 2025 21:33:24 +0000 (09:33 +1200)] 
third_party:quic Fix compilation with clang-20

Add -Wno-error=format-nonliteral so that quic builds with clang 20

../../third_party/quic/libquic/handshake.c:106:35: error:
   format string is not a string literal [-Werror,-Wformat-nonliteral]
  106 |         rc = vsnprintf(msg, sizeof(msg), fmt, arg);
      |                                          ^~~
../../third_party/quic/libquic/handshake.c:135:35: error:
   format string is not a string literal [-Werror,-Wformat-nonliteral]
  135 |         rc = vsnprintf(msg, sizeof(msg), fmt, arg);
      |                                          ^~~
../../third_party/quic/libquic/handshake.c:164:35: error:
   format string is not a string literal [-Werror,-Wformat-nonliteral]
  164 |         rc = vsnprintf(msg, sizeof(msg), fmt, arg);
      |                                          ^~~

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

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit de7932ea8d12348208f50f7b050b826d236ea597)

2 months agothird_party: fix libquic build on older systems
Björn Baumbach [Fri, 8 Aug 2025 15:31:34 +0000 (17:31 +0200)] 
third_party: fix libquic build on older systems

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

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

Signed-off-by: Björn Baumbach <bb@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 149933854f39b4628b14abc5dcd57e73e2a0a637)

2 months agolibads: change netlogon_pings() behaviour wrt to min_servers parameter
Ralph Boehme [Thu, 24 Jul 2025 10:59:30 +0000 (12:59 +0200)] 
libads: change netlogon_pings() behaviour wrt to min_servers parameter

Currently if a caller passes min_servers=X with X>1, netlogon_pings() will fail
if it can't contact X DCs. This is not really what we want. What we want is: we
want at least one DC, and up to X.

Change implemenentation in that sense and rename the min_servers argument to
wanted_servers to express this behaviour change.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Aug 13 19:31:10 UTC 2025 on atb-devel-224

(cherry picked from commit 85dd55a5fef0049660126bdcd48abfa1c48da259)

2 months agolibads: reverse termination condition in netlogon_pings_done()
Ralph Boehme [Thu, 24 Jul 2025 10:55:30 +0000 (12:55 +0200)] 
libads: reverse termination condition in netlogon_pings_done()

No change in behaviour, prepares for upcoming change and minimizes its diff.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit 6643d1fb3375903e2857e5bff33b39a4562c5a4d)

2 months agoidmap_ad: add and use ldap_timeout and fix LDAP server failover
Ralph Boehme [Thu, 24 Jul 2025 13:49:19 +0000 (15:49 +0200)] 
idmap_ad: add and use ldap_timeout and fix LDAP server failover

The key parts are:

1. If an LDAP search fails with the hardcoded fatal error, remove the
retry. That would only retry the query against the same server, taken
from the DCINFO cache key. Instead, force a DC rediscovery.

2. Set a default ldap_timeout and pass it to tldap_search(). This
avoids tldap_search() hanging forever on a stale TCP connection.

3. The LDAP server idmap_ad is using is not necessarily the same DC
we're using for RPC, so in case we learn about a dead DC, put it in
the negative-conn-cache.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit 4d69ec473b7be763399c9787eda8e659a1582184)