]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
4 months agos3:winbindd fix race condition in terminate_child
Gary Lockyer [Tue, 6 Jan 2026 21:23:33 +0000 (10:23 +1300)] 
s3:winbindd fix race condition in terminate_child

Fixes:

winbindd[306061]:   Bad talloc magic value - unknown value
winbindd[306061]:   =========================================================
winbindd[306061]:   INTERNAL ERROR: Bad talloc magic value - unknown value in
                    winbindd () () pid

A race condition in source3/windbindd/winbindd_util.c::terminate_child
between the child socket closing, and the destructor de-registering the
child socket from epoll.

If the socket closes before it is de-registered from epoll, the event
is added to the epoll rdllink and will be retrieved when epoll_wait
is next called.  However monitor_fde has been deallocated and we get the
observed failure.

Moving the TALLOC_FREE before the kill ensures that the child socket has been
de-registered from epoll before it closes.

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

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jan 13 14:50:20 UTC 2026 on atb-devel-224

4 months agoauth/ntlmssp: Zero memory in ntlmssp_client.c
Pavel Filipenský [Tue, 9 Dec 2025 10:25:05 +0000 (11:25 +0100)] 
auth/ntlmssp: Zero memory in ntlmssp_client.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): Tue Jan 13 12:34:02 UTC 2026 on atb-devel-224

4 months agoauth/ntlmssp: Add missing memory allocation checks is ntlmssp_client.c
Pavel Filipenský [Tue, 9 Dec 2025 10:27:07 +0000 (11:27 +0100)] 
auth/ntlmssp: Add missing memory allocation checks is ntlmssp_client.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 months agoauth/ntlmssp: Zero sensitive memory in gensec_ntlmssp.c
Pavel Filipenský [Thu, 6 Nov 2025 11:38:39 +0000 (12:38 +0100)] 
auth/ntlmssp: Zero sensitive memory in gensec_ntlmssp.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 months agosource3/auth: Zero memory in auth_util.c
Pavel Filipenský [Sun, 23 Nov 2025 09:52:57 +0000 (10:52 +0100)] 
source3/auth: Zero memory in auth_util.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 months agoauth/credentials: Zero memory in credentials_ntlm.c
Pavel Filipenský [Thu, 6 Nov 2025 16:09:42 +0000 (17:09 +0100)] 
auth/credentials: Zero memory in credentials_ntlm.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 months agoauth/kerberos: Zero sensitive memory in gssapi_pac.c
Pavel Filipenský [Thu, 4 Dec 2025 12:03:58 +0000 (13:03 +0100)] 
auth/kerberos: Zero sensitive memory in gssapi_pac.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 months agoauth/kerberos: Check memory allocation in gssapi_get_session_key()
Pavel Filipenský [Thu, 4 Dec 2025 12:02:19 +0000 (13:02 +0100)] 
auth/kerberos: Check memory allocation in gssapi_get_session_key()

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 months agoauth: Fix trailing whitespaces in gssapi_pac.c
Pavel Filipenský [Thu, 6 Nov 2025 14:05:04 +0000 (15:05 +0100)] 
auth: Fix trailing whitespaces in gssapi_pac.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 months agolib/krb5_wrap: Check memory allocation in smb_krb5_get_smb_session_key()
Pavel Filipenský [Thu, 4 Dec 2025 11:50:29 +0000 (12:50 +0100)] 
lib/krb5_wrap: Check memory allocation in smb_krb5_get_smb_session_key()

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 months agolib/krb5_wrap: Zero sensitive memory in krb5_samba.c
Pavel Filipenský [Thu, 4 Dec 2025 11:49:32 +0000 (12:49 +0100)] 
lib/krb5_wrap: Zero sensitive memory in krb5_samba.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 months agos4: Fix trailing whitespaces in sesssetup.c
Pavel Filipenský [Thu, 6 Nov 2025 10:59:59 +0000 (11:59 +0100)] 
s4: Fix trailing whitespaces in sesssetup.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 months agoauth: Fix typo "pass-though" -> "pass-through"
Pavel Filipenský [Thu, 6 Nov 2025 20:44:56 +0000 (21:44 +0100)] 
auth: Fix typo "pass-though" ->  "pass-through"

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 months agolibcli:auth: Fix trailing whitespaces in ntlm_check.c
Pavel Filipenský [Thu, 6 Nov 2025 20:44:56 +0000 (21:44 +0100)] 
libcli:auth: Fix trailing whitespaces in ntlm_check.c

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 months agos3:lib/util_sock: allow {before,after}_connect hooks to be passed to open_socket_out_...
Stefan Metzmacher [Thu, 18 Dec 2025 11:47:15 +0000 (12:47 +0100)] 
s3:lib/util_sock: allow {before,after}_connect hooks to be passed to open_socket_out_send()

