]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
10 hours agos4:torture/smb2: split out smb2.persistent-open-reconnect-contended master
Stefan Metzmacher [Fri, 24 Jul 2026 07:04:29 +0000 (09:04 +0200)] 
s4:torture/smb2: split out smb2.persistent-open-reconnect-contended

This means the rule in selftest/skip actually works.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Jul 29 08:33:12 UTC 2026 on atb-devel-224

11 hours agos3:selftest: use CLUSTERED_PERSISTENT_TESTS = smbtorture4_testsuites("smb2.persistent")
Stefan Metzmacher [Fri, 24 Jul 2026 07:40:22 +0000 (09:40 +0200)] 
s3:selftest: use CLUSTERED_PERSISTENT_TESTS = smbtorture4_testsuites("smb2.persistent")

This is better than list tests manually, so new tests will
be added automatically.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
11 hours agos3:selftest: run all smb2.persistent tests against //fileserver/ca_fo_max_rwh
Stefan Metzmacher [Fri, 24 Jul 2026 07:38:14 +0000 (09:38 +0200)] 
s3:selftest: run all smb2.persistent tests against //fileserver/ca_fo_max_rwh

This makes sure new tests will by default against a useful
share.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
26 hours agoCVE-2026-58222: s4:ldap_server: don't allow untrusted compare requests for confidenti... gitlab/master
Stefan Metzmacher [Wed, 24 Jun 2026 12:42:11 +0000 (14:42 +0200)] 
CVE-2026-58222: s4:ldap_server: don't allow untrusted compare requests for confidential attributes

This means we apply acl checks against the search filter similar
to normal ldb searches.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Björn Jacke <bjacke@samba.org>
Autobuild-Date(master): Tue Jul 28 17:02:13 UTC 2026 on atb-devel-224

27 hours agoCVE-2026-58221: s4:dsdb: let rootdse_filter_operations() reject untrusted operations...
Stefan Metzmacher [Wed, 24 Jun 2026 12:01:32 +0000 (14:01 +0200)] 
CVE-2026-58221: s4:dsdb: let rootdse_filter_operations() reject untrusted operations on special DNs

