]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
9 days agoctdb-common: Only respect CTDB_SOCKET in CTDB_TEST_MODE v4-22-test
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

9 days 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)

9 days 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)

10 days 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

10 days 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)

3 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

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

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

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

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

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

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

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

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

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

6 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>
6 weeks agoVERSION: Disable GIT_SNAPSHOT for the 4.22.4 release. v4-22-stable 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>
6 weeks 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>
6 weeks 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

2 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

2 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

2 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>
2 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>
2 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>
2 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>
2 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

2 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)

3 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

3 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

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

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

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

4 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]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

4 months agoctdb-daemon: Run "startipreallocate" event in SHUTDOWN runstate
Martin Schwenke [Thu, 15 May 2025 04:01:16 +0000 (14:01 +1000)] 
ctdb-daemon: Run "startipreallocate" event in SHUTDOWN runstate

Even though all nodes may be shutting down there is still a very small
window for a race when multiple nodes are shut down.  For simplicity,
assume 2 nodes.  Assume the shutdowns of nodes are staggered, which is
usual because they're usually initiated by a loop (e.g. onnode -p all
ctdb shutdown).  Although commands can continue in parallel, some
commands are started later than others.

Consider this sequence:

1.  Node 0 reaches ctdb_shutdown_takeover() in
    ctdb_shutdown_sequence() and a takeover run starts

2.  Node 1 has not yet set its runlevel to SHUTDOWN in
    ctdb_shutdown_sequence()

3.  The leader node asks node 1 which IPs it can host

4.  Node 1 replies "all of them"

5.  Node 1 now sets its runlevel to SHUTDOWN in
    ctdb_shutdown_sequence()

6.  The leader node continues with the takeover run, first asking all
    nodes to run "startipreallocate"

7.  Node 0 runs "startipreallocate", so its NFS server starts grace

8.  Node 1 does not run "startipreallocate" because it is not in
    RUNNING runstate, so its NFS server does not start grace

9.  The leader node continues with the takeover run, first asking all
    nodes to run "releaseip" for IPs they can no longer hold

10. Node 0 releases all IPs, since it is SHUTDOWN runstate (so can't
    host IPs)

11. As part of this, the NFS server on node 0 releases locks held
    against IPs it is releasing

12. A client connected to node 1, where the NFS server is not in
    grace, takes ("steals") one of those locks

This client is then permitted to reclaim the lock when nodes are
restarted.

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 4877541cfd8f782f516f6471edc52629720963fb)

4 months agoctdb-daemon: Add configuration option shutdown failover timeout
Martin Schwenke [Mon, 12 May 2025 02:00:28 +0000 (12:00 +1000)] 
ctdb-daemon: Add configuration option shutdown failover timeout

Allows the timeout for failover during shutdown to be modified.
Defaults to 10s.

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

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
SQ

Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit dd9b73119afd3a0c60c87c938b5aefc766ca78d2)

4 months agoctdb-daemon: Add failover on shutdown
Martin Schwenke [Mon, 12 May 2025 01:33:19 +0000 (11:33 +1000)] 
ctdb-daemon: Add failover on shutdown

Without this, NFS servers on other nodes will not go into grace before
this node releases locks.  This should also support improved behaviour
for SMB durable file handles.

The timeout is currently a constant 10s.  However, it will
subsequently be switched to an option.

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 b84fbd7b3fedc998633400981ce0c5dc963d052e)

4 months agoctdb-protocol: Add CTDB server SRVID range
Martin Schwenke [Wed, 14 May 2025 06:55:51 +0000 (16:55 +1000)] 
ctdb-protocol: Add CTDB server SRVID range

Normally, communication from other components to ctdbd is done via
controls.  However, there are contexts where receiving SRVID messages
in ctdbd makes sense, such as replies to outgoing SRVID messages.

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 631d1d38ad10c73aa559561bea6b5ed45c2226c4)

4 months agoctdb-daemon: Avoid aborting during early shutdown
Martin Schwenke [Wed, 21 May 2025 12:17:42 +0000 (22:17 +1000)] 
ctdb-daemon: Avoid aborting during early shutdown

An early shutdown can put ctdbd into SHUTDOWN runstate before ctdbd
has completed all early initialisation.  Some of the start-time
transitions then attempt to set the runstate to FIRST_RECOVERY or
RUNNING, which would make the runstate go backwards, so ctdbd aborts.

