]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
28 hours agovfs_ceph_new: do explicit 'ceph_init' call master
Shachar Sharon [Thu, 6 Nov 2025 09:15:43 +0000 (11:15 +0200)] 
vfs_ceph_new: do explicit 'ceph_init' call

Prefer an explicit call to 'ceph_init' for better debug handling in case
of failure. Without such call the init is done behind the scenes by
libcephfs upon first mount but we don't have have enough visibility in
case something went wrong.

Signed-off-by: Shachar Sharon <ssharon@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): Sat Dec 13 19:40:01 UTC 2025 on atb-devel-224

3 days agodocs-xml: fix manpage for "net offlinejoin requestodj" gitlab/master
Günther Deschner [Wed, 9 Apr 2025 11:52:08 +0000 (13:52 +0200)] 
docs-xml: fix manpage for "net offlinejoin requestodj"

One actually does *NOT* need to provide AD credentials to process a
requestodj operation. This is run as root and populates Samba's
databases based on the ODJ blob. Thanks John Mulligan for pointing this out.

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

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: John Mulligan <jmulligan@redhat.com>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Thu Dec 11 15:19:13 UTC 2025 on atb-devel-224

3 days agovfs_ceph_new: improved debug logging
Shachar Sharon [Wed, 3 Dec 2025 13:41:22 +0000 (15:41 +0200)] 
vfs_ceph_new: improved debug logging

Use consistent style in debug logging, using 'key=value' conventions.
When printing string values use the '%s' format.

Also, fallowing commit 70aab08c6 ("smbd: Use fsp_str_dbg() in DEBUGs")
use this function with explicit var-name when printing 'files_struct'.

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Shweta Sodani <ssodani@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
3 days agovfs_ceph_new: limit to 80-chars lines
Shachar Sharon [Wed, 3 Dec 2025 11:18:35 +0000 (13:18 +0200)] 
vfs_ceph_new: limit to 80-chars lines

Top level .clang-format uses 'ColumnLimit: 80'; however few lines of
code exceeded that limit. Align with common Samba coding conventions.

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
4 days agos4/dlz: add support for bind 9.20
Michael Tokarev [Tue, 3 Jun 2025 06:41:57 +0000 (09:41 +0300)] 
s4/dlz: add support for bind 9.20

bind dlz interface does not change much, yet we build
dlz_bind9_NN for every bind9 version NN we support -
despite many of them differ only in soversion, with
the code being identical.

For bind9_20, use dlz_bind9_18.so which we already have.

It'd be nice to extract actual bind9 version string in
sambadns.py and use it in more direct way.

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

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Samuel Cabrero <scabrero@samba.org>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Wed Dec 10 22:46:11 UTC 2025 on atb-devel-224

5 days agos3:include: Fix the smbc_fgetxattr() documentation in libsmbclient
Andreas Schneider [Thu, 27 Nov 2025 16:07:02 +0000 (17:07 +0100)] 
s3:include: Fix the smbc_fgetxattr() documentation in libsmbclient

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Dec  9 19:33:22 UTC 2025 on atb-devel-224

5 days agos3:libsmb: Call the correct function in smbc_fgetxattr()
Andreas Schneider [Tue, 25 Nov 2025 16:21:49 +0000 (17:21 +0100)] 
s3:libsmb: Call the correct function in smbc_fgetxattr()

Looks like nobody ever tested this.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 days agolibsmbclient: Fix negotiating posix_extensions
Andreas Schneider [Tue, 25 Nov 2025 18:06:48 +0000 (19:06 +0100)] 
libsmbclient: Fix negotiating posix_extensions

Without this, smbc_setOptionPosixExtensions() does nothing.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 days agos4:torture: Implement posix extension tests for libsmbclient
Andreas Schneider [Thu, 27 Nov 2025 15:02:57 +0000 (16:02 +0100)] 
s4:torture: Implement posix extension tests for libsmbclient

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 days agoselftest: Add some hardlinks for testing SMB3 posix extensions
Andreas Schneider [Thu, 27 Nov 2025 15:33:28 +0000 (16:33 +0100)] 
selftest: Add some hardlinks for testing SMB3 posix extensions

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 days agobootstrap: Update Fedora to version 43
Andreas Schneider [Thu, 30 Oct 2025 15:24:10 +0000 (16:24 +0100)] 
bootstrap: Update Fedora to version 43

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

5 days agothird_party: Update socket_wrapper to version 1.5.2
Andreas Schneider [Mon, 8 Dec 2025 14:14:47 +0000 (15:14 +0100)] 
third_party: Update socket_wrapper to version 1.5.2

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
5 days agopython:tests: Fix ProcessPoolExecutor with Python 3.14
Andreas Schneider [Tue, 9 Dec 2025 09:35:25 +0000 (10:35 +0100)] 
python:tests: Fix ProcessPoolExecutor with Python 3.14