Without this authenticated (also non-admin) users write internal meta
data leading to admin privileges.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
27 hours agoCVE-2026-58221: s4:dsdb: provide dsdb_audit_{log_attributes,operation_human_readable...
Stefan Metzmacher [Mon, 29 Jun 2026 17:09:28 +0000 (19:09 +0200)] 
CVE-2026-58221: s4:dsdb: provide dsdb_audit_{log_attributes,operation_human_readable}() functions

They are useful outside of audit_log.c soon.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
27 hours agoCVE-2026-58218: dns_server: Only add a tkey after successful authentication
Volker Lendecke [Wed, 17 Jun 2026 06:58:40 +0000 (08:58 +0200)] 
CVE-2026-58218: dns_server: Only add a tkey after successful authentication

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Douglas Bagnall <dbagnall@samba.org>
27 hours agoCVE-2026-58218: dns_server: Fix an error path memleak
Volker Lendecke [Wed, 17 Jun 2026 06:24:47 +0000 (08:24 +0200)] 
CVE-2026-58218: dns_server: Fix an error path memleak

We talloc the new key off "dns->tkeys", which is long-lived. On any
error we never free'd that again. Probably not remotely triggerable,
this is only setting up the gensec context.

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Douglas Bagnall <dbagnall@samba.org>
27 hours agoCVE-2026-58216: kdc:kpasswd: calculate correct size for password blob
Douglas Bagnall [Sun, 31 May 2026 00:48:11 +0000 (12:48 +1200)] 
CVE-2026-58216: kdc:kpasswd: calculate correct size for password blob

We were making the enc_data_blob 6 bytes too big.

Its payload is an ASN.1 structure that knows its own size, so the
extra bytes are not usually read by Heimdal, but a crafted packet
could force them to be read.

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

Reported-by: Tristan <TristanInSec@gmail.com>
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
27 hours agoCVE-2026-58224: ctdb-common: Add comments to ward off vulnerability reports
Martin Schwenke [Tue, 30 Jun 2026 03:58:22 +0000 (13:58 +1000)] 
CVE-2026-58224: ctdb-common: Add comments to ward off vulnerability reports

We can't deal with this in the current CTDB protocol without
disproportionate effort.  So, document reality clearly in the code to
try to stop these from being reported.

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

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
27 hours agoCVE-2026-58224: ctdb-doc: Emphasise that the private network must be private
Martin Schwenke [Wed, 10 Jun 2026 08:45:43 +0000 (18:45 +1000)] 
CVE-2026-58224: ctdb-doc: Emphasise that the private network must be private

Note that the difference in the first couple of lines is leading
whitespace being switch to a TAB.

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

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Tristan Madani <tristan@talencesecurity.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
27 hours agoCVE-2026-58224: ctdb-common: Secure sock_daemon Unix domain sockets
Martin Schwenke [Thu, 11 Jun 2026 01:25:52 +0000 (11:25 +1000)] 
CVE-2026-58224: ctdb-common: Secure sock_daemon Unix domain sockets

Currently, the mode of the socket depends on the creating process's
umask.  This might allow unwanted access.

It might be preferable to do this just for the eventd socket.
However, there is no useful place to hook this in outside of
sock_daemon.

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

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Tristan Madani <tristan@talencesecurity.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
27 hours agoCVE-2026-58224: ctdb-protocol: Avoid DoS memory allocations
Martin Schwenke [Wed, 10 Jun 2026 02:37:02 +0000 (12:37 +1000)] 
CVE-2026-58224: ctdb-protocol: Avoid DoS memory allocations

The pull loop already avoids out of bounds accesses beyond the end of
the buffer.  However, it does not avoid a DoS memory allocation due to
an unreasonably large array size.

Check that the number of specified array elements can be pulled from
buffer, which puts a reasonable upper bound on the subsequent memory
allocation.

Use an initialised dummy variable to avoid static analysers
complaining about uninitialised variables being passed.

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

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Tristan Madani <tristan@talencesecurity.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
27 hours agoCVE-2026-58224: ctdb-protocol: Avoid DoS memory allocations
Martin Schwenke [Wed, 10 Jun 2026 02:15:17 +0000 (12:15 +1000)] 
CVE-2026-58224: ctdb-protocol: Avoid DoS memory allocations

The pull loop already avoids out of bounds accesses beyond the end of
the buffer.  However, it does not avoid a DoS memory allocation due to
an unreasonably large array size.

Check that the number of specified array elements can be pulled from
buffer, which puts a reasonable upper bound on the subsequent memory
allocation.

Use an initialised dummy variable to avoid static analysers
complaining about uninitialised variables being passed.

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

Reported-by: Andrew Tridgell (issue 22)
Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Tristan Madani <tristan@talencesecurity.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
27 hours agoCVE-2026-58224: ctdb-protocol: Always pull the specified number of bytes
Martin Schwenke [Tue, 9 Jun 2026 11:54:20 +0000 (21:54 +1000)] 
CVE-2026-58224: ctdb-protocol: Always pull the specified number of bytes

The string should not contain a premature NUL terminator, which would
cause less than the specified number of bytes to be pulled.  If it
does, consume the specified number of bytes anyway.  The alternative
doesn't make sense.

Note that this is unlikely to be a security issue, where trailing data
in the string field causes the buffer to be overrun.  That would
require an additional protocol bug.  However, include this fix here
for posterity.

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

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Tristan Madani <tristan@talencesecurity.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
27 hours agoCVE-2026-58224: ctdb-protocol: Avoid off-by-one error for bytes pulled
Martin Schwenke [Tue, 9 Jun 2026 11:48:02 +0000 (21:48 +1000)] 
CVE-2026-58224: ctdb-protocol: Avoid off-by-one error for bytes pulled

As per the comment, if there is no NUL byte in the buffer then don't
count one in the number of bytes pulled.

Note that this is unlikely to be a security issue because it would
take a protocol bug elsewhere to overrun the buffer.  However, include
this fix here for posterity.

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

Reported-by: Andrew Tridgell (issue 16)
Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Tristan Madani <tristan@talencesecurity.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
27 hours agoCVE-2026-58224: ctdb-daemon: Avoid out of bounds data access
Martin Schwenke [Tue, 9 Jun 2026 00:41:25 +0000 (10:41 +1000)] 
CVE-2026-58224: ctdb-daemon: Avoid out of bounds data access

Instead of checking only that there is enough data for the length
field, check there is enough data for the entire header part of the
struct.  After cross-checking overall lengths, ensure there is enough
data for the key/data in the data element.

While here, modernise the DEBUG.

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

Reported-by: Andrew Tridgell (issue 13)
Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Tristan Madani <tristan@talencesecurity.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
27 hours agoCVE-2026-58224: ctdb-daemon: Avoid out of bounds data access
Martin Schwenke [Sun, 31 May 2026 05:11:39 +0000 (15:11 +1000)] 
CVE-2026-58224: ctdb-daemon: Avoid out of bounds data access

The first check is clearly needed because m->db_id is referenced.  The
second check is handled by a similar update to
ctdb_control_update_record(), but repeat it in case something else
changes.

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

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Tristan Madani <tristan@talencesecurity.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
27 hours agoCVE-2026-58224: ctdb-daemon: Avoid out of bounds data access
Martin Schwenke [Sat, 30 May 2026 07:45:56 +0000 (17:45 +1000)] 
CVE-2026-58224: ctdb-daemon: Avoid out of bounds data access

The count can't exceed the indata buffer size.

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

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Tristan Madani <tristan@talencesecurity.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
27 hours agoCVE-2026-58224: ctdb-daemon: Avoid out of bounds data access
Martin Schwenke [Sat, 30 May 2026 07:35:23 +0000 (17:35 +1000)] 
CVE-2026-58224: ctdb-daemon: Avoid out of bounds data access

The count can't exceed the recdata buffer size.

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

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Tristan Madani <tristan@talencesecurity.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
27 hours agoCVE-2026-58224: ctdb-daemon: Avoid out of bounds data access
Martin Schwenke [Sat, 30 May 2026 05:04:31 +0000 (15:04 +1000)] 
CVE-2026-58224: ctdb-daemon: Avoid out of bounds data access

If a NUL terminator doesn't appear in the buffer then the database
name is not a valid string.

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

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Tristan Madani <tristan@talencesecurity.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
27 hours agoCVE-2026-58224: ctdb-daemon: Avoid out-of-bounds data access
Martin Schwenke [Sat, 30 May 2026 04:25:00 +0000 (14:25 +1000)] 
CVE-2026-58224: ctdb-daemon: Avoid out-of-bounds data access

Do not allow the VNN map's size to extend past the end of the buffer.
This is checked by switching to ctdb_vnn_map_pull(), which also
simplifies the code.

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

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Tristan Madani <tristan@talencesecurity.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
27 hours agoCVE-2026-58224: ctdb-protocol: Avoid DoS memory allocation
Martin Schwenke [Sat, 30 May 2026 04:38:02 +0000 (14:38 +1000)] 
CVE-2026-58224: ctdb-protocol: Avoid DoS memory allocation

The pull loop already avoids out of bounds accesses beyond the end of
the buffer.  However, it does not avoid a DoS memory allocation due to
an unreasonably large array size.

Check that the number of specified array elements can be pulled from
buffer, which puts a reasonable upper bound on the subsequent memory
allocation.

Use an initialised dummy variable to avoid static analysers
complaining about uninitialised variables being passed.  Variable i
could be reused but that might be confusing, so leave any optimisation
to the compiler.

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

Reported-by: Martin Schwenke <mschwenke@ddn.com>
Reported-by: Also Andrew Tridgell (issue 22)
Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Tristan Madani <tristan@talencesecurity.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
27 hours agoCVE-2026-58224: ctdb-daemon: Avoid out of bounds data access
Martin Schwenke [Wed, 27 May 2026 08:59:24 +0000 (18:59 +1000)] 
CVE-2026-58224: ctdb-daemon: Avoid out of bounds data access

Protocol field lengths need to be validated to avoid attempts to
access memory beyond the end of the packet buffer.

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

Reported-by: Tristan Madani <tristan@talencesecurity.com>
Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Tristan Madani <tristan@talencesecurity.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
27 hours agoCVE-2026-6949: s4:dns_server: correctly truncate the buffer for TSIG verification
Stefan Metzmacher [Fri, 29 May 2026 11:12:20 +0000 (13:12 +0200)] 
CVE-2026-6949: s4:dns_server: correctly truncate the buffer for TSIG verification

Calculating the length of the TSIG additional dns_res_rec,
via ndr_push_dns_res_rec() is fragile and may generate
a buffer larger than the original dns_name_packet buffer.

This could underflow the resulting packet_len,
to a very large value and buffer_len to a small value.

Resulting in a memcpy() of a very large size into
a very small buffer. This most likely already
gets a segmentation fault when reading after the
in->data.

This was reported by Arjun Basnet with Securin Labs.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Douglas Bagnall <dbagnall@samba.org>
27 hours agoCVE-2026-6949: ndr_dns: let ndr_pull_dns_res_rec() remember the start offset
Stefan Metzmacher [Fri, 29 May 2026 10:43:13 +0000 (12:43 +0200)] 
CVE-2026-6949: ndr_dns: let ndr_pull_dns_res_rec() remember the start offset

In order to verify TSIG signatures we need a reliable way to
truncate the original dns_name_packet buffer before the
last additional dns_res_rec.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Douglas Bagnall <dbagnall@samba.org>
2 days agoctdb-common: Support IPoIB ARPs and IPv6 Neighbor Advertisements
Martin Schwenke [Mon, 22 Jun 2026 07:17:38 +0000 (17:17 +1000)] 
ctdb-common: Support IPoIB ARPs and IPv6 Neighbor Advertisements

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Mon Jul 27 04:48:13 UTC 2026 on atb-devel-224

2 days agoctdb-tests: Handle arbitrary length hardware addresses
Martin Schwenke [Fri, 5 Jun 2026 02:32:51 +0000 (12:32 +1000)] 
ctdb-tests: Handle arbitrary length hardware addresses

While the code can generally handle arbitrary length addresses, known
lengths are used to set the hardware type.  Therefore, tests are
artificially limited to 6 octet addresses (Ethernet) and 20 octet
addresses (IPoIB).

Add some test cases for IPoIB.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 days agoctdb-common: Pass hardware address to ip6_na_build()
Martin Schwenke [Thu, 18 Dec 2025 03:07:55 +0000 (14:07 +1100)] 
ctdb-common: Pass hardware address to ip6_na_build()

Use address, length and type in ip6_na_build().

Logically, this generalises the code to handle any hardware address
type/length.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 days agoctdb-common: Pass hardware address to arp_build()
Martin Schwenke [Mon, 8 Dec 2025 08:24:33 +0000 (19:24 +1100)] 
ctdb-common: Pass hardware address to arp_build()

Use the address, length and hardware type.  arp_build() now works for
any supported hardware address length.

Update the test code to construct the required sockaddr_ll structure.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 days agoctdb-common: Construct IPv6oIB link-level multicast address
Martin Schwenke [Mon, 22 Jun 2026 07:13:13 +0000 (17:13 +1000)] 
ctdb-common: Construct IPv6oIB link-level multicast address

As per the comment in the code: reading RFC4391, section 4 and looking
at example GIDs on a system, suggests a simple method of mapping the
IPv4 broadcast address to an IPv6oIB multicast address.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 days agoctdb-common: Encapsulate whole IPv6 sendto() address setup
Martin Schwenke [Tue, 9 Dec 2025 03:16:27 +0000 (14:16 +1100)] 
ctdb-common: Encapsulate whole IPv6 sendto() address setup

Variable sall is no longer used by IPv4.  It is now only used to
construct the sendto() destination address for IPv6 NA.

Replace this variable with a sockaddr_storage so it can fit larger
link-level addresses.  Change the type of ip6_ll_multicast_build() and
use it to set the sockaddr_storage (as a sockaddr_ll), based on the
link-level broadcast address and RFCs.

IPoIB is currently not supported.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 days agoctdb-common: Use broadcast address for ARP sendto()
Martin Schwenke [Wed, 17 Jun 2026 04:06:42 +0000 (14:06 +1000)] 
ctdb-common: Use broadcast address for ARP sendto()

Use the retrieved broadcast address, since it may vary for
non-Ethernet link-level protocols.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 days agoctdb-common: Bind using hardware address
Martin Schwenke [Mon, 15 Jun 2026 11:42:06 +0000 (21:42 +1000)] 
ctdb-common: Bind using hardware address

Pass the found hardware address directly to bind(), instead of
effectively using sall as a temporary variable.  Calculate the real
length.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 days agoctdb-common: Open the socket after finding the interface
Martin Schwenke [Mon, 5 Jan 2026 04:36:19 +0000 (15:36 +1100)] 
ctdb-common: Open the socket after finding the interface

The socket is no longer used to find the interface so avoid having to
close it if a suitable interface is not found.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 days agoctdb-common: Find interface using getifaddrs(3)
Martin Schwenke [Fri, 5 Dec 2025 06:39:56 +0000 (17:39 +1100)] 
ctdb-common: Find interface using getifaddrs(3)

This is the first step towards IPoIB ARP/NA support, which uses 20
octet hardware addresses.  See the comment in the code for more
details.

This is a (relatively) minimal change.  find_interface() returns a lot
of duplicate information that isn't yet used.  Also, this is (still)
explicitly restricted to Ethernet.  Improvements and clean up to come
in subsequent commits.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Signed-off-by: Vinit Agnihotri <vagnihotri@ddn.com>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 days agoctdb-common: Add macro CTDB_CAN_SEND_ARPS
Martin Schwenke [Thu, 4 Jun 2026 04:18:58 +0000 (14:18 +1000)] 
ctdb-common: Add macro CTDB_CAN_SEND_ARPS

Later, this will depend on more things.  Make this change now to
minimise the size of a later commit.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 days agoctdb-common: Make ip6_na_build() more flexible
Martin Schwenke [Thu, 18 Jun 2026 03:56:41 +0000 (13:56 +1000)] 
ctdb-common: Make ip6_na_build() more flexible

Instead of filling in a fixed ether_addr structure, allow for
flexibility in link-level hardware address length.

Including the calculation for the option length and padding is not yet
necessary.  However, it makes a future commit much simpler.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 days agoctdb-common: Make arp_build() more flexible
Martin Schwenke [Thu, 18 Jun 2026 03:21:30 +0000 (13:21 +1000)] 
ctdb-common: Make arp_build() more flexible

Instead of filling in a fixed ether_arp structure, allow for
flexibility in link-level hardware address length.

Similarly, make the buffer size able to accommodate the largest
possible hardware addresses.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Signed-off-by: Vinit Agnihotri <vagnihotri@ddn.com>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 days agoctdb-common: Don't build IPv6 NA link-level header
Martin Schwenke [Thu, 18 Jun 2026 08:02:47 +0000 (18:02 +1000)] 
ctdb-common: Don't build IPv6 NA link-level header

The link-level destination address is now setup outside
ip6_na_build(), since it is no longer used in that function.  Group
the parts of it together instead of leaving them scattered.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 days agoctdb-common: Don't build ARP link-level header
Martin Schwenke [Thu, 18 Jun 2026 07:37:20 +0000 (17:37 +1000)] 
ctdb-common: Don't build ARP link-level header

This means the destination broadcast address no longer needs to be an
output parameter of arp_build().

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 days agoctdb-common: Use a datagram socket to send packets
Martin Schwenke [Tue, 9 Dec 2025 05:24:22 +0000 (16:24 +1100)] 
ctdb-common: Use a datagram socket to send packets

The plan is to stop building the link-level (currently Ethernet)
header and let the network stack construct it.  2 reasons:

1. It should work

2. The InfiniBand link-level header is a mystery and I don't know how
   to construct it

To keep this commit small, the link-level header is still built, but
it is ignored.  This adds a small amount of churn to the sendto()
calls but allows smaller, more comprehensible steps.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Signed-off-by: Vinit Agnihotri <vagnihotri@ddn.com>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 days agoctdb-common: Simplify filling ARP packet
Martin Schwenke [Tue, 6 Jan 2026 03:12:31 +0000 (14:12 +1100)] 
ctdb-common: Simplify filling ARP packet

Only one field is different between request and reply.  Factor out the
common code so it is above and below a simplified if-statement that
handles just the different field.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 days agoctdb-common: Pass the ARP operation to arp_build()
Martin Schwenke [Tue, 6 Jan 2026 03:05:31 +0000 (14:05 +1100)] 
ctdb-common: Pass the ARP operation to arp_build()

This way the argument directly represents the intent so is
self-documenting.  The operation is now assigned into the structure
element so the 2 arms of the if-statement have only a single statement
that is different.  Keep this commit simple and let a subsequent
commit factor the common items.

Note that this is an static function so there is no widespread API
churn.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 days agoctdb-common: Clarify IPv6 multicast addresses
Martin Schwenke [Tue, 30 Dec 2025 03:25:27 +0000 (14:25 +1100)] 
ctdb-common: Clarify IPv6 multicast addresses

At the moment these are a little too magic, especially the completely
undocumented one.

Ensure there are clear comments with references to save time when
touching this code in future.

Build the link-level multicast address in its own function to reduce
churn later.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 days agoctdb-common: Clean up error handling when sending ARPs
Martin Schwenke [Thu, 11 Dec 2025 08:15:39 +0000 (19:15 +1100)] 
ctdb-common: Clean up error handling when sending ARPs

Consistently close the socket after it has been opened.  Check for -1
to handle (future) code ordering changes.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 days agoctdb-tests: Add sendarp command for manual testing
Martin Schwenke [Fri, 5 Jun 2026 06:58:59 +0000 (16:58 +1000)] 
ctdb-tests: Add sendarp command for manual testing

"system_socket_test sendarp ..." can simply be run as root from the
source tree.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 days agovfs_ceph_new: Include proxy setting in mount cache cookie
Anoop C S [Fri, 24 Jul 2026 11:57:56 +0000 (17:27 +0530)] 
vfs_ceph_new: Include proxy setting in mount cache cookie

The mount cache cookie is derived from (conf_file/user_id/fsname) but
does not include the proxy mode. When two shares differ only in their
proxy setting, they produce the same cookie and share a single cached
ceph_mount_info. Since libcephfs.so and libcephfs_proxy.so define
struct ceph_mount_info with entirely different layouts, calling a
function resolved from one library on a mount allocated by the other
causes a segfault.

Add config->proxy to the cookie so that mounts created by different
libraries are never shared.

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

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: John Mulligan <jmulligan@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Fri Jul 24 15:56:49 UTC 2026 on atb-devel-224

5 days agos4:selftest: run samba.tests.nps_echo_test
Stefan Metzmacher [Thu, 11 Jun 2026 14:02:55 +0000 (16:02 +0200)] 
s4:selftest: run samba.tests.nps_echo_test

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Jul 24 14:36:47 UTC 2026 on atb-devel-224

5 days agos3:rpc_server: add a simple npsd_echo_server.c
Stefan Metzmacher [Thu, 11 Jun 2026 13:53:07 +0000 (15:53 +0200)] 
s3:rpc_server: add a simple npsd_echo_server.c

This uses the new nps_worker_main() infrastructure
in order to implement a trivial named pipe echo
service.

For now it provides two named pipes both with
message mode, but different allocation sizes
limiting the max size of an echo request.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 days agopython/tests: add FSCTL_PIPE_WAIT tests to nps_echo_test.py
Stefan Metzmacher [Thu, 11 Jun 2026 15:41:57 +0000 (17:41 +0200)] 
python/tests: add FSCTL_PIPE_WAIT tests to nps_echo_test.py

This tests that FSCTL_PIPE_WAIT starts samba-dcerpcd on
demand if needed.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 days agopython/tests: let nps_echo_test.py test more combinations
Stefan Metzmacher [Thu, 11 Jun 2026 15:41:01 +0000 (17:41 +0200)] 
python/tests: let nps_echo_test.py test more combinations

This verifies that upper case pipenames also work.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 days agopython/tests: add simple smb named pipe echo test
Noel Power [Fri, 28 Mar 2025 12:00:39 +0000 (12:00 +0000)] 
python/tests: add simple smb named pipe echo test

This will be a regression test for the npsd_echo_server
coming in the next commits.

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

Signed-off-by: Noel Power <noel.power@suse.com>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 days agos3:libsmb: allow map_fnum_to_smb2_handle() to handle UINT16_MAX
Stefan Metzmacher [Thu, 11 Jun 2026 14:20:31 +0000 (16:20 +0200)] 
s3:libsmb: allow map_fnum_to_smb2_handle() to handle UINT16_MAX

This will be needed for some fsctl tests using no file handle.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 days agos3:libsmb: only provide struct smb2_hnd as const
Stefan Metzmacher [Thu, 11 Jun 2026 14:33:24 +0000 (16:33 +0200)] 
s3:libsmb: only provide struct smb2_hnd as const

The callers should never change the content and
don't assume it's a valid talloc pointer.

This will allow us to use a fake handle for
UINT16_MAX => UINT64_MAX/UINT64_MAX in the next
commit.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 days agos3:rpc_server: introduce nps_worker_main()
Stefan Metzmacher [Wed, 10 Jun 2026 08:48:10 +0000 (10:48 +0200)] 
s3:rpc_server: introduce nps_worker_main()

This is the base to implement non-dcerpc named pipe servers,
which can be used for the WSP service on \pipe\MsFteWds.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 days agos3:rpc_server: add support for npsd_* services to rpc_host.c
Stefan Metzmacher [Tue, 9 Jun 2026 16:00:27 +0000 (18:00 +0200)] 
s3:rpc_server: add support for npsd_* services to rpc_host.c

This will allow named pipe servies without dcerpc.
It will be the base to implement the WSP service
on \pipe\MsFteWds.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 days agos3:rpc_server: maintain file_type, device_state, allocation_size per endpoint
Stefan Metzmacher [Tue, 9 Jun 2026 16:00:27 +0000 (18:00 +0200)] 
s3:rpc_server: maintain file_type, device_state, allocation_size per endpoint

Use the defaults for dcerpc, but in future we will have non-dcerpc
services in future...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 days agos3:rpc_server: rename rpc_host_bind_read* to rpc_host_new_client*
Stefan Metzmacher [Tue, 9 Jun 2026 16:00:27 +0000 (18:00 +0200)] 
s3:rpc_server: rename rpc_host_bind_read* to rpc_host_new_client*

In future this will not only be about reading the dcerpc bind pdu,
but also about accepting the npa state for NCACN_NP.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 days agos3:rpc_server: add --np-only option to samba-dcerpcd
Stefan Metzmacher [Tue, 9 Jun 2026 13:17:22 +0000 (15:17 +0200)] 
s3:rpc_server: add --np-only option to samba-dcerpcd

Sometimes admins prefer to start samba-dcerpcd
as daemon instead of on demand in order to
avoid startup latency. But at the same time
they may not want to provide ncacn_ip_tcp.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 days agos3:rpc_server: split rpc_worker.[ch] into rpc_worker_{internal,dcerpc}.[ch]
Stefan Metzmacher [Tue, 9 Jun 2026 09:05:02 +0000 (11:05 +0200)] 
s3:rpc_server: split rpc_worker.[ch] into rpc_worker_{internal,dcerpc}.[ch]

This will make it possible to implement more generic
services behind named pipes soon.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 days agos3:rpc_server: move most of dcerpc_ncacn_conn into private rpc_worker_connection
Stefan Metzmacher [Tue, 9 Jun 2026 10:36:11 +0000 (12:36 +0200)] 
s3:rpc_server: move most of dcerpc_ncacn_conn into private rpc_worker_connection

This prepares more abstraction in rpc_worker.c coming in the next
commits.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 days agos3:smb2_ioctl: implement FSCTL_PIPE_WAIT
Stefan Metzmacher [Thu, 11 Jun 2026 12:40:13 +0000 (14:40 +0200)] 
s3:smb2_ioctl: implement FSCTL_PIPE_WAIT

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 days agos3:rpc_server: implement np_wait_exists_send/recv()
Stefan Metzmacher [Thu, 11 Jun 2026 12:39:32 +0000 (14:39 +0200)] 
s3:rpc_server: implement np_wait_exists_send/recv()

This will be used to implement FSCTL_PIPE_WAIT in the SMB server.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 days agos3:rpc_client: add probe_only argument to local_np_connect[_send]()
Stefan Metzmacher [Thu, 11 Jun 2026 13:01:15 +0000 (15:01 +0200)] 
s3:rpc_client: add probe_only argument to local_np_connect[_send]()

This will cause SAMBA_NPA_FLAGS_PROBE_ONLY to be passed to
the named pipe server and let local_np_connect_recv()
return EEXIST instead of tstream_context.

This will be used to implement FSCTL_PIPE_WAIT.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 days agos3:rpc_server: add SAMBA_NPA_FLAGS_PROBE_ONLY handling
Stefan Metzmacher [Thu, 11 Jun 2026 12:57:08 +0000 (14:57 +0200)] 
s3:rpc_server: add SAMBA_NPA_FLAGS_PROBE_ONLY handling

This will be used in order to check if a specific
named pipe is available without creating a new connection.

This will be used in order to implement FSCTL_PIPE_WAIT
in the following commits.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 days agos3:rpc_server: fix SAMBA_NPA_FLAGS_NEED_IDLE logic
Stefan Metzmacher [Thu, 11 Jun 2026 11:46:03 +0000 (13:46 +0200)] 
s3:rpc_server: fix SAMBA_NPA_FLAGS_NEED_IDLE logic

This may not change the real logic, but it's much easier
to read...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 days agos3:smbd: remove unused dcesrv_context from smbd_server_connection
Stefan Metzmacher [Thu, 11 Jun 2026 12:48:55 +0000 (14:48 +0200)] 
s3:smbd: remove unused dcesrv_context from smbd_server_connection

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 days agos3:rpc_server: np_open() doesn't need a struct dcesrv_context
Stefan Metzmacher [Thu, 11 Jun 2026 12:48:24 +0000 (14:48 +0200)] 
s3:rpc_server: np_open() doesn't need a struct dcesrv_context

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 days agos3:rpc_server: remove unused dcerpc_ncacn_conn->sock
Stefan Metzmacher [Tue, 9 Jun 2026 09:15:17 +0000 (11:15 +0200)] 
s3:rpc_server: remove unused dcerpc_ncacn_conn->sock

This is never used...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 days agos3:rpc_server: fix use after free in rpc_worker_new_client() error path
Stefan Metzmacher [Tue, 9 Jun 2026 10:24:34 +0000 (12:24 +0200)] 
s3:rpc_server: fix use after free in rpc_worker_new_client() error path

dcesrv_conn is a client of ncacn_conn, so we can't call
TALLOC_FREE(dcesrv_conn); after TALLOC_FREE(ncacn_conn);

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 days agolibrpc: add python_ioctl
Stefan Metzmacher [Thu, 11 Jun 2026 14:50:33 +0000 (16:50 +0200)] 
librpc: add python_ioctl

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 days agopidl:Samba4/Python: use a C array size variable to cache PyList_GET_SIZE($py_var)
Stefan Metzmacher [Fri, 12 Jun 2026 14:16:46 +0000 (16:16 +0200)] 
pidl:Samba4/Python: use a C array size variable to cache PyList_GET_SIZE($py_var)

This allows the C compiler to notice that we correctly checked the size
of fixed sized arrays.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 days agoctdb-scripts: Secure the persistent TDB backup directory
sagam [Thu, 16 Jul 2026 06:55:27 +0000 (02:55 -0400)] 
ctdb-scripts: Secure the persistent TDB backup directory

Persistent database backups may contain sensitive data such as
Samba credentials in secrets.tdb. Currently these backup files
are created with default permissions, allowing any local user to
read sensitive credentials.

Add an optional -m <mode> argument to ctdb-backup-persistent-tdbs.sh
to set permissions for the backup directory.

A new CTDB_PERSISTENT_DB_BACKUP_MODE configuration variable is added
to script.options, allowing administrators to customize the
permissions mode. The default is 0700 to ensure secure-by-default
behavior, protecting sensitive data from unauthorized access.

The backup script sets directory permissions on the backup destination
every time it runs, providing self-healing protection.

Permissions are enforced in ctdb-backup-persistent-tdbs.sh rather than
the event script to avoid running chmod every 15 seconds during monitor
events. The backup script can also be called manually, ensuring
permissions are always enforced when backups are created.

Signed-off-by: Agam S <agam@ddn.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Jul 23 11:40:03 UTC 2026 on atb-devel-224

7 days agoWHATSNEW: Document vfs_aio_ratelimit cluster-wide rate limiting
Avan Thakkar [Tue, 14 Jul 2026 06:04:49 +0000 (11:34 +0530)] 
WHATSNEW: Document vfs_aio_ratelimit cluster-wide rate limiting

Signed-off-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-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): Wed Jul 22 17:03:16 UTC 2026 on atb-devel-224

