]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
3 weeks agoVERSION: Disable GIT_SNAPSHOT for the 4.22.6 release. v4-22-stable samba-4.22.6
Jule Anger [Thu, 16 Oct 2025 14:26:24 +0000 (16:26 +0200)] 
VERSION: Disable GIT_SNAPSHOT for the 4.22.6 release.

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

Signed-off-by: Jule Anger <janger@samba.org>
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-22-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-22-test): Wed Oct 15 16:04:41 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.22.6...
Jule Anger [Wed, 15 Oct 2025 13:09:04 +0000 (15:09 +0200)] 
VERSION: Bump version up to Samba 4.22.6...

and re-enable GIT_SNAPSHOT.

Signed-off-by: Jule Anger <janger@samba.org>
3 weeks agoMerge tag 'samba-4.22.5' into v4-22-test
Jule Anger [Wed, 15 Oct 2025 13:03:17 +0000 (15:03 +0200)] 
Merge tag 'samba-4.22.5' into v4-22-test

samba: tag release samba-4.22.5

3 weeks agoVERSION: Disable GIT_SNAPSHOT for the 4.22.5 release. samba-4.22.5
Jule Anger [Tue, 14 Oct 2025 14:37:08 +0000 (16:37 +0200)] 
VERSION: Disable GIT_SNAPSHOT for the 4.22.5 release.

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

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>
3 weeks agoVERSION: Bump version up to Samba 4.22.5...
Jule Anger [Thu, 21 Aug 2025 15:20:24 +0000 (17:20 +0200)] 
VERSION: Bump version up to Samba 4.22.5...

and re-enable GIT_SNAPSHOT.

Signed-off-by: Jule Anger <janger@samba.org>
(cherry picked from commit 31b82351af11bf4cf1fcd656e2c4ea4ef463d6f4)

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-22-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-22-test): Fri Sep 26 15:10:56 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 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)

Autobuild-User(v4-22-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-22-test): Thu Sep 25 13:24:44 UTC 2025 on atb-devel-224

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)

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-22-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-22-test): Thu Sep 11 11:06:53 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>
(backported 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 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)

8 weeks 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)

8 weeks 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)

8 weeks 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)

8 weeks 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)

8 weeks 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)

8 weeks 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: Disable GIT_SNAPSHOT for the 4.22.4 release. samba-4.22.4
Jule Anger [Thu, 21 Aug 2025 15:20:08 +0000 (17:20 +0200)] 
VERSION: Disable GIT_SNAPSHOT for the 4.22.4 release.

Signed-off-by: Jule Anger <janger@samba.org>
2 months agoVERSION: Bump version up to Samba 4.22.5...
Jule Anger [Thu, 21 Aug 2025 15:20:24 +0000 (17:20 +0200)] 
VERSION: Bump version up to Samba 4.22.5...

and re-enable GIT_SNAPSHOT.

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

Signed-off-by: Jule Anger <janger@samba.org>
2 months agowinbindd: use find_domain_from_name_noinit() in find_dns_domain_name()
Ralph Boehme [Tue, 22 Jul 2025 17:16:14 +0000 (19:16 +0200)] 
winbindd: use find_domain_from_name_noinit() in find_dns_domain_name()

Avoid triggering a connection to a DC of a trusted domain.

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

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

Autobuild-User(v4-22-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-22-test): Thu Aug 21 15:08:53 UTC 2025 on atb-devel-224

2 months agolibads: fix get_kdc_ip_string()
Ralph Boehme [Tue, 22 Jul 2025 17:22:31 +0000 (19:22 +0200)] 
libads: fix get_kdc_ip_string()

Correctly handle the interaction between optionally passed in DC via
pss and DC lookup.

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

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

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)

2 months agotldap: use tevent_req_set_endtime() to terminate LDAP searches
Ralph Boehme [Mon, 21 Jul 2025 04:44:22 +0000 (06:44 +0200)] 
tldap: use tevent_req_set_endtime() to terminate LDAP searches

