Volker Lendecke [Fri, 23 Jan 2026 18:08:16 +0000 (19:08 +0100)]
lib: Remove sys_fsusage()
"man statfs" on Linux says "Unless you need the f_type field, you
should use the standard statvfs(3) interface instead.". We don't need
f_type to get disk usage :-)
We lose some of the older compatibility layers. Should these ever be
needed again, we should add them to lib/util/statvfs.c an the single
interface to retrieve file system usage info.
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Tue, 27 Jan 2026 17:15:53 +0000 (18:15 +0100)]
vfs: Change SMB_VFS_DISK_FREE to take a fsp
The modules that change the pathname need a synthetic_pathref now for
the SMB_VFS_NEXT_DISK_FREE() call. I think this is the right thing to
do anyway, as this goes through all the path scrutiny and does not
depend on direct multi-component paths anymore.
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Tue, 3 Feb 2026 13:35:20 +0000 (14:35 +0100)]
third_party: init vars for -Og on debian testing
When building on debian testing with -Og, gcc complains about these
two uninitialized variables. Not sure how to deal with those, I'm
happy to re-fix if a new upstream patch overwrites them.
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
Noel Power [Tue, 27 Jan 2026 11:50:38 +0000 (11:50 +0000)]
lib/pthreadpool: Add some pthreadpool_pipe unit tests
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Signed-off-by: Noel Power <noel.power@suse.com>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Fri Feb 13 11:22:34 UTC 2026 on atb-devel-224
Michael Adam [Mon, 9 Feb 2026 17:17:13 +0000 (18:17 +0100)]
bootstrap: fix bootstrap in opensuse container
bootstrap.sh was failing in an opensuse container due to a conflict
of which with the pre-installed busybox-which package.
forcing resolution with zypper fixes the bootstrapping.
Thanks to Andreas Scheider for the hint!
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Feb 11 10:30:26 UTC 2026 on atb-devel-224
Martin Schwenke [Sun, 8 Feb 2026 23:03:04 +0000 (10:03 +1100)]
ctdb-daemon: Hex encode key before logging
This currently causes binary data to be logged.
Instead, conditionally hex encode the key in a similar style to the
way it is done in dbwrap_ctdb.c:fetch_locked_internal(). In this
case, the key is truncated if the debug level is less than 10.`
Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Feb 9 12:21:08 UTC 2026 on atb-devel-224
Martin Schwenke [Sun, 22 Sep 2024 06:37:50 +0000 (16:37 +1000)]
util: Avoid signed/unsigned integer comparisons
../../../lib/util/sys_rw.c: In function ‘sys_pread_full’:
../../../lib/util/sys_rw.c:219:25: warning: comparison of integer expressions of different signedness: ‘ssize_t’ {aka ‘long int’} and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
219 | if (ret > curr_count) {
| ^
../../../lib/util/sys_rw.c: In function ‘sys_pwrite_full’:
../../../lib/util/sys_rw.c:282:25: warning: comparison of integer expressions of different signedness: ‘ssize_t’ {aka ‘long int’} and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
282 | if (ret > curr_count) {
| ^
../../../lib/util/sys_rw.c: In function ‘sys_write_full’:
../../../lib/util/sys_rw.c:321:25: warning: comparison of integer expressions of different signedness: ‘ssize_t’ {aka ‘long int’} and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
321 | if (ret > curr_count) {
| ^
Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Volker Lendecke <vl@samba.org>
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): Thu Feb 5 21:11:13 UTC 2026 on atb-devel-224
s3:utils: 'net ads kerberos kinit' should use also default ccache name from krb5.conf
This is re-introducing the behavior from samba-4.20 where both these
commands operated on the same ccache (default_ccache_name in
[libdefaults] section of krb5.conf)
'net ads kerberos kinit -P'
'klist'
With samba-4.21 it no longer works, 'net ads kerberos kinit -P'
fallbacks to 'MEMORY:net' (which is of a very limited use, ticket
cannot be used by other process) and klist finds no ticket.
'--use-krb5-ccache=MEMORY:net' can be used to validate the credentials.
Use smb_force_krb5_cc_default_name() instead of krb5_cc_default_name()
because of commit: 1ca6fb5 make sure krb5_cc_default[_name]() is no longer used directly
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Noel Power [Thu, 29 Jan 2026 15:12:52 +0000 (15:12 +0000)]
s3/printing: Fix leaking parsed options
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15979 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Fri Jan 30 11:09:44 UTC 2026 on atb-devel-224
Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Thu Jan 29 00:33:43 UTC 2026 on atb-devel-224
Samuel Cabrero [Mon, 26 Jan 2026 12:36:02 +0000 (13:36 +0100)]
s3:rpc_client: Fix memory leak opening local named pipe
If no local server name was passed to rpc_pipe_open_local_np() then
get_myname() was called with NULL talloc context instead of the
current stackframe.
This was causing an increase of memory usage on busy servers with long-living
rpcd_* workers.
Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Noel Power <noel.power@suse.com> Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Jan 27 10:13:40 UTC 2026 on atb-devel-224
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Martin Schwenke <martins@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Jan 26 12:09:13 UTC 2026 on atb-devel-224
Pavel Filipenský [Thu, 22 Jan 2026 13:27:09 +0000 (14:27 +0100)]
s3:libads: Allocate cli_credentials on a stackframe
This fixes:
ERROR: talloc_free with references at ../../source3/libads/ldap_utils.c:158
What happens:
* `struct cli_credentials *creds` is allocated on `ads` talloc context
* gensec_set_credentials() creates a talloc_reference to `creds`
* TALLOC_FREE(creds) sees two parents and complains
All other code is using temporary talloc_stackframe() for `creds`.
Do it here as well.
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jan 23 11:20:28 UTC 2026 on atb-devel-224
Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Thu Jan 22 23:06:20 UTC 2026 on atb-devel-224
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): Thu Jan 22 09:14:25 UTC 2026 on atb-devel-224
Pavel Filipenský [Mon, 19 Jan 2026 13:33:52 +0000 (14:33 +0100)]
s3:libads: Reset ads->config.flags in ads_disconnect()
This is doing the same thing in ads_disconnect() as commit a26f535 Clear previous CLDAP ping flags when reusing the ADS_STRUCT
did in ads_current_time()
In this case we:
1) found cached ADS_STRUCT which already has ads->config.flags set:
Pavel Filipenský [Mon, 19 Jan 2026 18:50:37 +0000 (19:50 +0100)]
s3:libads: Do not reduce the page size in case of immediate timeouts
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Jan 21 11:38:40 UTC 2026 on atb-devel-224
Jennifer Sutton [Tue, 20 Jan 2026 03:53:30 +0000 (16:53 +1300)]
selftest: Set the ‘report_canonical_client_name’ option in krb5.conf
This will do something later when MIT Kerberos supports this option. For Heimdal
it shouldn’t make a difference.
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 Jan 21 04:46:43 UTC 2026 on atb-devel-224
Jennifer Sutton [Tue, 20 Jan 2026 03:53:27 +0000 (16:53 +1300)]
selftest: Disable implicit dollar match without canonicalization for promoted_dc
This puts promoted_dc and ad_dc_ntvfs in sync, and avoids an issue in the former
environment where the Heimdal KDC will use the smb.conf from one of the two DCs,
and the MIT KDC will use the smb.conf from the other.
Signed-off-by: Jennifer Sutton <jennifersutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Gary Lockyer [Thu, 15 Jan 2026 23:48:38 +0000 (12:48 +1300)]
lib:ldb-samba:ildap: fix empty attribute list handling
An LDB request interprets an empty attribute list as a request for no
attributes, but LDAP interprets an empty list as a request for all attributes,
and ["1.1"] as a request for no attributes, as per
RFC4511:4.5.1.8(SearchRequest.attributes). We need to convert [] to ["1.1"]
in the ildap module before the request goes out.
Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz> Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Wed Jan 21 03:29:23 UTC 2026 on atb-devel-224
Björn Jacke [Tue, 20 Jan 2026 13:47:57 +0000 (14:47 +0100)]
WHATSNEW: Start release notes for Samba 4.21.0pre1.
Signed-off-by: Bjoern Jacke <bjacke@samba.org> Signed-off-by: Jule Anger <janger@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Björn Jacke <bjacke@samba.org>
Autobuild-Date(master): Tue Jan 20 15:00:48 UTC 2026 on atb-devel-224
Volker Lendecke [Tue, 6 Jan 2026 15:29:30 +0000 (16:29 +0100)]
lib: Delay get_iconv_handle() in strchr_m()
Do it the same way as in strrchr_m()
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): Tue Jan 20 12:56:27 UTC 2026 on atb-devel-224
Volker Lendecke [Wed, 31 Dec 2025 13:57:36 +0000 (14:57 +0100)]
lib: Remove extern const data_blob_null
This actually saves some .text bytes in the code referencing this constant. The
compiler should be smarter to do the right thing than to copy from a shared
location.
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Tue, 30 Dec 2025 09:34:49 +0000 (10:34 +0100)]
lib: Remove &data_blob_null refs
The next patch will remove the data_blob_null global constant. The
APIs here are a bit weird in that they don't work fine with a NULL
pointer but require a reference to a NULL blob. But that's few enough
to add the special case in the callers.
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>