7 days agoautobuild: add --with-ratelimitd to samba_configure_params
Avan Thakkar [Tue, 17 Mar 2026 17:07:52 +0000 (22:37 +0530)] 
autobuild: add --with-ratelimitd to samba_configure_params

Signed-off-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
7 days agobuild: add on/off ratelimitd option
Avan Thakkar [Thu, 12 Mar 2026 04:36:20 +0000 (10:06 +0530)] 
build: add on/off ratelimitd option

Signed-off-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
7 days agovfs_aio_ratelimit: add cluster mode note to test script
Avan Thakkar [Mon, 23 Feb 2026 12:46:07 +0000 (18:16 +0530)] 
vfs_aio_ratelimit: add cluster mode note to test script

Signed-off-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
7 days agovfs_aio_ratelimit: document cluster-wide coordination
Avan Thakkar [Thu, 26 Feb 2026 08:09:26 +0000 (13:39 +0530)] 
vfs_aio_ratelimit: document cluster-wide coordination

Signed-off-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
7 days agovfs_aio_ratelimit: add cluster-wide rate limiting via daemon aggregation
Avan Thakkar [Fri, 13 Feb 2026 10:51:37 +0000 (16:21 +0530)] 
vfs_aio_ratelimit: add cluster-wide rate limiting via daemon aggregation