async_connect_send() already has these hooks now open_socket_out_send()
callers can pass them through.

This will be useful for IPPROTO_SMBDIRECT sockets to setup things
between the socket() and connect() syscalls.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Jan 13 08:13:04 UTC 2026 on atb-devel-224

4 months agolib/async_req: let async_connect_send() pass the fd to {before,after}_connect hooks
Stefan Metzmacher [Thu, 18 Dec 2025 11:47:15 +0000 (12:47 +0100)] 
lib/async_req: let async_connect_send() pass the fd to {before,after}_connect hooks

This will be useful for IPPROTO_SMBDIRECT sockets to setup things
between the socket() and connect() syscalls.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 months agolib: Remove [set|drop]_effective_capability and enum smbd_capability
Volker Lendecke [Fri, 9 Jan 2026 09:26:29 +0000 (10:26 +0100)] 
lib: Remove [set|drop]_effective_capability and enum smbd_capability

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Jan 12 10:39:38 UTC 2026 on atb-devel-224

4 months agolib: Replace calls to [set|drop]_effective_capability
Volker Lendecke [Fri, 9 Jan 2026 09:24:32 +0000 (10:24 +0100)] 
lib: Replace calls to [set|drop]_effective_capability

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 months agolib: Add capability-specific functions
Volker Lendecke [Fri, 9 Jan 2026 09:15:25 +0000 (10:15 +0100)] 
lib: Add capability-specific functions

This makes the one-attempt logic for dac_override simpler to
understand.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 months agolib: Remove LEASE_CAPABILITY
Volker Lendecke [Thu, 8 Jan 2026 13:53:39 +0000 (14:53 +0100)] 
lib: Remove LEASE_CAPABILITY

This was only used via vfs_gpfs, and that removed its use in 2020.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 months agolib: Remove KERNEL_OPLOCK_CAPABILITY
Volker Lendecke [Thu, 8 Jan 2026 13:48:32 +0000 (14:48 +0100)] 
lib: Remove KERNEL_OPLOCK_CAPABILITY

This was only used in the IRIX oplock code, which was removed in 2018.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 months agolib: Remove explicitly dropping capabilities before exec
Volker Lendecke [Fri, 9 Jan 2026 11:01:13 +0000 (12:01 +0100)] 
lib: Remove explicitly dropping capabilities before exec

These calls are not necessary: When setting capabilities, we always
remove them from the inheritable set, so they will inevitably be
removed at exec-time. Also, these groups of calls were never updated
for DAC_OVERRIDE, which would have posed a pretty severe problem.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 months agovfs_ceph_new: Improve log entries in vfs_cephfs_load_lib()
Anoop C S [Thu, 8 Jan 2026 08:03:32 +0000 (13:33 +0530)] 
vfs_ceph_new: Improve log entries in vfs_cephfs_load_lib()

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Shweta Sodani <ssodani@redhat.com>
Reviewed-by: John Mulligan <jmulligan@redhat.com>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Thu Jan  8 14:33:36 UTC 2026 on atb-devel-224

4 months agovfs_ceph_new: Add explicit log entry for libcephfs proxy status
Anoop C S [Thu, 8 Jan 2026 06:18:53 +0000 (11:48 +0530)] 
vfs_ceph_new: Add explicit log entry for libcephfs proxy status