REASON: Exception: Exception: Traceback (most recent call last):
  File "/home/asn/workspace/prj/oss/samba/asn-fix/bin/python/samba/tests/krb5/lockout_tests.py", line 858, in test_lockout_transaction_bad_pwd_samr_aes
    self.do_lockout_transaction(connect_samr_aes, correct_pw=False)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/asn/workspace/prj/oss/samba/asn-fix/bin/python/samba/tests/krb5/lockout_tests.py", line 990, in do_lockout_transaction
    connect_future = executor.submit(
        connect_fn,
    ...<7 lines>...
        workstation=user_creds.get_workstation(),
        dn=str(user_dn))
  File "/usr/lib64/python3.14/concurrent/futures/process.py", line 816, in submit
    self._adjust_process_count()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib64/python3.14/concurrent/futures/process.py", line 775, in _adjust_process_count
    self._spawn_process()
    ~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib64/python3.14/concurrent/futures/process.py", line 793, in _spawn_process
    p.start()
    ~~~~~~~^^
  File "/usr/lib64/python3.14/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
                  ~~~~~~~~~~~^^^^^^
  File "/usr/lib64/python3.14/multiprocessing/context.py", line 300, in _Popen
    return Popen(process_obj)
  File "/usr/lib64/python3.14/multiprocessing/popen_forkserver.py", line 35, in __init__
    super().__init__(process_obj)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/multiprocessing/popen_fork.py", line 20, in __init__
    self._launch(process_obj)
    ~~~~~~~~~~~~^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/multiprocessing/popen_forkserver.py", line 42, in _launch
    prep_data = spawn.get_preparation_data(process_obj._name)
  File "/usr/lib64/python3.14/multiprocessing/spawn.py", line 164, in get_preparation_data
    _check_not_importing_main()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib64/python3.14/multiprocessing/spawn.py", line 140, in _check_not_importing_main
    raise RuntimeError('''
    ...<16 lines>...
    ''')
RuntimeError:
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.

        This probably means that you are not using fork to start your
        child processes and you have forgotten to use the proper idiom
        in the main module:

            if __name__ == '__main__':
                freeze_support()
                ...

        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce an executable.

        To fix this issue, refer to the "Safe importing of main module"
        section in https://docs.python.org/3/library/multiprocessing.html

In Python 3.14, the default multiprocessing start method changed from fork to
forkserver/spawn. When using ProcessPoolExecutor, the code needs to
either:

1. Explicitly set the start method to fork (the simplest fix for this case)
2. Or ensure proper if __name__ == '__main__': guards (not practical for test
   code run by a test framework)

The fix is to explicitly use the fork start method when creating the
ProcessPoolExecutor. This can be done by passing a mp_context parameter:

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
6 days agolibcli/auth: Zero out password in smbencrypt.c
Pavel Filipenský [Wed, 26 Nov 2025 09:34:02 +0000 (10:34 +0100)] 
libcli/auth: Zero out password in smbencrypt.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org>
Autobuild-Date(master): Mon Dec  8 18:21:45 UTC 2025 on atb-devel-224

6 days agoauth: Use new data_blob_..._s() functions and remove talloc_keep_secret()
Pavel Filipenský [Wed, 26 Nov 2025 09:34:02 +0000 (10:34 +0100)] 
auth: Use new data_blob_..._s() functions and remove talloc_keep_secret()

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 days agolibrpc: Fix trailing white spaces in dcerpc.c
Pavel Filipenský [Wed, 26 Nov 2025 09:52:43 +0000 (10:52 +0100)] 
librpc: Fix trailing white spaces in dcerpc.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 days agolib/util: Add tests for the new secure data_blob_..._s() functions
Pavel Filipenský [Wed, 26 Nov 2025 07:06:21 +0000 (08:06 +0100)] 
lib/util: Add tests for the new secure data_blob_..._s() functions

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 days agolib/util: Fix trailing white spaces in tests/data_blob.c
Pavel Filipenský [Tue, 25 Nov 2025 16:26:15 +0000 (17:26 +0100)] 
lib/util: Fix trailing white spaces in tests/data_blob.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 days agolib/util: Avoid overwriting talloc chunk name in talloc_keep_secret()
Pavel Filipenský [Wed, 26 Nov 2025 10:13:50 +0000 (11:13 +0100)] 
lib/util: Avoid overwriting talloc chunk name in talloc_keep_secret()

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 days agolib/util: Add data_blob_..._s() functions that call talloc_keep_secret()
Pavel Filipenský [Wed, 3 Dec 2025 16:47:57 +0000 (17:47 +0100)] 
lib/util: Add data_blob_..._s() functions that call talloc_keep_secret()

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 days agolib/util: Move talloc_keep_secret.c from samba-util to samba-util-core
Pavel Filipenský [Wed, 3 Dec 2025 18:31:08 +0000 (19:31 +0100)] 
lib/util: Move talloc_keep_secret.c from samba-util to samba-util-core

Needed by future data_blob.h changes. ctdb uses data_blob and links only
samba-util-core.

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 days agolib/util: Set "PREDEFINED = DOXYGEN" in Doxyfile
Pavel Filipenský [Fri, 28 Nov 2025 08:35:49 +0000 (09:35 +0100)] 
lib/util: Set "PREDEFINED = DOXYGEN" in Doxyfile

that will set -DDOXYGEN and code inside #ifdef DOXYGEN is parsed

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 days agolib/util: Change comments to Doxygen in data_blob.h
Pavel Filipenský [Wed, 3 Dec 2025 19:52:17 +0000 (20:52 +0100)] 
lib/util: Change comments to Doxygen in data_blob.h

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 days agolib/util: Refactor data_blob.{h,c}
Pavel Filipenský [Wed, 3 Dec 2025 16:47:54 +0000 (17:47 +0100)] 
lib/util: Refactor data_blob.{h,c}