Add cluster coordination using a daemon-based architecture. Each node runs
a ratelimitd daemon that aggregates local smbd activity and broadcasts node
summaries via CTDB. VFS processes receive summaries and dynamically distribute
the global rate limit fairly among all active processes.

Network message complexity: O(M²) where M is the number of nodes.

Signed-off-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
7 days agovfs_ceph_rgw: Implement SMB_VFS_OPEN_SHARE_ROOT
Anoop C S [Wed, 1 Jul 2026 15:20:12 +0000 (20:50 +0530)] 
vfs_ceph_rgw: Implement SMB_VFS_OPEN_SHARE_ROOT

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Wed Jul 22 15:49:49 UTC 2026 on atb-devel-224

7 days agovfs_glusterfs: Implement SMB_VFS_OPEN_SHARE_ROOT
Anoop C S [Wed, 1 Jul 2026 10:24:37 +0000 (15:54 +0530)] 
vfs_glusterfs: Implement SMB_VFS_OPEN_SHARE_ROOT

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 days agovfs_ceph_new: Implement SMB_VFS_OPEN_SHARE_ROOT
Anoop C S [Wed, 1 Jul 2026 10:24:07 +0000 (15:54 +0530)] 
vfs_ceph_new: Implement SMB_VFS_OPEN_SHARE_ROOT

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 days agovfs_ceph: Implement SMB_VFS_OPEN_SHARE_ROOT
Anoop C S [Wed, 1 Jul 2026 10:23:31 +0000 (15:53 +0530)] 
vfs_ceph: Implement SMB_VFS_OPEN_SHARE_ROOT

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 days agovfs_default: Use vfs_set_share_root() in vfswrap_open_share_root()
Anoop C S [Wed, 1 Jul 2026 10:22:56 +0000 (15:52 +0530)] 
vfs_default: Use vfs_set_share_root() in vfswrap_open_share_root()

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 days agovfs: Add vfs_set_share_root() helper
Anoop C S [Wed, 1 Jul 2026 10:20:20 +0000 (15:50 +0530)] 
vfs: Add vfs_set_share_root() helper

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 days agovfs_default: Implement SMB_VFS_OPEN_SHARE_ROOT()
Volker Lendecke [Thu, 23 Oct 2025 17:14:48 +0000 (19:14 +0200)] 
vfs_default: Implement SMB_VFS_OPEN_SHARE_ROOT()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 days agovfs: Add SMB_VFS_OPEN_SHARE_ROOT()
Volker Lendecke [Sun, 19 Oct 2025 10:07:07 +0000 (12:07 +0200)] 
vfs: Add SMB_VFS_OPEN_SHARE_ROOT()

