]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
4 weeks agos3:winbind: Add support for krb5_ccache_type = DEFAULT
Andreas Schneider [Mon, 9 Feb 2026 10:02:11 +0000 (11:02 +0100)] 
s3:winbind: Add support for krb5_ccache_type = DEFAULT

This will use the ccache_type defined in the krb5.conf.

Pair-Programmed-With: Pavel Filipenský <pfilipen@samba.org>
Signed-off-by: Pavel Filipenský <pfilipen@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
4 weeks agolib:krb5_wrap: Add function to read the default_ccache_name config value
Andreas Schneider [Tue, 10 Feb 2026 13:00:43 +0000 (14:00 +0100)] 
lib:krb5_wrap: Add function to read the default_ccache_name config value

krb5_cc_default_name() expands the config value %{uid} is expanded to the
current id. However when we call this as winbind, it is expanded to root and not
the user we are authenticating. This functions reads directly from the config.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
4 weeks agos3:winbind: Also support %{uid} substitution for krb5_ccache_type
Andreas Schneider [Mon, 9 Feb 2026 10:00:45 +0000 (11:00 +0100)] 
s3:winbind: Also support %{uid} substitution for krb5_ccache_type

Pair-Programmed-With: Pavel Filipenský <pfilipen@redhat.com>
Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
4 weeks agodocs-xml: Update krb5_ccache_type documentation in pam_winbind.5 manpage
Andreas Schneider [Fri, 5 Dec 2025 10:19:32 +0000 (11:19 +0100)] 
docs-xml: Update krb5_ccache_type documentation in pam_winbind.5 manpage

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
4 weeks agos3:winbind: Improve generate_krb5_ccache()
Andreas Schneider [Fri, 5 Dec 2025 10:03:23 +0000 (11:03 +0100)] 
s3:winbind: Improve generate_krb5_ccache()

Signed-off-by: Andreas Schneider <asn@samba.org>
Pair-Programmed-With: Alexander Bokovoy <ab@samba.org>

Reviewed-by: Alexander Bokovoy <ab@samba.org>
4 weeks agovfs_ceph_new: do not set negative value in vfs_aio_state.error
Shachar Sharon [Sun, 22 Mar 2026 17:52:44 +0000 (19:52 +0200)] 
vfs_ceph_new: do not set negative value in vfs_aio_state.error

Ceph uses negative error valuers but Samba's VFS expects error value as
non-negative values (errno style).

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Shweta Sodani <ssodani@redhat.com>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: John Mulligan <jmulligan@redhat.com>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Thu Mar 26 09:23:11 UTC 2026 on atb-devel-224

4 weeks agovfs_ceph_new: avoid iref leak due to failure in ceph_ll_link
Shachar Sharon [Sun, 22 Mar 2026 17:50:16 +0000 (19:50 +0200)] 
vfs_ceph_new: avoid iref leak due to failure in ceph_ll_link

Even in cases where vfs_ceph_ll_link fails, we need to do iput in order
to decrement inode's ref-count.

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Shweta Sodani <ssodani@redhat.com>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: John Mulligan <jmulligan@redhat.com>
4 weeks agovfs_ceph_new: protect from malloc failure in ceph_getcwd
Shachar Sharon [Sun, 22 Mar 2026 17:46:13 +0000 (19:46 +0200)] 
vfs_ceph_new: protect from malloc failure in ceph_getcwd

When ceph_getcwd returns NULL (due to out-of-memory) bail out to avoid
segfault in strlen.

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Shweta Sodani <ssodani@redhat.com>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: John Mulligan <jmulligan@redhat.com>
4 weeks agoauth: Remove talloc_set_name_const() if talloc_keep_secret() changes the talloc name
Pavel Filipenský [Wed, 11 Mar 2026 19:07:05 +0000 (20:07 +0100)] 
auth: Remove talloc_set_name_const() if talloc_keep_secret() changes the talloc name

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Autobuild-User(timing): Pavel Filipensky <pfilipensky@samba.org>
Autobuild-Date(timing): Wed Mar 25 21:16:35 UTC 2026 on atb-devel-224

4 weeks agoauth/credentials: Add talloc_keep_secret() to zero out old_password
Pavel Filipenský [Wed, 11 Mar 2026 19:11:29 +0000 (20:11 +0100)] 
auth/credentials: Add talloc_keep_secret() to zero out old_password

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
4 weeks agoauth/credentials: Check talloc_strdup() for NULL
Pavel Filipenský [Thu, 12 Mar 2026 08:21:38 +0000 (09:21 +0100)] 
auth/credentials: Check talloc_strdup() for NULL

Return false if talloc_strdup() fails.

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
4 weeks agoutil/tests: Test that talloc_keep_secret() does not overwrite the name
Pavel Filipenský [Wed, 11 Mar 2026 18:37:11 +0000 (19:37 +0100)] 
util/tests: Test that talloc_keep_secret() does not overwrite the name

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
4 weeks agolib/util: Overwrite talloc name in talloc_keep_secret() only if it would reveal memor...
Pavel Filipenský [Wed, 11 Mar 2026 16:39:48 +0000 (17:39 +0100)] 
lib/util: Overwrite talloc name in talloc_keep_secret() only if it would reveal memory content

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
4 weeks agoutil/tests: Extend the 'test_talloc_keep_secret' test
Pavel Filipenský [Wed, 11 Mar 2026 18:36:22 +0000 (19:36 +0100)] 
util/tests: Extend the 'test_talloc_keep_secret' test