Upcoming changes cause ctdbd shutdown to take longer, so the problem
will become more likely.  With those changes, this can be
unreliably (50% of the time?)  triggered by:

  ctdb/tests/INTEGRATION/simple/cluster.091.version_check.sh

since it does an early shutdown due to a version mismatch.

Avoid this by noticing when the runstate is SHUTDOWN and refusing to
continue with subsequent early initialisation steps, which aren't
needed when shutting down.

Earlier runstate transitions do not seems likely to cause an abort
during early shutdown.  The following:

  ./tests/local_daemons.sh foo start 0; ./tests/local_daemons.sh foo stop 0

sees ctdbd already into FIRST_RECOVERY before the shutdown is
processed.

The change to ctdb_run_startup() probably isn't strictly necessary.
There will be no abort in this case.  ctdb_shutdown_sequence() will
always run the "shutdown" event and then stop the event daemon, so it
doesn't seem possible that services could be left running.  However,
we might as well avoid running the "startup" event when shutting down,
even if only to avoid confusing logs.

Ultimately, it seems like some redesign would be needed to avoid this
in a more predictable manner, rather than responding when an early
initialisation step inconveniently completes during shutdown.  For
example, hanging a lot of the start-time event handling off a common
talloc context, could allow it to be cancelled with a single
TALLOC_FREE().  However, a change like that would involve a lot of
analysis to ensure that the talloc hierarchy is correct and there is
no change of free'd pointers being dereferenced.  So, we're probably
better off just keeping this issue in mind during a broader redesign.

This workaround appears to be sufficient.

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 c03e6b9d50cac67fe33dc6b120996d1915331be6)

4 months agos3:rpc_server: make sure we can bind to the same port on all ip addresses
Stefan Metzmacher [Wed, 23 Apr 2025 08:58:55 +0000 (10:58 +0200)] 
s3:rpc_server: make sure we can bind to the same port on all ip addresses

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 783ca9dc434bd1d18b762185ee936fcbcf292124)

Autobuild-User(v4-22-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-22-test): Thu May  8 14:04:08 UTC 2025 on atb-devel-224

4 months agovfs_ceph_snapshots: Always calculate absolute snapshot path
Anoop C S [Tue, 4 Mar 2025 10:45:05 +0000 (16:15 +0530)] 
vfs_ceph_snapshots: Always calculate absolute snapshot path

Use the same logic from shadow_copy2 module to always prepend the
connectpath to the relative snapshot path so as to return converted
path corresponding to the file's share root.

Please note that with the current working directory staying at the
connectpath level we are safe to prefix it to the smb_filename. In
other words it seems we never get past the connectpath internally
during normal file system operations via chdir(). Since all relative
paths are now based on dirfsp we could constitute absolute path by
prepending the connectpath to full_path_from_dirfsp_atname() output
ignoring the current working directory.

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

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Wed Apr 30 11:32:59 UTC 2025 on atb-devel-224

(cherry picked from commit 95a2b50b1983a6ba810a96f50b27db7c992c02c0)

Autobuild-User(v4-22-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-22-test): Thu May  8 12:54:02 UTC 2025 on atb-devel-224

4 months agovfs_ceph_snapshots: Use full path from dirfsp at smb_fname
Anoop C S [Tue, 4 Mar 2025 09:39:33 +0000 (15:09 +0530)] 
vfs_ceph_snapshots: Use full path from dirfsp at smb_fname

In ceph_snap_gmt_openat() we hand in the incoming smb_fname as it is
to ceph_snap_gmt_strip_snapshot() which is then passed on to derive
the actual snapshot path using ceph_snap_gmt_convert(). But this can
go wrong in ceph_snap_gmt_convert_dir() while opening the snapdir.
Unless we constitute the full path from dirfsp at the first place we
always end up opening the snapdir from the parent directory with
OpenDir().

For example with dirfsp("foobar") and smb_fname("shift.txt"), we open
snapdir from share root because parent is calculated as empty string
via ceph_snap_get_parent_path(). Instead we could construct the full
path from dirfsp using full_path_from_dirfsp_atname() to ensure we
don't open the wrong snapdir.