While converting more and more users from stat() to fstatat() I found
that there is one special stat-call that is different from all others:
When connecting to a share, we call SMB_VFS_STAT() without a properly
set up conn->cwd_fsp. This one special call causes quite some
special-case handling in the implementations.

Reflect this special case with a new VFS call OPEN_SHARE_ROOT. Its
final purpose will be to get us a proper fd on the share root, but
until we stop doing chdir calls into the share we can live with
AT_FDCWD being returned.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 days agos3-selftest: test netsamlogoncache entry expiry
Günther Deschner [Tue, 10 Feb 2026 09:21:06 +0000 (10:21 +0100)] 
s3-selftest: test netsamlogoncache entry expiry

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Jul 22 12:42:55 UTC 2026 on atb-devel-224

7 days agos3-samlogoncache: allow to expire cache entries
Günther Deschner [Thu, 4 Dec 2025 20:27:44 +0000 (21:27 +0100)] 
s3-samlogoncache: allow to expire cache entries

This can be controlled via parametric option:
"netsamlogoncache : timeout = <SECONDS>"

netsamlogoncache:timeout=0 (the default) means never expire.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
8 days agovfs_ceph_snapshots: Fix panic on snapshot access with a "/"-rooted share
Matthias Grandl [Fri, 10 Jul 2026 05:58:42 +0000 (07:58 +0200)] 
vfs_ceph_snapshots: Fix panic on snapshot access with a "/"-rooted share