Other than the loadparm dump, the logs did not indicate whether the
libcephfs proxy was in use. Add an explicit log entry to make its
status clear.

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Shweta Sodani <ssodani@redhat.com>
Reviewed-by: John Mulligan <jmulligan@redhat.com>
4 months agonsswitch/libwbclient: Zero memory in libwbclient
Pavel Filipenský [Mon, 8 Dec 2025 15:09:53 +0000 (16:09 +0100)] 
nsswitch/libwbclient: Zero memory in libwbclient

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Jan  8 12:59:02 UTC 2026 on atb-devel-224

4 months agorelease.sh: also replace "y acute" character with html entity
Björn Jacke [Wed, 7 Jan 2026 14:38:28 +0000 (15:38 +0100)] 
release.sh: also replace "y acute" character with html entity

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Jule Anger <janger@samba.org>
Autobuild-User(master): Björn Jacke <bjacke@samba.org>
Autobuild-Date(master): Wed Jan  7 15:58:11 UTC 2026 on atb-devel-224

4 months agolib: Move a few smb-related constant #defines to common code
Volker Lendecke [Mon, 15 Sep 2025 14:04:55 +0000 (07:04 -0700)] 
lib: Move a few smb-related constant #defines to common code

No need to have two copies in source3 and source4

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): Wed Jan  7 11:00:48 UTC 2026 on atb-devel-224

4 months agosmbd: Simplify vfs_valid_pwrite_range()
Volker Lendecke [Wed, 27 Aug 2025 15:26:05 +0000 (17:26 +0200)] 
smbd: Simplify vfs_valid_pwrite_range()

Easier to read for me.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agosmbd: Avoid an else in vfs_valid_pwrite_range()
Volker Lendecke [Wed, 27 Aug 2025 15:22:53 +0000 (17:22 +0200)] 
smbd: Avoid an else in vfs_valid_pwrite_range()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agosmbd: Remove an unneeded return;
Volker Lendecke [Thu, 11 Sep 2025 12:06:49 +0000 (14:06 +0200)] 
smbd: Remove an unneeded return;

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agosmbd: Fix a typo
Volker Lendecke [Thu, 11 Sep 2025 12:06:03 +0000 (14:06 +0200)] 
smbd: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agovfs_commit: Do initial eof calculation on demand
Volker Lendecke [Sun, 19 Oct 2025 09:46:03 +0000 (11:46 +0200)] 
vfs_commit: Do initial eof calculation on demand

Avoid yet another fstat call at open time, we might never write to the
file

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agovfs_commit: Some README.Coding changes
Volker Lendecke [Sun, 19 Oct 2025 09:36:17 +0000 (11:36 +0200)] 
vfs_commit: Some README.Coding changes

Reduce indentation with early returns

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agovfs_commit: Reduce indentation with early returns
Volker Lendecke [Sun, 19 Oct 2025 09:33:03 +0000 (11:33 +0200)] 
vfs_commit: Reduce indentation with early returns

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agovfs_commit: Make dbytes and dthresh size_t
Volker Lendecke [Sun, 19 Oct 2025 09:28:21 +0000 (11:28 +0200)] 
vfs_commit: Make dbytes and dthresh size_t

Those can never go negative, use "%zu" as printf modifier

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agolibrpc: Use a direct struct initialization
Volker Lendecke [Wed, 24 Dec 2025 09:30:09 +0000 (10:30 +0100)] 
librpc: Use a direct struct initialization

Don't reference data_blob_null without need

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agolibndr: Fix two small error path memleaks
Volker Lendecke [Wed, 24 Dec 2025 09:56:17 +0000 (10:56 +0100)] 
libndr: Fix two small error path memleaks

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agolibcli: Initialize a variable at declaration time
Volker Lendecke [Wed, 24 Dec 2025 09:52:18 +0000 (10:52 +0100)] 
libcli: Initialize a variable at declaration time

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agolib: Remove unnecessary assignments
Volker Lendecke [Wed, 24 Dec 2025 09:58:52 +0000 (10:58 +0100)] 
lib: Remove unnecessary assignments