Makes data_blob_talloc_zero() use __location__ of the real caller

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 days agosmbtorture: add test "smb.lease.two-leases"
Ralph Boehme [Sat, 6 Dec 2025 11:22:00 +0000 (12:22 +0100)] 
smbtorture: add test "smb.lease.two-leases"

A test that shows that for redispatched deferred opens even though
delay_for_oplock_fn() might end up calling send_break_message(), the following
check in process_oplock_break_message() avoids sending break messages to the
client:

    process_oplock_break_message():
        ....
        if (breaking) {
            break_to &= breaking_to_required;
            if (breaking_to_required != break_to) {
                /*
                 * Note we don't increment the epoch
                 * here, which might be a bug in
                 * Windows too...
                 */
                breaking_to_required = break_to;
            }
            break_needed = false;
        }
        ...

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Dec  8 11:24:35 UTC 2025 on atb-devel-224

6 days agosmbd: set fsp->is_sparse in vfs_default_durable_reconnect()
Ralph Boehme [Thu, 6 Dec 2018 17:15:00 +0000 (18:15 +0100)] 
smbd: set fsp->is_sparse in vfs_default_durable_reconnect()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 days agosmbd: remove redundant initialisation
Ralph Boehme [Sun, 30 Nov 2025 16:12:09 +0000 (17:12 +0100)] 
smbd: remove redundant initialisation

cookie.allow_reconnect is already set to false by ZERO_STRUCT(cookie).

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 days agosmbd: pass fsp to vfs_default_durable_reconnect_check_stat()
Ralph Boehme [Tue, 28 Oct 2025 11:44:56 +0000 (12:44 +0100)] 
smbd: pass fsp to vfs_default_durable_reconnect_check_stat()

No change in behaviour.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 days agos3/locking: simplify reset_share_mode_entry()
Ralph Boehme [Mon, 27 Oct 2025 14:53:46 +0000 (15:53 +0100)] 
s3/locking: simplify reset_share_mode_entry()

Since 3df388b8f148c00a3ef331d393cea976fb9340b3 we're using the open global_id as
share_file_id in the share_mode_entry and we're also not changing it in
mark_share_mode_disconnected().

Iow, old_share_file_id is equal to new_share_file_id which and both are equal to
open_global_id.

Hence replace the two old_share_file_id and new_share_file_id arguments with the
single open_global_id argument.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 days agos3-winbindd: make sure we always have WINBINDD_CACHE_VERSION in winbindd_cache.tdb
Günther Deschner [Fri, 25 Jul 2025 20:50:08 +0000 (22:50 +0200)] 
s3-winbindd: make sure we always have WINBINDD_CACHE_VERSION in winbindd_cache.tdb

Guenther

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

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Dec  8 09:59:58 UTC 2025 on atb-devel-224

6 days agos3-winbindd: provide one wcache_open() function for all tdb opens
Günther Deschner [Fri, 25 Jul 2025 21:05:39 +0000 (23:05 +0200)] 
s3-winbindd: provide one wcache_open() function for all tdb opens

Guenther

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

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 days agos3-winbindd: make initialize_winbindd_cache() static
Günther Deschner [Fri, 25 Jul 2025 20:43:55 +0000 (22:43 +0200)] 
s3-winbindd: make initialize_winbindd_cache() static

Guenther

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

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 days agos3-winbind: make wcache_store_seqnum static
Günther Deschner [Fri, 1 Aug 2025 14:10:48 +0000 (16:10 +0200)] 
s3-winbind: make wcache_store_seqnum static

Guenther

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

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 days agos3-winbindd: Fix winbind NDR caching.
Günther Deschner [Thu, 17 Jul 2025 14:49:03 +0000 (16:49 +0200)] 
s3-winbindd: Fix winbind NDR caching.

All of winbindd's core caching relies on NDR entries. Those entries can
not be stored in winbindd_cache.tdb via wcache_store_ndr() as long as
there is no SEQNUM entry present in the cache.

Guenther

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

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 days agos3-selftest: add tests for winbindd_cache.tdb sanity
Günther Deschner [Fri, 25 Jul 2025 15:58:59 +0000 (17:58 +0200)] 
s3-selftest: add tests for winbindd_cache.tdb sanity

Guenther

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

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 days agoselftest: use common and simpler code to read config.h
Douglas Bagnall [Wed, 3 Dec 2025 02:07:03 +0000 (15:07 +1300)] 
selftest: use common and simpler code to read config.h

This also removes some garbage variables from these module's namespaces.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Thu Dec  4 23:54:18 UTC 2025 on atb-devel-224

10 days agos3:selftest:tests.py: remove unused imports
Douglas Bagnall [Wed, 3 Dec 2025 02:03:13 +0000 (15:03 +1300)] 
s3:selftest:tests.py: remove unused imports

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
10 days agovfs_ceph_new: proper failure-handling in chdir and getwd
Shachar Sharon [Wed, 3 Dec 2025 09:39:51 +0000 (11:39 +0200)] 
vfs_ceph_new: proper failure-handling in chdir and getwd

In case of an unlikely failure of SMB_VFS_HANDLE_GET_DATA macro, bail
out using 'goto' in order to ensure that START_PROFILE_X is properly
matched by END_PROFILE_X.

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
Reviewed-by: John Mulligan <jmulligan@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Thu Dec  4 10:02:55 UTC 2025 on atb-devel-224