Needed to detect unresponsive LDAP servers, otherwise we might be sitting up to
924.6 seconds after sending a request before the kernel notifies us of a broken
connection.

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 4e79fe13325385ef4fe37baeec8656c9b332de19)

2 months agovfs: Fix vfs_streams_depot's fstatat
Volker Lendecke [Tue, 25 Feb 2025 11:09:58 +0000 (12:09 +0100)] 
vfs: Fix vfs_streams_depot's fstatat

a24c7d566f2 does not cover subdirectories

Bug: https://bugzilla.samba.org/show_bug.cgi?id=15816
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 Feb 26 09:00:34 UTC 2025 on atb-devel-224

(cherry picked from commit 125862c617efae6926c91acae44206f29e61b148)

2 months agovfs_virsufilter: Fix the invocation of SMB_VFS_NEXT_CONNECT
Rabinarayan Panigrahi [Tue, 15 Jul 2025 15:45:49 +0000 (21:15 +0530)] 
vfs_virsufilter: Fix the invocation of SMB_VFS_NEXT_CONNECT

virusfilter is failing if path is defined for virusfilter:quarantine
as next module is not initialized by mean time. So rearranged invocation
of SMB_VFS_NEXT_CONNECT call

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

Signed-off-by: Rabinarayan Panigrahi <rapanigr@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Mon Jul 21 11:28:12 UTC 2025 on atb-devel-224

(cherry picked from commit 605d4d065cd5951385a744230cf7f159468c02a2)

2 months agoctdb: Fix a stuck cluster lock holder after a delayed leader bcast
Volker Lendecke [Wed, 6 Aug 2025 13:28:29 +0000 (15:28 +0200)] 
ctdb: Fix a stuck cluster lock holder after a delayed leader bcast

If a delayed broadcast by a previous cluster lock holder arrives, the
new legitimate leader will accept this without questioning in
leader_handler(). Without this patch rec->leader will never be
overwritten, and because rec->pnn != rec->leader we'll also never send
out fresh leader broadcasts. And because we hold the cluster lock,
nobody else can step up.

Fix this in the next round of leader broadcast timeout.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=15892
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Thu Aug  7 02:59:20 UTC 2025 on atb-devel-224

(cherry picked from commit 1a7cfd93432a227a972b34e1eb844134173be7b0)

Autobuild-User(v4-22-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-22-test): Thu Aug 21 08:58:34 UTC 2025 on atb-devel-224

2 months agosmbd: fix mode being sent to possibly_set_archive
Srinivas Rao V [Thu, 3 Jul 2025 14:19:46 +0000 (10:19 -0400)] 
smbd: fix mode being sent to possibly_set_archive

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

possibly_set_archive is being passed smb_fname->st.st_ex_mode.
Inside the function same variable is getting assigned to itself.
Fixed this to send unx_mode to possibly_set_archive.

Signed-off-by: Srinivas Rao V <Srinivas.Rao.V@ibm.com>
Reviewed-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): Fri Jul 18 22:25:05 UTC 2025 on atb-devel-224

(cherry picked from commit 1d1acebf01902bef3a9ccae23c3be4cacbb777b2)

Autobuild-User(v4-22-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-22-test): Thu Aug 14 12:32:46 UTC 2025 on atb-devel-224

2 months agos3:utils: Allow ROLE_IPA_DC to allow to use Kerberos in gensec
Pavel Filipenský [Mon, 4 Aug 2025 21:28:24 +0000 (23:28 +0200)] 
s3:utils: Allow ROLE_IPA_DC to allow to use Kerberos in gensec

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

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Aug  5 14:51:51 UTC 2025 on atb-devel-224

(cherry picked from commit a4dff82e45308db3ccabac2a55c03d52f04d7b4d)

Autobuild-User(v4-22-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-22-test): Mon Aug 11 07:53:47 UTC 2025 on atb-devel-224