Test that talloc_strdup() puts the secret as talloc name.

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
4 weeks agoRevert "lib/util: Avoid overwriting talloc chunk name in talloc_keep_secret()"
Pavel Filipenský [Wed, 11 Mar 2026 16:34:05 +0000 (17:34 +0100)] 
Revert "lib/util: Avoid overwriting talloc chunk name in talloc_keep_secret()"

This reverts commit 7e693b55730ceba2ef326286a0c68d5d91324a22.

Without this commit, for memory allocated via e.g. talloc_strdup(),
talloc name would reveal memory content.

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
5 weeks agoheimdal_build Remove unneeded -Wno-error flags
Gary Lockyer [Thu, 5 Mar 2026 03:12:23 +0000 (16:12 +1300)] 
heimdal_build Remove unneeded -Wno-error flags

Remove the -Wno-error flags introduced by
commit 3790dcb59d5380b6af164777d8c43585b746807c

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Autobuild-User(master): Gary Lockyer <gary@samba.org>
Autobuild-Date(master): Tue Mar 24 00:13:03 UTC 2026 on atb-devel-224

5 weeks agothird_party:heimdal: Import lorikeet-heimdal-202603022028
Gary Lockyer [Tue, 3 Mar 2026 22:15:30 +0000 (11:15 +1300)] 
third_party:heimdal: Import lorikeet-heimdal-202603022028

Fix compiler errors when compiling with clang 21:

commits: 0373c37e00d290da6256784163245fa746910e40
         8879a6ba3571fdfdd110d8b3bdb9e115c9933a8d
         2d84c5fe790d063737c6023228dce96ca8231092
 c5032b0e576735e45ef701b579ce8e32edf5d75c
 8702e2aa7f786edbf3ebd34eb97c1fe22dd8066e
 ff2e379cb06dfe9440de13a5ffd0b36ab6cbda87
 a4ee4d08ac0f1df8e4bfb0788d3668dcee0dce45

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
5 weeks agolib:util: Remove is_aligned prototype from alignment.h
Gary Lockyer [Sun, 22 Mar 2026 19:43:39 +0000 (08:43 +1300)] 
lib:util: Remove is_aligned prototype from alignment.h

is_aligned is now defined as static inline, so there's no need for the
prototype

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Mon Mar 23 08:23:50 UTC 2026 on atb-devel-224

5 weeks agos4:torture:rpc: spoolss fix cast-align warnings
Gary Lockyer [Wed, 18 Mar 2026 00:42:38 +0000 (13:42 +1300)] 
s4:torture:rpc: spoolss fix cast-align warnings

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Mar 20 14:30:23 UTC 2026 on atb-devel-224

5 weeks agos4:torture:rpc: samr fix cast-align warnings
Gary Lockyer [Wed, 18 Mar 2026 00:39:42 +0000 (13:39 +1300)] 
s4:torture:rpc: samr fix cast-align warnings

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 weeks agos4:torture:rpc: netlogon fix cast-align warnings
Gary Lockyer [Wed, 18 Mar 2026 00:38:24 +0000 (13:38 +1300)] 
s4:torture:rpc: netlogon fix cast-align warnings

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 weeks agos4:torture:rpc: iremotewinspool fix cast-align warnings
Gary Lockyer [Wed, 18 Mar 2026 00:37:13 +0000 (13:37 +1300)] 
s4:torture:rpc: iremotewinspool fix cast-align warnings

suppress warnings with discard_align_p

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 weeks agos4:torture:raw: search fix cast-align warnings
Gary Lockyer [Wed, 18 Mar 2026 00:36:13 +0000 (13:36 +1300)] 
s4:torture:raw: search fix cast-align warnings

Use memcpy to extract the pointer, suppressing the cast-align warnings

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 weeks agos4:torture:libnetapi: group fix cast-align warnings
Gary Lockyer [Wed, 18 Mar 2026 00:33:33 +0000 (13:33 +1300)] 
s4:torture:libnetapi: group fix cast-align warnings

Adds code to check that buffer is aligned correctly for the expected types.
Then suppresses the cast-align warnings with discard_align_p

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 weeks agos4:torture:libnetapi: user fix cast-align warnings
Gary Lockyer [Wed, 18 Mar 2026 00:35:14 +0000 (13:35 +1300)] 
s4:torture:libnetapi: user fix cast-align warnings

Use talloc_get_type_abort to suppress cats-align warnings.
As buffer is allocated via talloc it will be correctly aligned.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 weeks agos3:lib:netapi set talloc type for GROUP_INFO_x
Gary Lockyer [Wed, 18 Mar 2026 00:28:53 +0000 (13:28 +1300)] 
s3:lib:netapi set talloc type for GROUP_INFO_x

Call talloc_set_type setting the type name after copying the GROUP_INFO to the
buffer.  This will allow the client code to use talloc_get_type_abort, if needed
to suppress any cast-align warnings

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 weeks agolib:replace add discard_align_p
Gary Lockyer [Wed, 18 Mar 2026 00:25:44 +0000 (13:25 +1300)] 
lib:replace add discard_align_p