Since we have access to the twrp token at VFS layer it doesn't make
much sense to make use of ceph_snap_gmt_strip_snapshot() in openat.
We could instead directly act based on already available twrp token
avoiding an extra copy of incoming smb_filename.

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

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: David Disseldorp ddiss@samba.org
(cherry picked from commit ad8b2dbb67d87db22f2fa2df814dd91cbe071e60)

4 months agolib/krb5_wrap: Fix placement of TALLOC_FREE(frame)
Pavel Filipenský [Wed, 23 Apr 2025 07:34:14 +0000 (09:34 +0200)] 
lib/krb5_wrap: Fix placement of TALLOC_FREE(frame)

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

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Apr 23 12:14:17 UTC 2025 on atb-devel-224

(cherry picked from commit b5bd36dfd7dfd9a09a3f9378330df3be9db4551f)

5 months agoVERSION: Bump version up to Samba 4.22.2...
Jule Anger [Thu, 17 Apr 2025 17:10:45 +0000 (19:10 +0200)] 
VERSION: Bump version up to Samba 4.22.2...

and re-enable GIT_SNAPSHOT.

Signed-off-by: Jule Anger <janger@samba.org>
5 months agoVERSION: Disable GIT_SNAPSHOT for the 4.22.1 release. samba-4.22.1
Jule Anger [Thu, 17 Apr 2025 17:10:27 +0000 (19:10 +0200)] 
VERSION: Disable GIT_SNAPSHOT for the 4.22.1 release.

Signed-off-by: Jule Anger <janger@samba.org>
5 months agoWHATSNEW: Add release notes for Samba 4.22.1.
Jule Anger [Thu, 17 Apr 2025 17:09:56 +0000 (19:09 +0200)] 
WHATSNEW: Add release notes for Samba 4.22.1.

Signed-off-by: Jule Anger <janger@samba.org>
5 months agolibcli/smb: make smb2_lease_{pull,push} endian safe
Stefan Metzmacher [Wed, 16 Apr 2025 13:18:12 +0000 (15:18 +0200)] 
libcli/smb: make smb2_lease_{pull,push} endian safe

smbd_smb2_send_lease_break() is already endian safe,
which means we'll get a mismatch on big endian systems,
so that smbd_smb2_send_lease_break() sends the lease key
in reversed order.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Apr 17 11:30:58 UTC 2025 on atb-devel-224

(cherry picked from commit 80d5fa134d51b4b2238f775fea0af3d511bf3144)

Autobuild-User(v4-22-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-22-test): Thu Apr 17 17:03:35 UTC 2025 on atb-devel-224

5 months agolibcli/smb: convert smb2_lease_push() to PUSH_LE_U*
Stefan Metzmacher [Wed, 16 Apr 2025 13:18:12 +0000 (15:18 +0200)] 
libcli/smb: convert smb2_lease_push() to PUSH_LE_U*

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
(cherry picked from commit edf9cf4b29dab78f63eec8391cd1cd9eef861612)

5 months agolibcli/smb: make the last 2 reserved bytes explicit in smb2_lease_push()
Stefan Metzmacher [Wed, 16 Apr 2025 13:18:12 +0000 (15:18 +0200)] 
libcli/smb: make the last 2 reserved bytes explicit in smb2_lease_push()

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
(cherry picked from commit cbe438eb1a3c44f5cd46c5e685da9964da64f892)

5 months agolibcli/smb: convert smb2_lease_pull() to PULL_LE_U*
Stefan Metzmacher [Wed, 16 Apr 2025 13:18:12 +0000 (15:18 +0200)] 
libcli/smb: convert smb2_lease_pull() to PULL_LE_U*

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
(cherry picked from commit 31ebf2cd1daeed25fab92ef71f7591fea8c92226)

5 months agos3:smbd: work around broken "vfs mkdir use tmp name" on FAT
Stefan Metzmacher [Wed, 16 Apr 2025 09:51:28 +0000 (11:51 +0200)] 
s3:smbd: work around broken "vfs mkdir use tmp name" on FAT

"vfs mkdir use tmp name" creates a name with ":" because the file should
be invisible for Windows clients. ":" however is an invalid character on
FAT filesystems and we get EINVAL back. In that case we fall back to not
using tmp names for mkdir.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
(cherry picked from commit c2b74ef093aff6175ef8e4572a203e5beacc527f)

5 months agovfs: Fix "wide links = yes"
Volker Lendecke [Thu, 3 Apr 2025 08:04:42 +0000 (10:04 +0200)] 
vfs: Fix "wide links = yes"