2 months agos3:netlogon: IPA DC is the PDC as well - allow ROLE_IPA_DC in _netr_DsRGetForestTrust...
Pavel Filipenský [Mon, 4 Aug 2025 21:26:02 +0000 (23:26 +0200)] 
s3:netlogon: IPA DC is the PDC as well - allow ROLE_IPA_DC in _netr_DsRGetForestTrustInformation()

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

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 1dbafcc4e4ff8f39af5ca737b30e9821413dd1f2)

2 months agodocs-xml: Make smb.conf 'server role' value consistent with ROLE_IPA_DC in libparam
Pavel Filipenský [Mon, 4 Aug 2025 06:35:29 +0000 (08:35 +0200)] 
docs-xml: Make smb.conf 'server role' value consistent with ROLE_IPA_DC in libparam

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

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

2 months agos3:winbindd: Resolve dc name using CLDAP also for ROLE_IPA_DC
Pavel Filipenský [Wed, 23 Jul 2025 13:09:21 +0000 (15:09 +0200)] 
s3:winbindd: Resolve dc name using CLDAP also for ROLE_IPA_DC

server role ROLE_IPA_DC (introduced in e2d5b4d) needs special handling
in dcip_check_name().  We should resolve the DC name using:
- CLDAP in dcip_check_name_ads()
instead of:
- NETBIOS in nbt_getdc() that fails if Windows is not providing netbios.

The impacted environment has:

domain->alt_name = example.com
domain->active_directory = 1
security = USER
server role = ROLE_IPA_DC

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

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

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

2 months agos3-net: fix "net ads kerberos" krb5ccname handling
Günther Deschner [Sun, 20 Jul 2025 16:00:22 +0000 (18:00 +0200)] 
s3-net: fix "net ads kerberos" krb5ccname handling

We can only rely on KRB5CCNAME being set, --use-krb5-ccname content is
not available.

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

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Thu Jul 24 17:31:14 UTC 2025 on atb-devel-224

(cherry picked from commit 8a97afdae788e8d10a51035f8b287dc00293f90d)

2 months agos3-selftest: add tests for "net ads kerberos" commands
Günther Deschner [Sun, 20 Jul 2025 15:59:37 +0000 (17:59 +0200)] 
s3-selftest: add tests for "net ads kerberos" commands

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

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 18d0574a0fe4b5fd468f949cfaa507ab4519c9e6)

3 months agos3/libsmb: check the negative-conn-cache in resolve_ads()
Ralph Boehme [Thu, 3 Jul 2025 16:42:04 +0000 (18:42 +0200)] 
s3/libsmb: check the negative-conn-cache in resolve_ads()

This way we throw away blacklisted servers right away when learning about them
from the DNS SRV query.

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

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 Jul 30 10:10:21 UTC 2025 on atb-devel-224

(cherry picked from commit c1ee6fe9a489a8923d607e14d26768935a398849)

Autobuild-User(v4-22-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-22-test): Thu Aug  7 13:50:32 UTC 2025 on atb-devel-224

3 months agos3/libsmb: check command in make_dc_info_from_cldap_reply()
Ralph Boehme [Wed, 2 Jul 2025 16:49:51 +0000 (18:49 +0200)] 
s3/libsmb: check command in make_dc_info_from_cldap_reply()

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

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

3 months agolibads: check for if DCs are in paused state when processing CLDAP replies
Ralph Boehme [Thu, 3 Jul 2025 10:50:53 +0000 (12:50 +0200)] 
libads: check for if DCs are in paused state when processing CLDAP replies

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

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

3 months agos3/libads: get rid of additional loop calling add_failed_connection_entry()
Ralph Boehme [Tue, 1 Jul 2025 16:19:32 +0000 (18:19 +0200)] 
s3/libads: get rid of additional loop calling add_failed_connection_entry()

Just call add_failed_connection_entry() in the initial loop at all places where
we have a "bad" result.

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

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