data_blob_free() already NULLs out its argument

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agolibrpc: Slightly simplify dcerpc_binding_build_tower()
Volker Lendecke [Wed, 24 Dec 2025 10:01:36 +0000 (11:01 +0100)] 
librpc: Slightly simplify dcerpc_binding_build_tower()

Use the implicit NULLing out of the other struct elements

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agolib: Don't call a function to initialize an empty DATA_BLOB
Volker Lendecke [Wed, 24 Dec 2025 08:41:02 +0000 (09:41 +0100)] 
lib: Don't call a function to initialize an empty DATA_BLOB

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agosmbd: Simplify callers of messaging_send()
Volker Lendecke [Tue, 30 Dec 2025 09:30:24 +0000 (10:30 +0100)] 
smbd: Simplify callers of messaging_send()

It deals fine with a NULL argument

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agolibrpc: Directly initialize variables
Volker Lendecke [Wed, 24 Dec 2025 10:16:46 +0000 (11:16 +0100)] 
librpc: Directly initialize variables

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agosmbd: Make arguments to open_file_ntcreate a bit easier to read
Volker Lendecke [Mon, 27 Oct 2025 12:50:03 +0000 (13:50 +0100)] 
smbd: Make arguments to open_file_ntcreate a bit easier to read

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agolib: Reduce indentation with an early return
Volker Lendecke [Thu, 13 Nov 2025 08:32:10 +0000 (09:32 +0100)] 
lib: Reduce indentation with an early return

Review with "git show -w"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agolib: Remove some code #ifdef'ed out for more than 20 years
Volker Lendecke [Thu, 13 Nov 2025 08:23:33 +0000 (09:23 +0100)] 
lib: Remove some code #ifdef'ed out for more than 20 years

We have a git history if someone wants to dig this up

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agosmbd: Use a direct struct initialization
Volker Lendecke [Sun, 23 Nov 2025 06:41:16 +0000 (07:41 +0100)] 
smbd: Use a direct struct initialization

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agosmbd: Reduce indentation
Volker Lendecke [Tue, 11 Nov 2025 10:24:56 +0000 (11:24 +0100)] 
smbd: Reduce indentation

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agosmb: Modernize a few DEBUGs
Volker Lendecke [Tue, 11 Nov 2025 06:20:20 +0000 (07:20 +0100)] 
smb: Modernize a few DEBUGs

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agosmbd: Reduce indentation with an early return;
Volker Lendecke [Sat, 22 Nov 2025 09:08:12 +0000 (10:08 +0100)] 
smbd: Reduce indentation with an early return;

Review with "git show -w"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agolib: Remove a few unused #defines
Volker Lendecke [Tue, 11 Nov 2025 08:57:00 +0000 (09:57 +0100)] 
lib: Remove a few unused #defines

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agocredentials: Remove duplicate prototypes
Volker Lendecke [Fri, 21 Nov 2025 14:28:01 +0000 (15:28 +0100)] 
credentials: Remove duplicate prototypes

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agosmbd: Move utok_string() into smbd
Volker Lendecke [Sun, 9 Nov 2025 09:47:02 +0000 (10:47 +0100)] 
smbd: Move utok_string() into smbd

Only used in chdir_current_service()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agosmbd: Remove the one-line conn_free() wrapper function
Volker Lendecke [Fri, 17 Oct 2025 12:10:49 +0000 (14:10 +0200)] 
smbd: Remove the one-line conn_free() wrapper function

In case there's more things to do here we should put it into the
destructor.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agolib: Reduce indentation
Volker Lendecke [Mon, 10 Nov 2025 16:03:42 +0000 (17:03 +0100)] 
lib: Reduce indentation

Avoid a few "else" statements, review with "git show -w".

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agosmbd: Modernize some very ugly DEBUGs
Volker Lendecke [Mon, 10 Nov 2025 15:36:34 +0000 (16:36 +0100)] 
smbd: Modernize some very ugly DEBUGs

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agolib: Add timespec_equal()
Volker Lendecke [Thu, 6 Nov 2025 14:15:51 +0000 (15:15 +0100)] 
lib: Add timespec_equal()