Add discard_align_p macro to allow the suppression of cast-align warnings

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 weeks agolib:util add alignment utilities
Gary Lockyer [Wed, 18 Mar 2026 00:24:12 +0000 (13:24 +1300)] 
lib:util add alignment utilities

Add utilities to allow checking of pointer alignment.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 weeks agos4:torture/smb2: let bench.c use ',' as thousands separator
Stefan Metzmacher [Fri, 6 Feb 2026 15:21:36 +0000 (16:21 +0100)] 
s4:torture/smb2: let bench.c use ',' as thousands separator

While printing very large numbers of bytes or operations per
second, it's hard to reach the value.

So we now print '26,847,201,280' instead of '26847201280'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 weeks agos4:torture/smb2: use ';' as field separator in bench.c progress output
Stefan Metzmacher [Thu, 19 Mar 2026 15:46:16 +0000 (16:46 +0100)] 
s4:torture/smb2: use ';' as field separator in bench.c progress output

',' will be used as thousands separator in the next patch.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 weeks agovfs_ceph_new: fix typecast error in vfs_ceph_flistxattr
Shweta Sodani [Wed, 18 Mar 2026 14:30:21 +0000 (20:00 +0530)] 
vfs_ceph_new: fix typecast error in vfs_ceph_flistxattr

Signed-off-by: Shweta Sodani <ssodani@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: John Mulligan <jmulligan@redhat.com>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Fri Mar 20 06:35:12 UTC 2026 on atb-devel-224

5 weeks agovfs_ceph_new: Replace #if with #ifdef
Anoop C S [Tue, 17 Mar 2026 07:41:05 +0000 (13:11 +0530)] 
vfs_ceph_new: Replace #if with #ifdef

Use '#ifdef' instead of '#if' to make the presence of the define
explicit, rather than relying on undefined macros evaluating to zero.

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: John Mulligan <jmulligan@redhat.com>
5 weeks agovfs_ceph_new: Remove code duplication
Anoop C S [Tue, 17 Mar 2026 07:36:43 +0000 (13:06 +0530)] 
vfs_ceph_new: Remove code duplication

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: John Mulligan <jmulligan@redhat.com>
5 weeks agovfs_ceph_new: fix the config_tmp talloc leak in load_config
Shweta Sodani [Mon, 16 Mar 2026 14:26:32 +0000 (19:56 +0530)] 
vfs_ceph_new: fix the config_tmp talloc leak in load_config

Signed-off-by: Shweta Sodani <ssodani@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: John Mulligan <jmulligan@redhat.com>
5 weeks agovfs_ceph_new: fix the inode leak in flistxattr
Shweta Sodani [Mon, 16 Mar 2026 14:08:58 +0000 (19:38 +0530)] 
vfs_ceph_new: fix the inode leak in flistxattr

Signed-off-by: Shweta Sodani <ssodani@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: John Mulligan <jmulligan@redhat.com>
5 weeks agovfs_streams_xattr: fix harmless use-after-free in streams_xattr_connect()
Stefan Metzmacher [Tue, 17 Mar 2026 15:05:47 +0000 (16:05 +0100)] 
vfs_streams_xattr: fix harmless use-after-free in streams_xattr_connect()

While tools like address sanitizer and most likely valgrind
report this it's not actually a real problem.

Most likely the content of default_ext_prefix is still the same
as TALLOC_FREE doesn't explicitly change then content of
the string.

talloc_strdup(config, ext_prefix) may reuse the same memory and the
memcpy in __talloc_strlendup() may get a problem.

Also all values are only controlled by the administrator via
the smb.conf not by the client.