3 months agos3:libads: let get_kdc_ip_string() check for a blacklisted server name
Stefan Metzmacher [Tue, 4 Jul 2023 16:07:51 +0000 (18:07 +0200)] 
s3:libads: let get_kdc_ip_string() check for a blacklisted server name

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit 63051a2dcbe3a4a07f029e0c18aa90bd3f56b0a4)

3 months agos3:libads: let cldap_ping_list() check for a blacklisted server name
Stefan Metzmacher [Wed, 16 Feb 2022 12:09:14 +0000 (13:09 +0100)] 
s3:libads: let cldap_ping_list() check for a blacklisted server name

If we black listed a server we should not use it even if
it responses to CLDAP requests.

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

Pair-Programmed-With: Ralph Boehme <slow@samba.org>
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit 08c8760ad9706b62755e35acaa121647344a4c9e)

3 months agowinbindd: blacklist servers returning ACCESS_DENIED/authoritative=0
Stefan Metzmacher [Wed, 16 Feb 2022 13:23:16 +0000 (14:23 +0100)] 
winbindd: blacklist servers returning ACCESS_DENIED/authoritative=0

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

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

3 months agowinbindd: always use winbind_add_failed_connection_entry() wrapper
Stefan Metzmacher [Wed, 16 Feb 2022 13:18:50 +0000 (14:18 +0100)] 
winbindd: always use winbind_add_failed_connection_entry() wrapper

We should not use add_failed_connection_entry() directly.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit 7fed75c495ead8f476c805b91cc6624ebf933427)

3 months agos3:conncache: improve debugging for the negative connection cache
Stefan Metzmacher [Wed, 16 Feb 2022 13:18:20 +0000 (14:18 +0100)] 
s3:conncache: improve debugging for the negative connection cache

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit 613ac83fb7666f5b132187d5587053e0d7dcd46d)

3 months agolibads: fix get_kdc_ip_string() ...
Ralph Boehme [Fri, 4 Jul 2025 15:50:40 +0000 (17:50 +0200)] 
libads: fix get_kdc_ip_string() ...

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

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): Mon Jul  7 16:46:29 UTC 2025 on atb-devel-224

(cherry picked from commit 88572cc8f629a737a1d5b33d5800f3692895233f)

Autobuild-User(v4-22-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-22-test): Mon Jul 21 09:30:29 UTC 2025 on atb-devel-224

3 months agoAdd check for the GPO link to have at least two attributes separated by semicolumn...
Aleksandr Sharov [Fri, 4 Jul 2025 13:32:28 +0000 (15:32 +0200)] 
Add check for the GPO link to have at least two attributes separated by semicolumn. Allows to handle empty links.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15877
RN: Fix handling of empty GPO link

Singed-off-by: Alex Sharov (kororland@gmail.com)
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Jul 10 18:55:33 UTC 2025 on atb-devel-224

(cherry picked from commit 44ee31c0258b0afb3d3f2ce17942cc86e308a690)

Autobuild-User(v4-22-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-22-test): Thu Jul 17 10:48:14 UTC 2025 on atb-devel-224

3 months agoWHATSNEW: fix typo
Jule Anger [Thu, 17 Jul 2025 09:38:11 +0000 (11:38 +0200)] 
WHATSNEW: fix typo

Found by script/codespell.sh.

Signed-off-by: Jule Anger <janger@samba.org>
4 months agoVERSION: Bump version up to Samba 4.22.4...
Jule Anger [Mon, 7 Jul 2025 16:16:50 +0000 (18:16 +0200)] 
VERSION: Bump version up to Samba 4.22.4...

and re-enable GIT_SNAPSHOT.

Signed-off-by: Jule Anger <janger@samba.org>
4 months agoVERSION: Disable GIT_SNAPSHOT for the 4.22.3 release. samba-4.22.3
Jule Anger [Mon, 7 Jul 2025 16:16:34 +0000 (18:16 +0200)] 
VERSION: Disable GIT_SNAPSHOT for the 4.22.3 release.