I've just gotten the !=0 vs ==0 wrong. Make comparing timespecs for
equality more intuitive.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agosmbd: Modernize DEBUGs
Volker Lendecke [Mon, 15 Dec 2025 11:41:26 +0000 (12:41 +0100)] 
smbd: Modernize DEBUGs

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agosmbd: Remove unused posix_sys_acl_blob_get_file()
Volker Lendecke [Wed, 17 Dec 2025 16:32:14 +0000 (17:32 +0100)] 
smbd: Remove unused posix_sys_acl_blob_get_file()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agosmbd: Remove an unnecessary talloc_strdup()
Volker Lendecke [Mon, 22 Dec 2025 21:03:47 +0000 (22:03 +0100)] 
smbd: Remove an unnecessary talloc_strdup()

talloc_string_sub() already makes a copy first

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agopysmbd: Silence a signed/unsigned warning
Volker Lendecke [Tue, 23 Dec 2025 11:12:54 +0000 (12:12 +0100)] 
pysmbd: Silence a signed/unsigned warning

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agolibcli: Add missing NULL checks
Volker Lendecke [Wed, 26 Nov 2025 11:08:33 +0000 (12:08 +0100)] 
libcli: Add missing NULL checks

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agolibcli: Fix error path memleaks
Volker Lendecke [Wed, 26 Nov 2025 11:08:15 +0000 (12:08 +0100)] 
libcli: Fix error path memleaks

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agolib: Save lines with direct initialization
Volker Lendecke [Mon, 1 Dec 2025 18:28:27 +0000 (19:28 +0100)] 
lib: Save lines with direct initialization

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agosmbd: A TCP port is uint16, fix variable type
Volker Lendecke [Mon, 15 Dec 2025 12:25:46 +0000 (13:25 +0100)] 
smbd: A TCP port is uint16, fix variable type

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agolib: Remove two unused functions
Volker Lendecke [Tue, 16 Dec 2025 16:44:05 +0000 (17:44 +0100)] 
lib: Remove two unused functions

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agosmbd: Avoid a memset with a struct initialization
Volker Lendecke [Thu, 18 Dec 2025 10:58:11 +0000 (11:58 +0100)] 
smbd: Avoid a memset with a struct initialization

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agolib: Simplify sys_acl_to_text() with talloc_asprintf_addbuf()
Volker Lendecke [Tue, 16 Dec 2025 14:23:17 +0000 (15:23 +0100)] 
lib: Simplify sys_acl_to_text() with talloc_asprintf_addbuf()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agosmbd: Remove an unnecessary include
Volker Lendecke [Tue, 16 Dec 2025 14:26:42 +0000 (15:26 +0100)] 
smbd: Remove an unnecessary include

This comes in via includes.h as well. Wherever these prototypes are
needed and wherever includes.h should not be available we should add
the include directly.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agosmbd: Remove #defines used just once
Volker Lendecke [Tue, 16 Dec 2025 19:26:15 +0000 (20:26 +0100)] 
smbd: Remove #defines used just once

For me they were not giving additional insights, they only made me
jump somewhere else to see what's going on.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agosmbd: Remove unused #defines
Volker Lendecke [Tue, 16 Dec 2025 19:17:18 +0000 (20:17 +0100)] 
smbd: Remove unused #defines

Unused since 2001...

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agosmbd: Add some const where possible
Volker Lendecke [Thu, 18 Dec 2025 10:58:52 +0000 (11:58 +0100)] 
smbd: Add some const where possible

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agosmbd: Simplify map_nt_perms
Volker Lendecke [Thu, 18 Dec 2025 10:58:41 +0000 (11:58 +0100)] 
smbd: Simplify map_nt_perms

Factor out the repeated if-conditions

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
4 months agolib: Fix some whitespace
Volker Lendecke [Thu, 18 Dec 2025 14:36:23 +0000 (15:36 +0100)] 
lib: Fix some whitespace

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 months agovfs_ceph_new: Fix a regression in SMB_VFS_GETWD
Anoop C S [Mon, 5 Jan 2026 06:26:03 +0000 (11:56 +0530)] 
vfs_ceph_new: Fix a regression in SMB_VFS_GETWD