11 days agoGeorgian translation for tools
Ekaterine Papava [Tue, 23 Sep 2025 12:44:35 +0000 (14:44 +0200)] 
Georgian translation for tools

Signed-off-by: Ekaterine Papava <papava.e@gtu.ge>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Dec  3 10:54:19 UTC 2025 on atb-devel-224

11 days agoRevert "ldb: User hexchars_upper from replace.h"
Andreas Schneider [Tue, 2 Dec 2025 13:02:08 +0000 (14:02 +0100)] 
Revert "ldb: User hexchars_upper from replace.h"

This reverts commit 542cf01bfe530a83dfbc8a606d182c0a5a622059.

We shouldn't put a hard requirement for libreplace in libldb! We do not need
libreplace on Linux until we start using hexbytes_upper.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
11 days agos3:libads: Set udp_preference_limit = 0 for MIT Kerberos
Andreas Schneider [Thu, 27 Nov 2025 10:04:30 +0000 (11:04 +0100)] 
s3:libads: Set udp_preference_limit = 0 for MIT Kerberos

This option enable TCP connection before UDP, when sending a message to
the KDC.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 days agos3:libads: Set a request timeout for Kerberos requests
Andreas Schneider [Wed, 19 Nov 2025 13:42:24 +0000 (14:42 +0100)] 
s3:libads: Set a request timeout for Kerberos requests

Without this, libkrb5 can wait indefinitely after creating a TCP
connection. This means winbind is stuck forever till it is restarted.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 days agowscript: Fix double quoting for USING_SYSTEM_MITKRB5
Andreas Schneider [Wed, 19 Nov 2025 13:51:31 +0000 (14:51 +0100)] 
wscript: Fix double quoting for USING_SYSTEM_MITKRB5

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2 weeks agos4:selftest: move tests that want to be last, last
Douglas Bagnall [Thu, 27 Nov 2025 02:42:22 +0000 (15:42 +1300)] 
s4:selftest: move tests that want to be last, last

These tests want to run last because they do a dbcheck to ensure no
earlier test caused corruption. There are also some tests that want to
run second last.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Thu Nov 27 22:40:02 UTC 2025 on atb-devel-224

2 weeks agosmbd: reshuffle requested/granted lease level logic of Directory Leases
Ralph Boehme [Fri, 10 Oct 2025 13:24:31 +0000 (15:24 +0200)] 
smbd: reshuffle requested/granted lease level logic of Directory Leases

This moves the logic to adjust the lease levels for Directory Leases to the same
place where we do it for other cases.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Nov 27 10:04:47 UTC 2025 on atb-devel-224

2 weeks agosmbd: distinguish "no record" from "bad record" in smbXsrv_open_global_lookup()
Ralph Boehme [Sat, 18 Oct 2025 10:45:49 +0000 (12:45 +0200)] 
smbd: distinguish "no record" from "bad record" in smbXsrv_open_global_lookup()

Allows callers to distinguish between "no record" and "bad record" when
smbXsrv_open_global_parse_record() fails.

No change in behaviour, but might be useful in the future.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 weeks agonet/serverid: initialize state->open_db
Ralph Boehme [Mon, 24 Nov 2025 07:25:16 +0000 (08:25 +0100)] 
net/serverid: initialize state->open_db

Fixes a crash that happens when smbXsrv_open_global.tdb contains only replay
records.

  #0  0x00007ffff70a718a in dbwrap_exists (db=0x0, key=...) at ../../lib/dbwrap/dbwrap.c:347
  #1  0x00000000002dc7f2 in wipedbs_traverse_replay_records (rec=0x7fffffffd180, wipedbs_state=0x362d70)
      at ../../source3/utils/net_serverid.c:710
  #2  0x00007ffff70aa932 in db_rbt_traverse_internal (db=0x37e940, f=0x2dc749 <wipedbs_traverse_replay_records>, private_data=0x362d70,
      count=0x7fffffffd220, rw=false) at ../../lib/dbwrap/dbwrap_rbt.c:472
  #3  0x00007ffff70aaa0e in db_rbt_traverse_read (db=0x37e940, f=0x2dc749 <wipedbs_traverse_replay_records>, private_data=0x362d70)
      at ../../lib/dbwrap/dbwrap_rbt.c:499
  #4  0x00007ffff70a7433 in dbwrap_traverse_read (db=0x37e940, f=0x2dc749 <wipedbs_traverse_replay_records>, private_data=0x362d70, count=0x0)
      at ../../lib/dbwrap/dbwrap.c:437
  #5  0x00000000002dcedf in net_serverid_wipedbs (c=0x34c0d0, argc=0, argv=0x365380) at ../../source3/utils/net_serverid.c:840
  #6  0x00000000002c9675 in net_run_function (c=0x34c0d0, argc=1, argv=0x365378, whoami=0x258c96 "net tdb smbXsrv", table=0x7fffffffd360)
      at ../../source3/utils/net_util.c:451
  #7  0x00000000002e6e2c in net_tdb_smbXsrv (c=0x34c0d0, argc=1, argv=0x365378) at ../../source3/utils/net_tdb.c:105
  #8  0x00000000002c9675 in net_run_function (c=0x34c0d0, argc=2, argv=0x365370, whoami=0x258d45 "net tdb", table=0x7fffffffd440)
      at ../../source3/utils/net_util.c:451
  #9  0x00000000002e6f04 in net_tdb (c=0x34c0d0, argc=2, argv=0x365370) at ../../source3/utils/net_tdb.c:128
  #10 0x00000000002c9675 in net_run_function (c=0x34c0d0, argc=3, argv=0x365368, whoami=0x22ca4b "net", table=0x323640 <net_func>)
      at ../../source3/utils/net_util.c:451
  #11 0x0000000000277227 in main (argc=6, argv=0x7fffffffe2a8)
      at ../../source3/utils/net.c:1481

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 weeks agosmbXsrvdump: catch exception from unparsable records
Ralph Boehme [Sat, 18 Oct 2025 14:34:00 +0000 (16:34 +0200)] 
smbXsrvdump: catch exception from unparsable records

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 weeks agosmbtorture: fix a test rundown
Ralph Boehme [Thu, 9 Oct 2025 17:31:33 +0000 (19:31 +0200)] 
smbtorture: fix a test rundown

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 weeks agovfs_gpfs: Fix CID 1666430 Control flow issues (DEADCODE)
Anoop C S [Fri, 3 Oct 2025 05:57:29 +0000 (11:27 +0530)] 
vfs_gpfs: Fix CID 1666430 Control flow issues (DEADCODE)