Signed-off-by: Jule Anger <janger@samba.org>
4 months agoWHATSNEW: Add release notes for Samba 4.22.3.
Jule Anger [Mon, 7 Jul 2025 16:16:05 +0000 (18:16 +0200)] 
WHATSNEW: Add release notes for Samba 4.22.3.

Signed-off-by: Jule Anger <janger@samba.org>
4 months agos3-winbindd: Fix internal winbind dsgetdcname calls w.r.t. domain name
Günther Deschner [Wed, 2 Jul 2025 19:59:48 +0000 (21:59 +0200)] 
s3-winbindd: Fix internal winbind dsgetdcname calls w.r.t. domain name

when winbind calls to dsgetdcname internally, make sure to
prefer the DNS domain name if we have it. Makes DNS lookups much more
likely to succeed.

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

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Jul  7 10:44:37 UTC 2025 on atb-devel-224

(cherry picked from commit 2560c9b3224816ffd371a62103f65b3aca301ad5)

Autobuild-User(v4-22-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-22-test): Mon Jul  7 15:43:22 UTC 2025 on atb-devel-224

4 months agos3:winbindd: avoid using any netlogon call to get a dc name
Stefan Metzmacher [Fri, 9 May 2025 07:38:41 +0000 (09:38 +0200)] 
s3:winbindd: avoid using any netlogon call to get a dc name

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit f86a4bf6848ade2db7229d182576db3320c3ece7)

4 months agolib:util: Disable logging to syslog for startup messages
Andreas Schneider [Tue, 10 Jun 2025 11:46:13 +0000 (13:46 +0200)] 
lib:util: Disable logging to syslog for startup messages

D_ERR also is sent to syslog!

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Jun 18 12:10:03 UTC 2025 on atb-devel-224

(cherry picked from commit 58c64ba25adb1c1d272ba196529b5465ae7ee9df)

Autobuild-User(v4-22-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-22-test): Thu Jun 26 14:33:11 UTC 2025 on atb-devel-224

4 months agopython: Do not interpret 16 character group names as GUIDs
Douglas Bagnall [Fri, 13 Jun 2025 00:29:02 +0000 (12:29 +1200)] 
python: Do not interpret 16 character group names as GUIDs

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

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Björn Baumbach <bb@samba.org>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Mon Jun 16 22:22:27 UTC 2025 on atb-devel-224

(cherry picked from commit 7c99658e22c6761ccf9abbdea588553a46af7453)

Autobuild-User(v4-22-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-22-test): Thu Jun 19 08:49:44 UTC 2025 on atb-devel-224

4 months agopytest: samba-tool group: test with 16 character name
Douglas Bagnall [Thu, 12 Jun 2025 23:38:22 +0000 (11:38 +1200)] 
pytest: samba-tool group: test with 16 character name

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

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Björn Baumbach <bb@samba.org>
(cherry picked from commit f545a77a3c466e2be37e0c453861566d42b1a01d)

4 months agopytest:samba-tool group: test addmembers
Douglas Bagnall [Fri, 13 Jun 2025 00:23:30 +0000 (12:23 +1200)] 
pytest:samba-tool group: test addmembers

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

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Björn Baumbach <bb@samba.org>
(cherry picked from commit 3150d103bb2990e005d70c90f3f9c316c5353005)

5 months agoVERSION: Bump version up to Samba 4.22.3...
Jule Anger [Thu, 5 Jun 2025 15:35:59 +0000 (17:35 +0200)] 
VERSION: Bump version up to Samba 4.22.3...

and re-enable GIT_SNAPSHOT.

Signed-off-by: Jule Anger <janger@samba.org>
5 months agoVERSION: Disable GIT_SNAPSHOT for the 4.22.2 release. samba-4.22.2
Jule Anger [Thu, 5 Jun 2025 15:35:40 +0000 (17:35 +0200)] 
VERSION: Disable GIT_SNAPSHOT for the 4.22.2 release.