ceph_snap_gmt_convert_dir() builds an absolute snapshot path by joining
the share's connectpath, the request-relative name and the snapshot
subdir with '/' separators, then hands it to OpenDir(). OpenDir() ->
fd_openat() -> filename_convert_dirfsp_rel() splits the path on '/' and
openat_pathref_fsp_nosymlink() asserts that no component is empty:

    SMB_ASSERT(rel_fname.base_name[0] != '\0')   source3/smbd/files.c:1212

connectpath is a bare "/" when the share is mounted at the file system
root, so the join yields a leading "//" (e.g. "//.snap" or
"//dir/.snap"). That empty first component trips the assert and panics
smbd as soon as a snapshot is accessed.

Whether the malformed path actually reaches the assert also depends on
the Ceph client accepting a non-canonical "//" path in the preceding
stat(), so the panic is libcephfs-version dependent.

Canonicalize the .snap directory path with canonicalize_absolute_path()
after building it, so the path handed to OpenDir() is always canonical
and the empty leading component can no longer occur.

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

Signed-off-by: Matthias Grandl <matthias.grandl@croit.io>
Reviewed-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): Tue Jul 21 16:12:18 UTC 2026 on atb-devel-224

8 days agoselftest:Samba4: use samba_dnsupdate --sync-file for SAMBA_DNS_FAKING
Stefan Metzmacher [Wed, 20 May 2026 16:02:28 +0000 (18:02 +0200)] 
selftest:Samba4: use samba_dnsupdate --sync-file for SAMBA_DNS_FAKING