Restore the saved errno properly and record it with vfs_aio_state once
vfs_gpfs_get_winattrs_helper() returns for async code path.

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Nov 26 16:48:00 UTC 2025 on atb-devel-224

2 weeks agovfs_ceph_new: use vfs_ceph_iget/vfs_ceph_iput in vfs_ceph_disk_free
Shweta Sodani [Thu, 20 Nov 2025 10:44:26 +0000 (16:14 +0530)] 
vfs_ceph_new: use vfs_ceph_iget/vfs_ceph_iput in vfs_ceph_disk_free

Currently inode of root is using to report stats that works fine for share of root volume.
But for subvolume share it reports incorrect information. Hence choose the inode based on path,
so that it will report stats information correctly.

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

Signed-off-by: Shweta Sodani <ssodani@redhat.com>
Reviewed-by: Xavi Hernandez <xhernandez@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): Mon Nov 24 18:03:08 UTC 2025 on atb-devel-224

2 weeks agos4:dsdb: Do not declare cm_print_error()
Andreas Schneider [Fri, 21 Nov 2025 14:33:32 +0000 (15:33 +0100)] 
s4:dsdb: Do not declare cm_print_error()

This is part of the cmocka.h header file.

Signed-off-by: Andreas Schneider <asn@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 Nov 24 11:28:08 UTC 2025 on atb-devel-224

2 weeks agolibcli:ldap: Do not declare cm_print_error()
Andreas Schneider [Fri, 21 Nov 2025 14:31:39 +0000 (15:31 +0100)] 
libcli:ldap: Do not declare cm_print_error()

This is part of the cmocka.h header file.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
3 weeks agotdb: Fix parse_hex during `tdbtool storehex`
Lin Liu [Tue, 18 Nov 2025 05:50:55 +0000 (05:50 +0000)] 
tdb: Fix parse_hex during `tdbtool storehex`

Fixes: fd0561279
During `tdbtool storehex`, tdbtool check whether the input
string in hex format.

However, during the check, the index is never moved forward,
resulting in checking beyond the valid input string.

This patch fix the issue by checking the valid string

Signed-off-by: Lin Liu <lin.liu01@citrix.com>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Jennifer Sutton <jsutton@samba.org>
Autobuild-Date(master): Thu Nov 20 22:29:03 UTC 2025 on atb-devel-224

3 weeks agoselftest: move knownfail.d/krb5-no-dollar to expectedfail.d
Douglas Bagnall [Wed, 19 Nov 2025 22:33:30 +0000 (11:33 +1300)] 
selftest: move knownfail.d/krb5-no-dollar to expectedfail.d

If these fail to fail, there is a problem.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
3 weeks agoautobuild: run ntvfs krb5 tests on MIT build
Douglas Bagnall [Sat, 15 Nov 2025 03:56:49 +0000 (16:56 +1300)] 
autobuild: run ntvfs krb5 tests on MIT build

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
3 weeks agos4:kdc: avoid reusing a variable name
Douglas Bagnall [Wed, 12 Nov 2025 03:56:17 +0000 (16:56 +1300)] 
s4:kdc: avoid reusing a variable name

fallback_principal was used for two different uses: a copy of the
original principal from which to derive values, and a new principal
which has the '$' appended on the account name. We might as well be
clear and an optimising compiler won't see the difference.

Whether we actually need a temporary principal as opposed to using the
one that was passed in is a separate question.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
3 weeks agos4:kdc: do not match principal + '$' if smb.conf says not to
Douglas Bagnall [Wed, 12 Nov 2025 03:22:05 +0000 (16:22 +1300)] 
s4:kdc: do not match principal + '$' if smb.conf says not to