Signed-off-by: Jule Anger <janger@samba.org>
5 months agoWHATSNEW: Add release notes for Samba 4.22.2.
Jule Anger [Thu, 5 Jun 2025 15:34:47 +0000 (17:34 +0200)] 
WHATSNEW: Add release notes for Samba 4.22.2.

Signed-off-by: Jule Anger <janger@samba.org>
5 months agoCVE-2025-0620: smbd: smbd doesn't pick up group membership changes when re-authentica...
Ralph Boehme [Fri, 23 May 2025 06:47:06 +0000 (08:47 +0200)] 
CVE-2025-0620: smbd: smbd doesn't pick up group membership changes when re-authenticating an expired SMB session

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 6f0ae60428a024b4aba92a8103a698c1eca2357c)

Autobuild-User(v4-22-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-22-test): Thu Jun  5 11:55:52 UTC 2025 on atb-devel-224

5 months agosmbd: use fsp->name_hash in check_parent_access_fsp()
Ralph Boehme [Sat, 24 May 2025 09:47:37 +0000 (11:47 +0200)] 
smbd: use fsp->name_hash in check_parent_access_fsp()

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed May 28 16:03:59 UTC 2025 on atb-devel-224

(backported from commit 9b9fc589e55d467c97fd4580c2d6d9aa8cb73b13)
[slow@samba.org: removed write_time arg to get_file_infos() in master]

5 months agosmbd: remove parent_dirname_compatible_open()
Ralph Boehme [Thu, 22 May 2025 15:52:28 +0000 (17:52 +0200)] 
smbd: remove parent_dirname_compatible_open()

This is now handled correctly smbd_smb2_setinfo_rename_dst_parent_check().

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
(cherry picked from commit 17ed8c0f9a0ab8b4b7feb213b4e3a0765f8cc0cd)

5 months agoselftest: stop running smb2.streams against the ad_dc_ntvfs
Ralph Boehme [Mon, 26 May 2025 10:32:16 +0000 (12:32 +0200)] 
selftest: stop running smb2.streams against the ad_dc_ntvfs

This will soon start failing with

UNEXPECTED(failure): samba4.smb2.streams.rename2(ad_dc_ntvfs)
REASON: Exception: Exception: ../../source4/torture/smb2/streams.c:1533: status was NT_STATUS_OBJECT_NAME_COLLISION, expected NT_STATUS_OK: CHECK_STATUS

and I don't see the point in tracking this down for a dead product.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
(cherry picked from commit 69a7d5881bd0d91d270b4a8be4c75dcd94f19897)

5 months agoselftest: stop running smb2.streams against "ad_dc" environment
Ralph Boehme [Mon, 26 May 2025 09:18:57 +0000 (11:18 +0200)] 
selftest: stop running smb2.streams against "ad_dc" environment

Drop running smb2.streams tests against the "ad_dc" environment, to simplify
test failure handling with the knownfail file.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
(cherry picked from commit 8c0888a94bbcd55b5746305ab82c9ce50095db32)

5 months agosmbd: implement H-lease breaks on parent directory of rename target
Ralph Boehme [Thu, 22 May 2025 09:42:13 +0000 (11:42 +0200)] 
smbd: implement H-lease breaks on parent directory of rename target

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
(cherry picked from commit 91b7a5e7ac308040bd60a172280e4429ee25f3b0)

5 months agosmbd: add access_mask to delay_for_handle_lease_break_send()
Ralph Boehme [Fri, 23 May 2025 15:06:50 +0000 (17:06 +0200)] 
smbd: add access_mask to delay_for_handle_lease_break_send()

No change in behaviour, existing caller all pass SEC_RIGHTS_DIR_ALL. Prepares
for selectively breaking only H-leases if the access_mask of the corresponding
open contains DELETE_ACCESS.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
(cherry picked from commit 5d4565c1f974b75a1c080f4503613201ecaf7001)