Even with SAMBA_DNS_FAKING, which means resolv_wrapper can't to real dns
over the network, we want dns updates to happen on the server,
so that our own dns client sees them.

Otherwise some tests fallback to netbios name resolution,
which gives strange and unexpected results.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Jul 21 10:39:14 UTC 2026 on atb-devel-224

8 days agos4:samba_dnsupdate: add --sync-file option
Stefan Metzmacher [Wed, 20 May 2026 15:59:47 +0000 (17:59 +0200)] 
s4:samba_dnsupdate: add --sync-file option

This can be used similar to the --use-file option,
but the --sync-file option only mirrors the real dns
updates into the file.

It means the dns records on the server are still created,
this is needed for more useful testing.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
8 days agos4:samba_dnsupdate: let update_file check for modified first
Stefan Metzmacher [Wed, 20 May 2026 15:59:03 +0000 (17:59 +0200)] 
s4:samba_dnsupdate: let update_file check for modified first

We only replace the file if it's modified.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
8 days agos4:samba_dnsupdate: split out a update_file() helper function
Stefan Metzmacher [Wed, 20 May 2026 15:53:40 +0000 (17:53 +0200)] 
s4:samba_dnsupdate: split out a update_file() helper function

This will help with the following changes.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
9 days agos4/resolve: drop unused include
Ralph Boehme [Sun, 19 Jul 2026 06:53:27 +0000 (08:53 +0200)] 
s4/resolve: drop unused include