With this patch we honour

 kdc name match implicit dollar without canonicalization = no

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
3 weeks agos4:kdc:principal lookup will soon succeed on ad_dc_ntvfs
Douglas Bagnall [Thu, 13 Nov 2025 23:46:44 +0000 (12:46 +1300)] 
s4:kdc:principal lookup will soon succeed on ad_dc_ntvfs

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
3 weeks agos4/torture:kdc-canon understands no-implicit-dollar setting
Douglas Bagnall [Wed, 5 Nov 2025 03:14:12 +0000 (16:14 +1300)] 
s4/torture:kdc-canon understands no-implicit-dollar setting

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
3 weeks agopytests: krb5 raw tests use TestCase.get_server_param()
Douglas Bagnall [Thu, 13 Nov 2025 03:44:33 +0000 (16:44 +1300)] 
pytests: krb5 raw tests use TestCase.get_server_param()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
3 weeks agopytest: krb5 alias tests: expect no machine$ match on ad_dc_ntvfs
Douglas Bagnall [Thu, 13 Nov 2025 03:37:09 +0000 (16:37 +1300)] 
pytest: krb5 alias tests: expect no machine$ match on ad_dc_ntvfs

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
3 weeks agopytest:krb5: ms-kile-client tests notice lack of dollar matching
Douglas Bagnall [Fri, 14 Nov 2025 07:05:57 +0000 (20:05 +1300)] 
pytest:krb5: ms-kile-client tests notice lack of dollar matching

In the ad_dc_ntvfs environment.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
3 weeks agopytest: krb5 tests remember implicit dollar option
Douglas Bagnall [Fri, 14 Nov 2025 07:10:01 +0000 (20:10 +1300)] 
pytest: krb5 tests remember implicit dollar option

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
3 weeks agopytests: add TestCase.get_server_param() method
Douglas Bagnall [Thu, 30 Oct 2025 20:27:27 +0000 (09:27 +1300)] 
pytests: add TestCase.get_server_param() method

This makes it easier to get a loadparm value from the server smb.conf
(rather than the client smb.conf), so you can alter test behaviour
accordingly.

The class._server_lp attribute is lazily loaded when first needed.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
3 weeks agopytest:krb5: print error names on error
Douglas Bagnall [Thu, 6 Nov 2025 04:37:40 +0000 (17:37 +1300)] 
pytest:krb5: print error names on error

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
3 weeks agopytest:krb5: errcode errors include names
Douglas Bagnall [Tue, 4 Nov 2025 23:50:31 +0000 (12:50 +1300)] 
pytest:krb5: errcode errors include names

Before:

> AssertionError: 6 not found in (20,)

After:

> AssertionError: 6 not found in (20,) : KDC_ERR_C_PRINCIPAL_UNKNOWN not in ['KDC_ERR_TGT_REVOKED']

Useful for people who don't know the codes off by heart.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
3 weeks agopytests: rename KRB_ERR_TKT_NYV as KDC_ERR_TKT_NYV
Douglas Bagnall [Thu, 13 Nov 2025 22:30:10 +0000 (11:30 +1300)] 
pytests: rename KRB_ERR_TKT_NYV as KDC_ERR_TKT_NYV

to be consistent with all the others.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
3 weeks agotests: run krb5.kdc tests on ad_dc_ntvfs without implicit dollar match
Douglas Bagnall [Wed, 12 Nov 2025 02:38:24 +0000 (15:38 +1300)] 
tests: run krb5.kdc tests on ad_dc_ntvfs without implicit dollar match

that is, with "kdc name match with implicit dollar = no"

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
3 weeks agoloadparm: add "kdc name match implicit dollar without canonicalization"
Douglas Bagnall [Wed, 12 Nov 2025 03:29:13 +0000 (16:29 +1300)] 
loadparm: add "kdc name match implicit dollar without canonicalization"

This does nothing yet.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
3 weeks agos4:kdc: allocate fallback realm later, closer to use
Douglas Bagnall [Wed, 12 Nov 2025 02:56:43 +0000 (15:56 +1300)] 
s4:kdc: allocate fallback realm later, closer to use

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
3 weeks agos4:kdc: do not fallback to "$$" if user is "$"
Douglas Bagnall [Wed, 12 Nov 2025 22:35:50 +0000 (11:35 +1300)] 
s4:kdc: do not fallback to "$$" if user is "$"

or from "" to "$", though I am not sure it is easy to get this far
with an empty account name.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
3 weeks agos4:kdc: flatten samba_kdc_lookup_client dollar fallback
Douglas Bagnall [Thu, 2 Oct 2025 03:58:42 +0000 (16:58 +1300)] 
s4:kdc: flatten samba_kdc_lookup_client dollar fallback

There is a single linear successful path through the 'num_comp == 1'
and various NULL checks, but it is written in a branchy fashion as if
you could skip some portion.

git diff -b is probably useful.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
3 weeks agos4:kdc: avoid a leak on error
Douglas Bagnall [Wed, 12 Nov 2025 02:59:18 +0000 (15:59 +1300)] 
s4:kdc: avoid a leak on error

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
3 weeks agos4:kdc: improve a comment
Douglas Bagnall [Thu, 30 Oct 2025 22:40:11 +0000 (11:40 +1300)] 
s4:kdc: improve a comment

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
3 weeks agos4:torture:kdc-canon: test each combination only once
Douglas Bagnall [Thu, 6 Nov 2025 03:08:30 +0000 (16:08 +1300)] 
s4:torture:kdc-canon: test each combination only once