Previously, commit 701d55846bc48988cd3f353e7555fb170b1fb767 accidentally
removed the statement that copies the current working directory resolved
by the ceph_getwd() call leading to connection problems in Samba‑CephFS
integration.

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Shweta Sodani <ssodani@redhat.com>
Reviewed-by: Noel Power <npower@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Tue Jan  6 06:31:41 UTC 2026 on atb-devel-224

5 months agodoc-xml: Document "net ads kerberos" commands
Günther Deschner [Sat, 13 Dec 2025 12:49:37 +0000 (13:49 +0100)] 
doc-xml: Document "net ads kerberos" commands

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

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Mon Jan  5 15:49:04 UTC 2026 on atb-devel-224

5 months agos3-net: properly setup krb5 ccache name via --use-krb5-ccache
Günther Deschner [Tue, 2 Dec 2025 15:56:44 +0000 (16:56 +0100)] 
s3-net: properly setup krb5 ccache name via --use-krb5-ccache

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

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 months agos3-selftest: Activate "net ads kerberos kinit" tests with --use-krb5-ccache
Günther Deschner [Tue, 2 Dec 2025 16:01:31 +0000 (17:01 +0100)] 
s3-selftest: Activate "net ads kerberos kinit" tests with --use-krb5-ccache

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

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 months agos3-selftest: verify KRB5CCNAME presence after kinit using klist
Günther Deschner [Tue, 2 Dec 2025 16:18:41 +0000 (17:18 +0100)] 
s3-selftest: verify KRB5CCNAME presence after kinit using klist

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

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 months agos3-selftest: mention in-memory ccache usage when nothing is provided
Günther Deschner [Tue, 2 Dec 2025 16:17:33 +0000 (17:17 +0100)] 
s3-selftest: mention in-memory ccache usage when nothing is provided

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

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 months agotests: Make recycle:touch test less flakey
Volker Lendecke [Mon, 5 Jan 2026 09:15:45 +0000 (10:15 +0100)] 
tests: Make recycle:touch test less flakey

I get the same atime pretty frequently. Wait a second to be sure it
changes.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Jan  5 11:20:04 UTC 2026 on atb-devel-224

5 months agoHappy New Year 2026!
Stefan Metzmacher [Wed, 31 Dec 2025 23:16:52 +0000 (23:16 +0000)] 
Happy New Year 2026!

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jan  1 12:44:44 UTC 2026 on atb-devel-224

5 months agos3:testparm: Fix "sync machine password to keytab" validation
Samuel Cabrero [Tue, 9 Dec 2025 09:01:16 +0000 (10:01 +0100)] 
s3:testparm: Fix "sync machine password to keytab" validation

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
Autobuild-User(master): Samuel Cabrero <scabrero@samba.org>
Autobuild-Date(master): Tue Dec 23 09:43:56 UTC 2025 on atb-devel-224

5 months agos3:tests: Add testparm tests for "sync machine password to keytab" option
Samuel Cabrero [Tue, 9 Dec 2025 10:50:48 +0000 (11:50 +0100)] 
s3:tests: Add testparm tests for "sync machine password to keytab" option

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
5 months agomdssvc: make a copy of the elasticsearch:default_fields
Ralph Boehme [Fri, 21 Nov 2025 10:12:13 +0000 (11:12 +0100)] 
mdssvc: make a copy of the elasticsearch:default_fields

lp_parm_const_string() returns a pointer to loadparm state that is not stable
across loadparm reloads and hence may later point at random garbage.

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

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 Dec 16 18:58:07 UTC 2025 on atb-devel-224

5 months agovfs_ceph_new: do explicit 'ceph_init' call
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

5 months agodocs-xml: fix manpage for "net offlinejoin requestodj"
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

5 months 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>
5 months 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>
5 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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>
5 months 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

5 months 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>