Since the commits around c9587205aa1e10a71db96389d76c0e8e1f80e76b we use IDL
based marshalling and don't need the include anymore.

Drop it, as it causes a compilation failure on AIX

  [1852/3392] Compiling source4/libcli/resolve/dns_ex.c
  "../../source4/libcli/resolve/dns_ex.c", line 111.25: 1506-022 (S) "class" is not a member of "struct dns_res_rec".

This happens because on AIX the header has:

  /* ISC defines class member as rr_class. */
  #ifdef __cplusplus
  #define rr_class nsrr_class
  #else
  #define rr_class class
  #endif

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Jul 20 07:46:42 UTC 2026 on atb-devel-224

12 days agosmbd: implement POSIX-FSA 2.1.4.8.1 FileDispositionInformation
Ralph Boehme [Mon, 2 Mar 2026 13:26:22 +0000 (14:26 +0100)] 
smbd: implement POSIX-FSA 2.1.4.8.1 FileDispositionInformation

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Jul 17 18:26:27 UTC 2026 on atb-devel-224

12 days agopython/tests: add Smb3UnixTests.test_delete_read_only_attr
Ralph Boehme [Mon, 2 Mar 2026 13:51:34 +0000 (14:51 +0100)] 
python/tests: add Smb3UnixTests.test_delete_read_only_attr

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
12 days agopython/tests: enhance LibsmbTests.clean_file to work with READ-ONLY attributes
Ralph Boehme [Mon, 2 Mar 2026 15:51:34 +0000 (16:51 +0100)] 
python/tests: enhance LibsmbTests.clean_file to work with READ-ONLY attributes

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
12 days agopylibsmb: add "sfileinfo" method
Ralph Boehme [Mon, 2 Mar 2026 15:57:30 +0000 (16:57 +0100)] 
pylibsmb: add "sfileinfo" method

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>