These tests exhaustively combinations of binary options. With
492d9f083dc23aff2c1fa12e21765861df1c1b38 ("s4:torture: Remove netbios
realm and lowercase realm tests") we removed some test flags, reducing
the number of flags to 8, so there are 256 combinations. But we test
every bit combination of TEST_ALL which was 10 bits (0x3ff), and each
test was run 4 times ignoring the 0x4 and 0x10 bits.

So we compact the flags into 8 bits and run each one once.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
3 weeks agopytest: test auth.user_session with principals
Douglas Bagnall [Thu, 13 Nov 2025 01:17:54 +0000 (14:17 +1300)] 
pytest: test auth.user_session with principals

This tests authsam_get_session_info_principal() which tests
sam_get_results_principal() which tests crack_user_principal_name().

sam_get_results_principal() is also used in samba_kdc_lookup_client(),
and we are sort of testing on behalf of that.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
3 weeks agos4:cracknames: initialise a string variable
Douglas Bagnall [Fri, 3 Oct 2025 01:27:18 +0000 (14:27 +1300)] 
s4:cracknames: initialise a string variable

because later we go

ret = krb5_unparse_name_flags([...],
      &unparsed_name_short);
if (ret) {
free(unparsed_name_short);
return WERR_NOT_ENOUGH_MEMORY;
}

which is bad if a krb5_unparse_name_flags() errors without setting
unparsed_name_short -- not that I see that happening in MIT or Heimdal.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
3 weeks agodocs-xml:smb.conf: fix a sentence
Douglas Bagnall [Fri, 19 Sep 2025 05:15:47 +0000 (17:15 +1200)] 
docs-xml:smb.conf: fix a sentence

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
3 weeks agos3:ntlm_auth: Fix typo in error message (protools -> protocols)
Frediano Ziglio [Fri, 14 Nov 2025 14:11:04 +0000 (14:11 +0000)] 
s3:ntlm_auth: Fix typo in error message (protools -> protocols)

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Nov 19 19:38:52 UTC 2025 on atb-devel-224

3 weeks agoctdb: Fix ctdb startup with inconsistent cluster lock settings
Volker Lendecke [Tue, 18 Nov 2025 09:31:01 +0000 (10:31 +0100)] 
ctdb: Fix ctdb startup with inconsistent cluster lock settings

ctdb_shutdown_sequence() normally exits. When we end up here, it is
because we have received a reclock callback twice. We can't handle
that, we have already removed "state", which would be referenced deep
in run_start_recovery_event() returning here another time.

The bug is triggered since b84fbd7b3fedc998 introduced a nested event
loop, making ctdb_shutdown_sequence() return into
start_recovery_reclock_callback() due to multiple reclock checks being
triggered somehow (not sure exactly how, but we should not crash under
any circumstance).

Reproducer: Run one ctdb daemon with cluster lock set, try to start
another one without cluster lock set.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=15950
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Wed Nov 19 03:04:13 UTC 2025 on atb-devel-224

3 weeks agomdssvc: support a wider range of years [0000,9999] in $time.iso
Ralph Boehme [Thu, 13 Nov 2025 17:42:41 +0000 (18:42 +0100)] 
mdssvc: support a wider range of years [0000,9999] in $time.iso

Most importantly use strtoll to allow negative numbers and use a filed width
with %Y in strftime() to parse years with less then four digits.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Wed Nov 19 01:59:34 UTC 2025 on atb-devel-224

3 weeks agotests/krb5: Construct signed_attrs correctly
Jennifer Sutton [Tue, 18 Nov 2025 03:42:03 +0000 (16:42 +1300)] 
tests/krb5: Construct signed_attrs correctly

signed_attrs is supposed to be a list of key‐value pairs, but we forgot the
values. Because the field was not constructed correctly, the pyasn1 encoder
simply stripped it out.

Also properly separate the signature algorithm and digest algorithms.

Signed-off-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Wed Nov 19 00:32:31 UTC 2025 on atb-devel-224

3 weeks agotests/krb5: Add TD_CMS_DIGEST_ALGORITHMS constant
Jennifer Sutton [Tue, 18 Nov 2025 03:36:31 +0000 (16:36 +1300)] 
tests/krb5: Add TD_CMS_DIGEST_ALGORITHMS constant

Signed-off-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
3 weeks agowscript: Fix help text spelling
Jennifer Sutton [Tue, 18 Nov 2025 03:33:31 +0000 (16:33 +1300)] 
wscript: Fix help text spelling

Signed-off-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
3 weeks agopython:tests: Correct test class name
Jennifer Sutton [Wed, 12 Nov 2025 01:25:33 +0000 (14:25 +1300)] 
python:tests: Correct test class name

Signed-off-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
3 weeks agovfs_fruit: psd->dacl can be NULL, use orig_num_aces
Ralph Boehme [Fri, 14 Nov 2025 13:55:12 +0000 (14:55 +0100)] 
vfs_fruit: psd->dacl can be NULL, use orig_num_aces

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Nov 18 10:13:44 UTC 2025 on atb-devel-224

3 weeks agovfs:streams_xattr: Allow VFS_OPEN_HOW_RESOLVE_NO_XDEV
Samuel Cabrero [Thu, 9 Oct 2025 11:05:16 +0000 (13:05 +0200)] 
vfs:streams_xattr: Allow VFS_OPEN_HOW_RESOLVE_NO_XDEV

The open function returns a fake fd. Extended attributes will be stored by
vfs_xattr_tdb or vfs_default.

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Samuel Cabrero <scabrero@samba.org>
Autobuild-Date(master): Tue Nov 18 09:08:38 UTC 2025 on atb-devel-224

3 weeks agovfs:fruit: Allow RESOLVE_NO_XDEV flag
Samuel Cabrero [Thu, 9 Oct 2025 10:59:59 +0000 (12:59 +0200)] 
vfs:fruit: Allow RESOLVE_NO_XDEV flag

For stream opens, it returns a fake fd. The streams will be stored by
vfs_streams_depot or vfs_streams_xattr.

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 weeks agovfs:streams_depot: Allow VFS_OPEN_HOW_RESOLVE_NO_XDEV flag
Samuel Cabrero [Thu, 9 Oct 2025 10:52:11 +0000 (12:52 +0200)] 
vfs:streams_depot: Allow VFS_OPEN_HOW_RESOLVE_NO_XDEV flag

The flag is passed down the modules stack.

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 weeks agovfs:shadow_copy2: Allow RESOLVE_NO_XDEV flag
Samuel Cabrero [Fri, 2 May 2025 11:21:52 +0000 (13:21 +0200)] 
vfs:shadow_copy2: Allow RESOLVE_NO_XDEV flag

This module updates the path and calls the next VFS module.

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 weeks agovfs:glusterfs: Allow VFS_OPEN_HOW_RESOLVE_NO_XDEV
Samuel Cabrero [Thu, 9 Oct 2025 10:30:17 +0000 (12:30 +0200)] 
vfs:glusterfs: Allow VFS_OPEN_HOW_RESOLVE_NO_XDEV

Don't return ENOSYS if the flag is set. It will be ignored as does not make
sense in this module.

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 weeks agovfs:ceph_new: Allow VFS_OPEN_HOW_RESOLVE_NO_XDEV flag
Samuel Cabrero [Tue, 30 Sep 2025 08:32:36 +0000 (10:32 +0200)] 
vfs:ceph_new: Allow VFS_OPEN_HOW_RESOLVE_NO_XDEV flag

Don't return ENOSYS if the flag is set. It will be ignored,
does not make sense in a ceph filesystem.

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 weeks agovfs:ceph: Allow VFS_OPEN_HOW_RESOLVE_NO_XDEV flag
Samuel Cabrero [Fri, 2 May 2025 10:11:01 +0000 (12:11 +0200)] 
vfs:ceph: Allow VFS_OPEN_HOW_RESOLVE_NO_XDEV flag

Don't return ENOSYS if the flag is set. It will be ignored,
does not make sense in a ceph virtual filesystem.

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 weeks agovfs:aio_pthread: Handle VFS_OPEN_HOW_RESOLVE_NO_XDEV flag
Samuel Cabrero [Fri, 2 May 2025 09:57:30 +0000 (11:57 +0200)] 
vfs:aio_pthread: Handle VFS_OPEN_HOW_RESOLVE_NO_XDEV flag

This module uses openat() instead of openat2() so the flag won't be used and
automounts might not be triggered.

Disable flag usage for subsequent opens and return an error to callers to warn
the user and retry without the flag.

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 weeks agosmbd: Fix crossing direct automounter mount points
Samuel Cabrero [Wed, 8 Oct 2025 15:09:22 +0000 (17:09 +0200)] 
smbd: Fix crossing direct automounter mount points

The workaround implemented in commit ac7a16f9cc4bd97ef546d1b7b02605991000d0f9
to trigger automounts does not work for direct automounts (either with
systemd-automount or autofs daemon).

In direct automounts the mount point is a real directory instead of a "ghost"
directory so when turning the O_PATH handle into a real one through
/proc/self/fd/<fdnum> openat() does not return ENOENT, it returs a fd referring
to the mount point without triggering the mount.

To trigger the mount first we have to know when we are crossing mount points
by using the RESOLVE_NO_XDEV flag in open_how.resolve, then we can check with
fstatfs() the .f_type and fallback to a path-based open for automounts or
retry without RESOLVE_NO_XDEV otherwise.

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 weeks agosmbd: Refactor reopen_from_fsp(), factor out pathref based
Samuel Cabrero [Wed, 8 Oct 2025 12:17:27 +0000 (14:17 +0200)] 
smbd: Refactor reopen_from_fsp(), factor out pathref based

Best viewed ignoring white space changes

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 weeks agosmbd: Refactor reopen_from_fsp(), factor out automounter mountpoint check
Samuel Cabrero [Wed, 8 Oct 2025 11:53:14 +0000 (13:53 +0200)] 
smbd: Refactor reopen_from_fsp(), factor out automounter mountpoint check

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 weeks agosmbd: Refactor reopen_from_fsp(), factor out name based reopen
Samuel Cabrero [Wed, 8 Oct 2025 11:18:44 +0000 (13:18 +0200)] 
smbd: Refactor reopen_from_fsp(), factor out name based reopen

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
3 weeks agovfs: Pass the RESOLVE_NO_XDEV from upper layers to openat2() syscall
Samuel Cabrero [Fri, 14 Feb 2025 16:14:59 +0000 (17:14 +0100)] 
vfs: Pass the RESOLVE_NO_XDEV from upper layers to openat2() syscall

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>