To prove this theory I used the following change:

 diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c
 index 5d267a1c1fbf..dc20ec1eb2e3 100644
 --- a/source3/modules/vfs_streams_xattr.c
 +++ b/source3/modules/vfs_streams_xattr.c
 @@ -1466,18 +1466,25 @@ static int streams_xattr_connect(vfs_handle_struct *handle,
                 return -1;
         }

 +       DBG_ERR("default_ext_prefix[%p][%zu][%s]\n",
 +                default_ext_prefix, talloc_get_size(default_ext_prefix),
 +                default_ext_prefix);
 +
         ext_prefix = lp_parm_const_string(SNUM(handle->conn),
                                           "streams_xattr",
                                           "ext_prefix",
                                           default_ext_prefix);
 +       DBG_ERR("ext_prefix[%p][%s]\n", ext_prefix, ext_prefix);
 +       SMB_ASSERT(default_ext_prefix == ext_prefix);
         TALLOC_FREE(default_ext_prefix);
 +       DBG_ERR("ext_prefix[%p][%s]\n", ext_prefix, ext_prefix);
         config->ext_prefix = talloc_strdup(config, ext_prefix);
 +       DBG_ERR("config->ext_prefix[%p][%zu][%s]\n",
 +                config->ext_prefix, talloc_get_size(config->ext_prefix),
 +                config->ext_prefix);
 +       SMB_ASSERT(config->ext_prefix == ext_prefix);
         if (config->ext_prefix == NULL) {
                 DEBUG(1, ("talloc_strdup() failed\n"));
                 errno = ENOMEM;
                 return -1;
         }
 -       DBG_DEBUG("using stream ext prefix: %s\n", config->ext_prefix);
 +       DBG_ERR("using stream ext prefix: %s\n", config->ext_prefix);

         config->store_stream_type = lp_parm_bool(SNUM(handle->conn),
                                                  "streams_xattr",

Running it twice in a debugger didn't hit any SMB_ASSERT
and printed the expected values:

smbd version 4.25.0pre1-DEVELOPERBUILD started.
Copyright Andrew Tridgell and the Samba Team 1992-2026
daemon 'smbd' : Starting process ...
streams_xattr_connect: default_ext_prefix[0x5555555ed930][19][user.DosStreamExt.]
streams_xattr_connect: ext_prefix[0x5555555ed930][user.DosStreamExt.]
streams_xattr_connect: ext_prefix[0x5555555ed930][user.DosStreamExt.]
streams_xattr_connect: config->ext_prefix[0x5555555ed930][19][user.DosStreamExt.]
streams_xattr_connect: using stream ext prefix: user.DosStreamExt.

smbd version 4.25.0pre1-DEVELOPERBUILD started.
Copyright Andrew Tridgell and the Samba Team 1992-2026
daemon 'smbd' : Starting process ...
streams_xattr_connect: default_ext_prefix[0x5555555ed6d0][19][user.DosStreamExt.]
streams_xattr_connect: ext_prefix[0x5555555ed6d0][user.DosStreamExt.]
streams_xattr_connect: ext_prefix[0x5555555ed6d0][user.DosStreamExt.]
streams_xattr_connect: config->ext_prefix[0x5555555ed6d0][19][user.DosStreamExt.]
streams_xattr_connect: using stream ext prefix: user.DosStreamExt.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Mar 19 15:00:19 UTC 2026 on atb-devel-224

5 weeks agoctdb-tests: Tweak some NFS monitoring tests for portability
Martin Schwenke [Fri, 13 Mar 2026 06:38:43 +0000 (17:38 +1100)] 
ctdb-tests: Tweak some NFS monitoring tests for portability

FreeBSD doesn't have an option to print time in nanoseconds.

We need to run something to produce fake "statistics" that are
guaranteed to change.  I think this will do - the chances of getting
the same 256 bytes twice in a row seems small enough.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Wed Mar 18 12:33:13 UTC 2026 on atb-devel-224

5 weeks agoctdb-tests: Skip statd-callout tests on FreeBSD
Martin Schwenke [Fri, 13 Mar 2026 06:32:42 +0000 (17:32 +1100)] 
ctdb-tests: Skip statd-callout tests on FreeBSD

NFS is probably wildly different on FreeBSD and statd_callout_helper
uses chown with the --reference option.  Too hard.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agoctdb-scripts: Trim "wc -l" output for FreeBSD compatibility
Martin Schwenke [Fri, 13 Mar 2026 06:12:38 +0000 (17:12 +1100)] 
ctdb-scripts: Trim "wc -l" output for FreeBSD compatibility

tests/UNIT/eventscripts/10.interface.020.sh fails in case
"10.interface.script releaseip dev123 10.0.0.3 24" with:

--------------------------------------------------
Output (Exit status: 0):
--------------------------------------------------
Killed       10/10 TCP connections to released IP 10.0.0.3, using ss -K
--------------------------------------------------
Required output (Exit status: 0):
--------------------------------------------------
Killed 10/10 TCP connections to released IP 10.0.0.3, using ss -K

FAILED
==========================================================================
TEST FAILED: ./tests/UNIT/eventscripts/10.interface.020.sh (status 1) (duration: 1s)
==========================================================================

We have seen this type of thing before when output doesn't match
because FreeBSD wc -l space-pads output.  For example, see commit
c6c81ea287924c2924aebc6dc0cdea1dc4322ae2.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agoctdb-event: Fix the build on FreeBSD
Martin Schwenke [Fri, 13 Mar 2026 04:53:54 +0000 (15:53 +1100)] 
ctdb-event: Fix the build on FreeBSD

FreeBSD does not have ENODATA.  Sorry, I wasn't thinking about
portability when I made the changes that introduced the use of ENODATA
here.  :-(

Use ENOMSG instead, for lack of anything better, to indicate a script
slot containing no result.  ENOENT might seem more appropriate but it
is already involved in this code (where it is sometimes mapped to
ENOEXEC).  The choice of error number only needs to be consistent
within the event code.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agothird_party: Add check for HAVE_SYSCALL_INT for socket_wrapper
Martin Schwenke [Fri, 13 Mar 2026 04:59:55 +0000 (15:59 +1100)] 
third_party: Add check for HAVE_SYSCALL_INT for socket_wrapper

This is copied from third_party/uid_wrapper/wscript.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
6 weeks agovfs_ceph_new: profile xattr and fstatvfs
Shachar Sharon [Tue, 10 Mar 2026 11:25:28 +0000 (13:25 +0200)] 
vfs_ceph_new: profile xattr and fstatvfs

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Mar 13 10:42:07 UTC 2026 on atb-devel-224

6 weeks agovfs_default: profile xattr and fstatvfs
Shachar Sharon [Tue, 10 Mar 2026 10:28:02 +0000 (12:28 +0200)] 
vfs_default: profile xattr and fstatvfs

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 weeks agoprofile: add xattr and fstatvfs syscalls
Shachar Sharon [Mon, 9 Mar 2026 16:09:11 +0000 (18:09 +0200)] 
profile: add xattr and fstatvfs syscalls

Add missing *xattr and fstatvfs to profile's syscall counters.

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 weeks agorpc: Don't offer spoolss RPC with "disable spoolss = yes"
Volker Lendecke [Tue, 10 Mar 2026 09:17:39 +0000 (10:17 +0100)] 
rpc: Don't offer spoolss RPC with "disable spoolss = yes"

Bug: https://bugzilla.samba.org/show_bug.cgi?id=16019
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Mar 13 09:00:05 UTC 2026 on atb-devel-224

7 weeks agosmbd: update declaration in smb2_sesssetup, smb2_tcon
Shwetha Acharya [Thu, 5 Mar 2026 07:06:09 +0000 (12:36 +0530)] 
smbd: update declaration in smb2_sesssetup, smb2_tcon

Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
Reviewed-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Shweta Sodani <ssodani@redhat.com>
Reviewed-by: Xavi Hernandez <xhernandez@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Tue Mar 10 13:01:10 UTC 2026 on atb-devel-224

7 weeks agos3: Warn if no mutexes available at runtime
Volker Lendecke [Wed, 9 Jan 2019 14:10:54 +0000 (15:10 +0100)] 
s3: Warn if no mutexes available at runtime

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Shweta Sodani <ssodani@redhat.com>
Reviewed-by: Xavi Hernandez <xhernandez@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
7 weeks agosmbd: Log client ip when rejecting nonencrypted tcons
Volker Lendecke [Mon, 10 Aug 2015 14:55:22 +0000 (16:55 +0200)] 
smbd: Log client ip when rejecting nonencrypted tcons

Used for better diagnosis

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Shweta Sodani <ssodani@redhat.com>
Reviewed-by: Xavi Hernandez <xhernandez@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
7 weeks agosmbd: Log client ip when rejecting nonencrypted sesssetups
Volker Lendecke [Mon, 10 Aug 2015 14:55:22 +0000 (16:55 +0200)] 
smbd: Log client ip when rejecting nonencrypted sesssetups

Used for better diagnosis

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Shweta Sodani <ssodani@redhat.com>
Reviewed-by: Xavi Hernandez <xhernandez@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
7 weeks agorpcclient: Print current_users for share info level 2
Volker Lendecke [Mon, 28 Oct 2013 16:03:06 +0000 (16:03 +0000)] 
rpcclient: Print current_users for share info level 2

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Shweta Sodani <ssodani@redhat.com>
Reviewed-by: Xavi Hernandez <xhernandez@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
7 weeks agosmbd: Fix getting fs capabilities
Volker Lendecke [Tue, 3 Mar 2026 15:41:03 +0000 (16:41 +0100)] 
smbd: Fix getting fs capabilities

The change from statvfs to fstatvfs has a bug: When this is called in
make_connection_snum, conn->cwd_fsp is not fully set up yet. So the
"This happens in create_conn_struct_as_root()" comment applies
everywhere. We need to look at the share rootdir, so open a pathref
fsp on it. This is called only once per tcon, so it's not in our hot
code path.

Found by a user who has "/" mounted readonly, and MacOS denied
writing.

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 Mar  4 10:01:41 UTC 2026 on atb-devel-224

8 weeks agobuild: clang 21 re-enable -Wunititialized-const-pointer
Gary Lockyer [Mon, 2 Mar 2026 00:32:23 +0000 (13:32 +1300)] 
build: clang 21 re-enable -Wunititialized-const-pointer

[4102/5009] Compiling source4/torture/rpc/spoolss_notify.c
  ../../source4/torture/rpc/spoolss.c:3984:48: error: variable 'data' is
       uninitialized when passed as a const pointer argument here
       [-Werror,-Wuninitialized-const-pointer]
    3984CHECK_NEEDED_SIZE_LEVEL(spoolss_PrinterData, &data, type, needed, 1);

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Tue Mar  3 05:55:25 UTC 2026 on atb-devel-224

8 weeks agobuild: Allow developer builds with clang 21
Gary Lockyer [Sun, 1 Mar 2026 23:53:19 +0000 (12:53 +1300)] 
build: Allow developer builds with clang 21

Disable clang warnings to allow samba to be compiled with clang 21.

Subsequent commits will fix the offending code.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agovfs: Remove unused SMB_VFS_GETWD()
Volker Lendecke [Tue, 17 Feb 2026 11:22:12 +0000 (12:22 +0100)] 
vfs: Remove unused SMB_VFS_GETWD()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sun Mar  1 21:22:24 UTC 2026 on atb-devel-224

8 weeks agovfs_shadow_copy2: Remove special chdir-handling
Volker Lendecke [Tue, 17 Feb 2026 11:03:45 +0000 (12:03 +0100)] 
vfs_shadow_copy2: Remove special chdir-handling

With only changing into the share root, and the share root never being
a @GMT-path or one with a twrp, we don't need special handling.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agovfs_widelinks: Chdir never gets a relative path anymore
Volker Lendecke [Tue, 17 Feb 2026 10:22:13 +0000 (11:22 +0100)] 
vfs_widelinks: Chdir never gets a relative path anymore

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agolib: Remove the "getwd cache"
Volker Lendecke [Mon, 16 Feb 2026 16:40:55 +0000 (17:40 +0100)] 
lib: Remove the "getwd cache"

No longer needed

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agotorture: Use SINGLETON_CACHE_TALLOC in tests
Volker Lendecke [Mon, 16 Feb 2026 16:38:02 +0000 (17:38 +0100)] 
torture: Use SINGLETON_CACHE_TALLOC in tests

GETWD_CACHE is on its way out. Despite not having _TALLOC in its name
nor it being marked as talloc in memcache.h, memcache_is_talloc()
shows it as being talloc'ed.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agovfs: Remove callers of SMB_VFS_GETWD()
Volker Lendecke [Mon, 16 Feb 2026 16:18:42 +0000 (17:18 +0100)] 
vfs: Remove callers of SMB_VFS_GETWD()

We don't chdir() arbitrarily. We can reference conn->connectpath
instead.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agovfs: Significantly simplify vfs_ChDir_shareroot()
Volker Lendecke [Mon, 16 Feb 2026 15:55:58 +0000 (16:55 +0100)] 
vfs: Significantly simplify vfs_ChDir_shareroot()

Now that we are sure we don't chdir to arbitrary paths, and nobody
except vfs_ChDir_shareroot() calls vfs_GetWd() anymore, we can get rid
of the getwd cache and replace the LastDir-check with a simple

if (conn == chdir_lastconn_cache) {
return 0;
}

The places where we reset LastDir to NULL, forcing a real chdir, are
replaced by a call to reset_chdir_lastconn_cache().

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agovfs: A connectpath is never "."
Volker Lendecke [Mon, 16 Feb 2026 15:59:42 +0000 (16:59 +0100)] 
vfs: A connectpath is never "."

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agovfs: Inline vfs_ChDir() into vfs_ChDir_shareroot()
Volker Lendecke [Mon, 16 Feb 2026 15:56:50 +0000 (16:56 +0100)] 
vfs: Inline vfs_ChDir() into vfs_ChDir_shareroot()

vfs_ChDir_shareroot() was the only caller of vfs_ChDir()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agosmbd: Make vfs_GetWd() static to vfs.c
Volker Lendecke [Mon, 16 Feb 2026 15:09:13 +0000 (16:09 +0100)] 
smbd: Make vfs_GetWd() static to vfs.c

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agosmbd: Inline print_impersonation_info()
Volker Lendecke [Mon, 16 Feb 2026 15:05:31 +0000 (16:05 +0100)] 
smbd: Inline print_impersonation_info()

With the fact that we only chdir() to the share root, we can directly
print conn->connectpath and avoid a call to vfs_GetWd()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agosmbd: Make vfs_ChDir() static
Volker Lendecke [Mon, 16 Feb 2026 15:01:47 +0000 (16:01 +0100)] 
smbd: Make vfs_ChDir() static

This makes it clear that we only ever chdir() to the root of a share.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agovfstest: Remove the chdir/getwd commands
Volker Lendecke [Mon, 16 Feb 2026 14:23:42 +0000 (15:23 +0100)] 
vfstest: Remove the chdir/getwd commands

Not called in test, remove them.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agosmbd: Avoid the VFS' chdir() call in close_cnum()
Volker Lendecke [Mon, 16 Feb 2026 14:19:49 +0000 (15:19 +0100)] 
smbd: Avoid the VFS' chdir() call in close_cnum()

The purpose of this call here is to make a file system
unmountable. For shares backed by a local file system, a direct
chdir(2) syscall to "/" will achieve the same, and shares like cephfs
backed by libraries without a local mount will not be affected
anyway. For them, a VFS level chdir("/") relative to a connection does
not make much sense anyway.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agosmbd: Remove unused create_conn_struct_tos()
Volker Lendecke [Mon, 16 Feb 2026 14:16:07 +0000 (15:16 +0100)] 
smbd: Remove unused create_conn_struct_tos()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agofss_srv: Use create_conn_struct_chdir()
Volker Lendecke [Mon, 16 Feb 2026 14:12:59 +0000 (15:12 +0100)] 
fss_srv: Use create_conn_struct_chdir()

This is the last user of the non-chdir create_conn_struct_tos(). While
I don't fully understand the code, this is an RPC server that *should*
not care about the current working directory. There are some tests for
this in the rpc.fsrvp group of tests, so I don't think this breaks too
badly.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agosmbd: Remove unused create_conn_struct_tos_cwd()
Volker Lendecke [Mon, 16 Feb 2026 13:21:17 +0000 (14:21 +0100)] 
smbd: Remove unused create_conn_struct_tos_cwd()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agosmbd: Call create_conn_struct_chdir() in get_referred_path()
Volker Lendecke [Mon, 16 Feb 2026 13:16:46 +0000 (14:16 +0100)] 
smbd: Call create_conn_struct_chdir() in get_referred_path()

create_conn_struct_tos_cwd() provides an attempt to chdir() back to
where we came from. This is flawed, because SMB_VFS_CHDIR() is always
relative to a connection, and conn_struct_tos_destructor() calls
vfs_ChDir() on the fake connection, not the one we came from.

Remove the flawed attempt to chdir() back in get_referred_path(). The
one caller in vfswrap_get_dfs_referrals() changes back to the "real"
connection that issued the dfs call from SMB, and the RPC server
callers don't care. They rely on the chdir("/") in
conn_wrap_destructor().

This adds one chdir("/") in smbd's "get referral" calls, but those
should be rare enough not to cause performance problems.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agodfssrv: Call create_conn_struct_chdir()
Volker Lendecke [Mon, 16 Feb 2026 13:11:57 +0000 (14:11 +0100)] 
dfssrv: Call create_conn_struct_chdir()

This is inside an rpc server, where we don't depend on an implicit
current working directory. We don't need the "jump back to old cwd"
that create_conn_struct_tos_cwd() provided.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agosrvsvc: Call create_conn_struct_chdir()
Volker Lendecke [Mon, 16 Feb 2026 13:03:57 +0000 (14:03 +0100)] 
srvsvc: Call create_conn_struct_chdir()

This is inside an rpc server, where we don't depend on an implicit
current working directory. We don't need the "jump back to old cwd"
that create_conn_struct_tos_cwd() provided.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agoeventlog: Use create_conn_struct_chdir()
Volker Lendecke [Mon, 16 Feb 2026 12:57:08 +0000 (13:57 +0100)] 
eventlog: Use create_conn_struct_chdir()

I did not find any use of cwd-dependent calls in this code, the
eventlog tdb's are all relative to state_path(), which is absolute. As
this is in a rpc server we don't have to preserve any cwd.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agoprinting: Call create_conn_struct_chdir()
Volker Lendecke [Mon, 16 Feb 2026 12:48:54 +0000 (13:48 +0100)] 
printing: Call create_conn_struct_chdir()

This is only linked from rpcd_spoolss, where we don't depend on an
implicit current working directory. We don't need the "jump back to
old cwd" that create_conn_struct_tos_cwd() provided.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agonet: Use create_conn_struct_chdir() in "net vfs"
Volker Lendecke [Mon, 16 Feb 2026 12:43:04 +0000 (13:43 +0100)] 
net: Use create_conn_struct_chdir() in "net vfs"

We don't need to jump back to the previous cwd when exiting from the
net vfs process.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agopysmbd: Use create_conn_struct_chdir()
Volker Lendecke [Mon, 16 Feb 2026 12:14:24 +0000 (13:14 +0100)] 
pysmbd: Use create_conn_struct_chdir()

pysmbd is the one user of fake connection_structs that depends on
not changing to "/" after the connection has been torn down. Add
special handling here.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agovfstest: Use create_conn_struct_chdir()
Volker Lendecke [Mon, 16 Feb 2026 11:46:34 +0000 (12:46 +0100)] 
vfstest: Use create_conn_struct_chdir()

We don't need to return to the old cwd when exiting the process.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agosmbd: Remove unused create_conn_struct_cwd()
Volker Lendecke [Mon, 16 Feb 2026 11:43:12 +0000 (12:43 +0100)] 
smbd: Remove unused create_conn_struct_cwd()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agomdssvc: Use create_conn_struct_chdir()
Volker Lendecke [Mon, 16 Feb 2026 11:40:12 +0000 (12:40 +0100)] 
mdssvc: Use create_conn_struct_chdir()

Simplify mdssvc by using create_conn_struct_chdir()'s destructor plus
the vfs_ChDir_shareroot call.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agosmbd: Add create_conn_struct_chdir()
Volker Lendecke [Mon, 16 Feb 2026 11:36:25 +0000 (12:36 +0100)] 
smbd: Add create_conn_struct_chdir()

This is supposed to replace create_conn_struct_tos() in the next patches. Stay
tuned...

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agosmbd: Leave sconn->ev_ctx as NULL for internal fake connections
Volker Lendecke [Thu, 12 Feb 2026 19:54:54 +0000 (20:54 +0100)] 
smbd: Leave sconn->ev_ctx as NULL for internal fake connections

These connection_structs are only there to access files like msdfs
symlinks or printer driver files. They will never participate in async
processing like sending out events or getting delayed for oplocks. Any
such use is a bug, because if you look at create_conn_struct_tos() we
create an event context that we will never poll on, so events posted
there will never finish. Leave the ev_ctx NULL so that we get an early
crash instead of running into problems later.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agomdssvc: Align an integer type
Volker Lendecke [Thu, 12 Feb 2026 19:31:19 +0000 (20:31 +0100)] 
mdssvc: Align an integer type

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agosmbd: Remove a pointless TALLOC_FREE()
Volker Lendecke [Thu, 12 Feb 2026 19:14:08 +0000 (20:14 +0100)] 
smbd: Remove a pointless TALLOC_FREE()

This hangs off "c" anyway

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agosmbd: Add vfs_ChDir_shareroot() wrapper
Volker Lendecke [Thu, 12 Feb 2026 19:01:48 +0000 (20:01 +0100)] 
smbd: Add vfs_ChDir_shareroot() wrapper

Clarify where we just change to the root of the export.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agoprinting: Streamline move_driver_to_download_area()
Volker Lendecke [Thu, 12 Feb 2026 17:48:03 +0000 (18:48 +0100)] 
printing: Streamline move_driver_to_download_area()

Centralize cleanup

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agoprinting: Streamline delete_driver_files()
Volker Lendecke [Thu, 12 Feb 2026 13:43:57 +0000 (14:43 +0100)] 
printing: Streamline delete_driver_files()

Centralize cleanup

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agoprinting: Streamline get_correct_cversion()
Volker Lendecke [Thu, 12 Feb 2026 12:01:30 +0000 (13:01 +0100)] 
printing: Streamline get_correct_cversion()

Make it return WERROR, centralize cleanup at the end of the function.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agoprinting: Modernize DEBUGs
Volker Lendecke [Thu, 12 Feb 2026 09:49:28 +0000 (10:49 +0100)] 
printing: Modernize DEBUGs

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agorpc_server: Move dfs helper routines to srv_dfs_nt.c
Volker Lendecke [Wed, 11 Feb 2026 17:25:30 +0000 (18:25 +0100)] 
rpc_server: Move dfs helper routines to srv_dfs_nt.c

This makes it clear that these callers of create_conn_struct_tos_cwd()
don't really need to chdir() back to whatever cwd the process was in
before. RPC servers don't really have a concept of "implicit" current
working directory that is assumed to be the root dir of the current
share.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agos3/include: Remove unused BIG_UINT
Anoop C S [Sun, 1 Mar 2026 05:55:09 +0000 (11:25 +0530)] 
s3/include: Remove unused BIG_UINT

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Sun Mar  1 11:18:37 UTC 2026 on atb-devel-224

8 weeks agos3/libsmb: Use PULL_LE_U64 for BIG_UINT
Anoop C S [Sun, 1 Mar 2026 05:53:52 +0000 (11:23 +0530)] 
s3/libsmb: Use PULL_LE_U64 for BIG_UINT

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
8 weeks agos3/include: Remove unused SBIG_UINT
Anoop C S [Sun, 1 Mar 2026 05:44:52 +0000 (11:14 +0530)] 
s3/include: Remove unused SBIG_UINT

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
8 weeks agos3/smbd: Convert smbd_do_qfsinfo() to use PUSH_LE_U64
Anoop C S [Sun, 1 Mar 2026 05:43:29 +0000 (11:13 +0530)] 
s3/smbd: Convert smbd_do_qfsinfo() to use PUSH_LE_U64

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
8 weeks agos3/libsmb: Convert build_fs_quota_buffer() to use PUSH_LE_U64
Anoop C S [Sun, 1 Mar 2026 05:42:21 +0000 (11:12 +0530)] 
s3/libsmb: Convert build_fs_quota_buffer() to use PUSH_LE_U64

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
8 weeks agos3:selftest: update aio_ratelimit tests for burst support
Avan Thakkar [Thu, 22 Jan 2026 16:18:37 +0000 (21:48 +0530)] 
s3:selftest: update aio_ratelimit tests for burst support

- Replace delay_max configuration with burst_mult parameters.
- Add three test cases: basic rate limiting, burst behavior, and recovery

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

Signed-off-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Shweta Sodani <ssodani@redhat.com>
Reviewed-by: Shachar Sharon <ssharon@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Fri Feb 27 11:52:46 UTC 2026 on atb-devel-224

8 weeks agodocs-xml/manpages: update doc to add burst_mult parameters
Avan Thakkar [Thu, 22 Jan 2026 15:43:57 +0000 (21:13 +0530)] 
docs-xml/manpages: update doc to add burst_mult parameters

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

Signed-off-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Shweta Sodani <ssodani@redhat.com>
Reviewed-by: Shachar Sharon <ssharon@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agovfs_aio_ratelimit: support human-readable bandwidth limits
Avan Thakkar [Thu, 22 Jan 2026 14:58:16 +0000 (20:28 +0530)] 
vfs_aio_ratelimit: support human-readable bandwidth limits

Allow read_bw_limit and write_bw_limit to be specified using
size suffixes (K/M/G/T).

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

Signed-off-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Shweta Sodani <ssodani@redhat.com>
Reviewed-by: Shachar Sharon <ssharon@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agovfs_aio_ratelimit: Add per-share TDB persistence for local rate limiter state
Avan Thakkar [Tue, 2 Dec 2025 08:50:42 +0000 (14:20 +0530)] 
vfs_aio_ratelimit: Add per-share TDB persistence for local rate limiter state

Introduce local TDB storage for saving and restoring ratelimiter state
(iops_tokens, bytes_tokens, last timestamp). Each share now persists
its read/write limiter state under aio_ratelimit.tdb.

Added VERSION pseudo-key for schema versioning

On disconnect, save the latest state and close TDB.

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

Signed-off-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Shweta Sodani <ssodani@redhat.com>
Reviewed-by: Shachar Sharon <ssharon@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
8 weeks agovfs_aio_ratelimit: introduce burst-aware token bucket model
Avan Thakkar [Mon, 1 Dec 2025 12:34:54 +0000 (18:04 +0530)] 
vfs_aio_ratelimit: introduce burst-aware token bucket model

Refactor the rate limiter to use a continuous token-bucket model with
configurable burst multiplier. This replaces the older time-window and
delay_max logic.

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

Signed-off-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Shweta Sodani <ssodani@redhat.com>
Reviewed-by: Shachar Sharon <ssharon@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>