vfs_wide_links hides symlinks from the rest of smbd, and it implicitly
follows symlinks. Also, O_PATH will expose symlinks to the rest of
smbd, remove that.

We also need to do this for posix paths, as deep inside
rename_internals we want to avoid case-insensitive lookups by setting
SMB_FILENAME_POSIX_PATH.

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Apr 16 20:56:33 UTC 2025 on atb-devel-224

(cherry picked from commit 9e637a28bd0b5adc2d90df9ca4a1c864a648b0f4)

5 months agopython:gp_cert_auto_enrol: fix GUID stringification
Douglas Bagnall [Mon, 24 Mar 2025 22:26:12 +0000 (22:26 +0000)] 
python:gp_cert_auto_enrol: fix GUID stringification

We were using some broken ad-hoc unpacking to do what the ndr
unpacker does perfectly well.

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

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Tue Mar 25 05:21:49 UTC 2025 on atb-devel-224

(cherry picked from commit 47ff42232048c008a7b361a948e5ac79311b5458)

Autobuild-User(v4-22-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-22-test): Thu Apr 17 12:49:13 UTC 2025 on atb-devel-224

5 months agosamba-tool gpo: better entities check copes with new lines
Douglas Bagnall [Fri, 14 Mar 2025 04:45:18 +0000 (17:45 +1300)] 
samba-tool gpo: better entities check copes with new lines

Per https://www.w3.org/TR/xml/#sec-entity-decl (and MS references)
there is always some whitespace between '<!ENTITY' and the name, and
between the name and whatever is next. Also, it is valid XML to have
newlines inside entity declarations, like this:

<!ENTITY
    bubble
      "*S-1-5-113"
      >

We used to create such files, so we should allow them.

There is a kind of entity that has '%' before the name, and there are
non-ascii names, which we continue not to support.

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

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
(cherry picked from commit 6107656ebc8d092b2c1907940b2486ab0265aad9)

5 months agosamba-tool gpo backup fix --generalize
Douglas Bagnall [Fri, 14 Mar 2025 08:55:29 +0000 (21:55 +1300)] 
samba-tool gpo backup fix --generalize

This was broken with commit ce56d336f234febfd4cb3da11dd584842c24ce1d
but we didn't notice because the test was already broken.

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

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
(cherry picked from commit 65751f2562f98bd7fd0734dc00784e6395d76322)

5 months agopytest: samba-tool gpo: fix has_difference(sortlines=True)
Douglas Bagnall [Fri, 14 Mar 2025 06:52:57 +0000 (19:52 +1300)] 
pytest: samba-tool gpo: fix has_difference(sortlines=True)

We had

             file1 = open(path1).readlines()
             file1.sort()
             file2 = open(path1).readlines()
             file2.sort()

which is opening path1 in both cases.

This meant we were testing nothing because the assertions are all that
the files are the same -- though the only affected check is one in
test_backup_restore_generalize().

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

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
(cherry picked from commit 6b619b568f6661d3a5f0701cdfaf1e1e4943ff6f)

5 months agopython:netcmd:gpo: fix crash when updating an MOTD GPO
Andreas Hasenack [Tue, 18 Feb 2025 15:43:46 +0000 (12:43 -0300)] 
python:netcmd:gpo: fix crash when updating an MOTD GPO

When the policy exists already, there is no exception and the code
tries to use the "data" variable, but it doesn't exist because it was
only defined in the exception handling.

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

Signed-off-by: Andreas Hasenack <andreas.hasenack@canonical.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
(cherry picked from commit e87e20c04d90292e3a5caac8ea3105b16f948ed3)

5 months agopytest: check we can set GPO more than once
Douglas Bagnall [Fri, 14 Mar 2025 05:22:53 +0000 (18:22 +1300)] 
pytest: check we can set GPO more than once

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

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
(cherry picked from commit 969cb41e06247949c3992cab25e824795204e31e)

5 months agos3:rpc_server/srvsvc: use brl_get_locks_readonly() instead of brl_get_locks()
Ralph Boehme [Tue, 28 Jan 2025 13:48:39 +0000 (14:48 +0100)] 
s3:rpc_server/srvsvc: use brl_get_locks_readonly() instead of brl_get_locks()

No need to keep the record locked longer then needed.

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

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