5 months agosmbd: add has_delete_access_opens()
Ralph Boehme [Wed, 21 May 2025 17:17:54 +0000 (19:17 +0200)] 
smbd: add has_delete_access_opens()

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
(cherry picked from commit 1351b613679acb063d7ef8bc63d438e1ec973a9a)

5 months agosmbd: support breaking leases on an object where we don't have an own internal open
Ralph Boehme [Thu, 22 May 2025 14:57:49 +0000 (16:57 +0200)] 
smbd: support breaking leases on an object where we don't have an own internal open

So far, when dealing with the rename destination, we had an internal open on
that which ensured get_existing_share_mode_lock() would always return a
lock.

Subsequently I'll want delay_for_handle_lease_break_send() to be callable on an
object that doesn't have a full internal open including locking.tdb entry, but
merely an open handle from filename_convert_dirfsp().

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
(cherry picked from commit 03c46342e2a65e6d81bd581471310c0ec2cbbdfb)

5 months agosmbd: expand logging in contend_dirleases()
Ralph Boehme [Fri, 23 May 2025 14:35:35 +0000 (16:35 +0200)] 
smbd: expand logging in contend_dirleases()

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
(cherry picked from commit 509081e7ed064899701a9e53b1597c33bcf5b77d)

5 months agosmbtorture: fix test smb2.notify-inotify.inotify-rename
Ralph Boehme [Fri, 23 May 2025 05:26:53 +0000 (07:26 +0200)] 
smbtorture: fix test smb2.notify-inotify.inotify-rename

Need to remove SEC_STD_DELETE from the access mask, otherwise we can't move
files into this directory.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
(cherry picked from commit 8b346857b837259c017b47cb6a935ed54afc8c60)

5 months agosmbtorture: add test smb2.dirlease.rename_dst_parent
Ralph Boehme [Thu, 22 May 2025 14:56:45 +0000 (16:56 +0200)] 
smbtorture: add test smb2.dirlease.rename_dst_parent

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
(cherry picked from commit a2827f4d6d8b56de08adaee35a051022f255769e)

5 months agosmbtorture: add support for closing a handle when receiving a lease break
Ralph Boehme [Thu, 22 May 2025 15:50:46 +0000 (17:50 +0200)] 
smbtorture: add support for closing a handle when receiving a lease break

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
(cherry picked from commit d88885b77cd9d86969eac2cd2010ed31e329106a)

5 months agosmbtorture: make torture_lease_break_callback() static
Ralph Boehme [Thu, 22 May 2025 15:50:09 +0000 (17:50 +0200)] 
smbtorture: make torture_lease_break_callback() static

It's only used in this compilation unit.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
(cherry picked from commit 56fe5e8ef192f38b928eed9b454709242f02699e)

5 months agosmbtorture: remove unused torture_lease_ignore_handler()
Ralph Boehme [Thu, 22 May 2025 15:49:31 +0000 (17:49 +0200)] 
smbtorture: remove unused torture_lease_ignore_handler()

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
(cherry picked from commit e1a38cd3f9f5665c9f7dd202fec1c7ec72fa419c)

5 months agoctdb-daemon: Modernise some DEBUGs
Martin Schwenke [Mon, 19 May 2025 00:06:21 +0000 (10:06 +1000)] 
ctdb-daemon: Modernise some DEBUGs

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

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Thu May 29 10:57:35 UTC 2025 on atb-devel-224

(cherry picked from commit 5a582bddd834fffe2b27cc8b2e9468fa84dfc6f2)

5 months agoctdb-daemon: Add configuration option shutdown extra timeout
Martin Schwenke [Sun, 18 May 2025 23:06:38 +0000 (09:06 +1000)] 
ctdb-daemon: Add configuration option shutdown extra timeout

See documentation change for details.

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

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit 3a770c8d46934870f42059640b0aaa0c76a3f4fb)