]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
2 months agoquic_ko_wrapper: Fix a typo
Volker Lendecke [Tue, 24 Feb 2026 13:35:03 +0000 (14:35 +0100)] 
quic_ko_wrapper: Fix a typo

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): Wed Feb 25 13:37:44 UTC 2026 on atb-devel-224

2 months agoquic_ko_wrapper: Fix a comment
Volker Lendecke [Tue, 24 Feb 2026 12:53:40 +0000 (13:53 +0100)] 
quic_ko_wrapper: Fix a comment

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 months agodsdb: Simplify samdb_cn_to_lDAPDisplayName()
Volker Lendecke [Tue, 24 Feb 2026 11:02:51 +0000 (12:02 +0100)] 
dsdb: Simplify samdb_cn_to_lDAPDisplayName()

Use GUID_buf_string(), dom_sid_str_buf() and talloc_asprintf_addbuf()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 months agodsdb: Simplify drs_ObjectIdentifier_to_debug_string()
Volker Lendecke [Tue, 24 Feb 2026 11:00:39 +0000 (12:00 +0100)] 
dsdb: Simplify drs_ObjectIdentifier_to_debug_string()

Use GUID_buf_string(), dom_sid_str_buf() and talloc_asprintf_addbuf()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 months agodsdb: Simplify samdb_dn_to_dns_domain() with talloc_asprintf_addbuf()
Volker Lendecke [Tue, 24 Feb 2026 10:54:30 +0000 (11:54 +0100)] 
dsdb: Simplify samdb_dn_to_dns_domain() with talloc_asprintf_addbuf()

Only check for NULL once

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 months agosmbd: Avoid a pointless if-statement
Volker Lendecke [Tue, 24 Feb 2026 10:19:56 +0000 (11:19 +0100)] 
smbd: Avoid a pointless if-statement

All you can read in optimizing guides is that branches are
expensive...

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 months agosmbd: Introduce helper vars in SMB_QUERY_POSIX_WHOAMI
Volker Lendecke [Tue, 24 Feb 2026 10:18:26 +0000 (11:18 +0100)] 
smbd: Introduce helper vars in SMB_QUERY_POSIX_WHOAMI

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 months agolibcli: Avoid a talloc in ldap_encode_ndr_dom_sid()
Volker Lendecke [Tue, 24 Feb 2026 10:00:45 +0000 (11:00 +0100)] 
libcli: Avoid a talloc in ldap_encode_ndr_dom_sid()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 months agowinbindd: Avoid casts in idmap_ad_unixids_to_sids()
Volker Lendecke [Tue, 24 Feb 2026 09:50:28 +0000 (10:50 +0100)] 
winbindd: Avoid casts in idmap_ad_unixids_to_sids()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 months agowinbindd: Avoid a few NULL checks in idmap_ad_unixids_to_sids()
Volker Lendecke [Tue, 24 Feb 2026 09:49:17 +0000 (10:49 +0100)] 
winbindd: Avoid a few NULL checks in idmap_ad_unixids_to_sids()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 months agowinbindd: Simplify winbindd_lookuprids_recv()
Volker Lendecke [Tue, 24 Feb 2026 09:43:09 +0000 (10:43 +0100)] 
winbindd: Simplify winbindd_lookuprids_recv()

Only check for NULL once with talloc_asprintf_addbuf()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 months agowinbindd: Simplify wcache_make_sidlist()
Volker Lendecke [Tue, 24 Feb 2026 09:41:03 +0000 (10:41 +0100)] 
winbindd: Simplify wcache_make_sidlist()

Rely on talloc_asprintf_addbuf's NULL checks

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 months agowinbindd: Align integer types
Volker Lendecke [Tue, 24 Feb 2026 09:29:18 +0000 (10:29 +0100)] 
winbindd: Align integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 months agowinbindd: Add a missing NULL check in winbindd_list_trusted_domains()
Volker Lendecke [Tue, 24 Feb 2026 09:28:12 +0000 (10:28 +0100)] 
winbindd: Add a missing NULL check in winbindd_list_trusted_domains()

We did not check the result of talloc_asprintf_append_buffer()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 months agowinbindd: Modernize a DEBUG
Volker Lendecke [Tue, 24 Feb 2026 09:23:21 +0000 (10:23 +0100)] 
winbindd: Modernize a DEBUG

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 months agowinbindd: Simplify collect_onlinestatus()
Volker Lendecke [Tue, 24 Feb 2026 09:22:20 +0000 (10:22 +0100)] 
winbindd: Simplify collect_onlinestatus()

Only check for NULL once with talloc_asprintf_addbuf()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 months agowinbindd: Simplify append_info3_as_txt()
Volker Lendecke [Tue, 24 Feb 2026 09:20:02 +0000 (10:20 +0100)] 
winbindd: Simplify append_info3_as_txt()

Only check for NULL once with talloc_asprintf_addbuf()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 months agowinbindd: Simplify winbindd_getuserdomgroups_recv()
Volker Lendecke [Tue, 24 Feb 2026 09:16:41 +0000 (10:16 +0100)] 
winbindd: Simplify winbindd_getuserdomgroups_recv()

Only check for NULL once with talloc_asprintf_addbuf()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 months agowinbindd: Call dom_sid_str_buf() only once
Volker Lendecke [Tue, 24 Feb 2026 09:15:27 +0000 (10:15 +0100)] 
winbindd: Call dom_sid_str_buf() only once

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 months agowinbindd: dom_sid_str_buf() returns "buf"
Volker Lendecke [Tue, 24 Feb 2026 08:56:12 +0000 (09:56 +0100)] 
winbindd: dom_sid_str_buf() returns "buf"

Save a line

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 months agowinbind: Simplify winbindd_xids_to_sids_recv() with talloc_asprintf_addbuf
Volker Lendecke [Tue, 24 Feb 2026 08:55:16 +0000 (09:55 +0100)] 
winbind: Simplify winbindd_xids_to_sids_recv() with talloc_asprintf_addbuf

Only check for NULL once

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 months agopam_winbind: Simplify _pam_compose_pwd_restriction_string
Volker Lendecke [Tue, 24 Feb 2026 08:44:49 +0000 (09:44 +0100)] 
pam_winbind: Simplify _pam_compose_pwd_restriction_string

Avoid explicit NULL handling with talloc_asprintf_addbuf()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 months agoctdb-tests: Update README
Martin Schwenke [Thu, 8 Jan 2026 04:21:15 +0000 (15:21 +1100)] 
ctdb-tests: Update README

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoctdb-common: Remove unused function ctdb_set_helper()
Martin Schwenke [Sat, 8 Nov 2025 10:33:34 +0000 (21:33 +1100)] 
ctdb-common: Remove unused function ctdb_set_helper()

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoctdb-daemon: Remove helper variable CTDB_DEBUG_LOCKS
Martin Schwenke [Fri, 31 Oct 2025 03:48:23 +0000 (14:48 +1100)] 
ctdb-daemon: Remove helper variable CTDB_DEBUG_LOCKS

Replace with a lock_debug_script member in ctdb_context.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoctdb-tests: Reorder and group script variables, add comments
Martin Schwenke [Fri, 31 Oct 2025 03:46:23 +0000 (14:46 +1100)] 
ctdb-tests: Reorder and group script variables, add comments

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoctdb-tests: Remove unused helper variable CTDB_SCRIPTS_HELPER_BINDIR
Martin Schwenke [Wed, 29 Oct 2025 09:46:03 +0000 (20:46 +1100)] 
ctdb-tests: Remove unused helper variable CTDB_SCRIPTS_HELPER_BINDIR

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoctdb-daemon: Remove helper variable CTDB_CLUSTER_MUTEX_HELPER
Martin Schwenke [Thu, 30 Oct 2025 11:30:27 +0000 (22:30 +1100)] 
ctdb-daemon: Remove helper variable CTDB_CLUSTER_MUTEX_HELPER

Use path_helperdir() to help construct the path and then cache the
result in the existing static buffer (with length adjusted because
POSIX says the +1 is not necessary).  Given the way this is used by
cluster_mutex_test, there is no (other) sane place to cache it.
path_helperdir_append() could be used to construct the path, but then
there would be an unnecessary talloc() result to free.

The flexibility in unit test cluster_mutex_003.sh was never used, so
remove this test.  If other cluster mutex helpers are added then they
can be tested by separate tests.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoctdb-daemon: Remove helper variable CTDB_LOCK_HELPER
Martin Schwenke [Thu, 30 Oct 2025 10:55:50 +0000 (21:55 +1100)] 
ctdb-daemon: Remove helper variable CTDB_LOCK_HELPER

Replace with a lock_helper member in ctdb_context, set using
path_helperdir_append().

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoctdb-daemon: Remove helper variable CTDB_EVENTD
Martin Schwenke [Wed, 29 Oct 2025 10:20:55 +0000 (21:20 +1100)] 
ctdb-daemon: Remove helper variable CTDB_EVENTD

Simplify the initialisation of the path to eventd in eventd_context
using path_helperdir_append().

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoctdb-recoverd: Remove some helper variables
Martin Schwenke [Wed, 29 Oct 2025 10:09:48 +0000 (21:09 +1100)] 
ctdb-recoverd: Remove some helper variables

Remove CTDB_RECOVERY_HELPER, CTDB_TAKEOVER_HELPER.  Add new struct
members in ctdb_recoverd to contain the paths, set via
path_helperdir_append().

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoctdb-tools: Remove some helper variables
Martin Schwenke [Mon, 27 Oct 2025 06:36:27 +0000 (17:36 +1100)] 
ctdb-tools: Remove some helper variables

Remove CTDB_EVENT_HELPER, CTDB_LVS_HELPER, CTDB_NATGW_HELPER.  Use
path_helperdir_append() instead.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoctdb-common: Add path_helperdir() and path_helperdir_append()
Martin Schwenke [Mon, 27 Oct 2025 04:47:55 +0000 (15:47 +1100)] 
ctdb-common: Add path_helperdir() and path_helperdir_append()

These can be used to locate helpers, either during in-tree
testing (using $CTDB_TEST_HELPER_BINDIR) or in their configured
installation location.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoctdb-tests: Drop an unnecessary use of CTDB_SCRIPTS_HELPER_BINDIR
Martin Schwenke [Wed, 29 Oct 2025 04:29:57 +0000 (15:29 +1100)] 
ctdb-tests: Drop an unnecessary use of CTDB_SCRIPTS_HELPER_BINDIR

As a helper, ctdb-path is in $CTDB_TEST_HELPER_BINDIR, which is in
$PATH.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoctdb-tests: Use CTDB_TEST_HELPER_BINDIR inline
Martin Schwenke [Wed, 29 Oct 2025 04:28:22 +0000 (15:28 +1100)] 
ctdb-tests: Use CTDB_TEST_HELPER_BINDIR inline

Replace most remaining uses of CTDB_SCRIPTS_TOOLS_HELPER_DIR and
CTDB_SCRIPTS_HELPER_BINDIR.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoctdb-tests: Remove redundant PATH adds
Martin Schwenke [Thu, 30 Oct 2025 03:37:11 +0000 (14:37 +1100)] 
ctdb-tests: Remove redundant PATH adds

These are covered because CTDB_TEST_HELPER_BINDIR is now added to
PATH.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoctdb-tests: Add CTDB_TEST_HELPER_BINDIR
Martin Schwenke [Wed, 29 Oct 2025 04:22:22 +0000 (15:22 +1100)] 
ctdb-tests: Add CTDB_TEST_HELPER_BINDIR

Now that generated scripts are linked into bin/, nothing needs to be
run from the tools/ directory anymore during self-test.  So, introduce
CTDB_TEST_HELPER_BINDIR to replace both CTDB_SCRIPTS_TOOLS_HELPER_DIR
and CTDB_SCRIPTS_HELPER_BINDIR.  Add this directory to PATH.

CTDB_TEST_HELPER_BINDIR will also be used in combination with
CTDB_TEST_MODE to allow helpers to be found via a single mechanism
that uses this single variable.  This will replace the multiple
mechanisms and variables currently used.

For simplicity, leave the old variables alone for now.  Replacing them
in a comprehensible way will take a few steps.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoctdb-tests: Silence some shellcheck complaints
Martin Schwenke [Wed, 29 Oct 2025 04:48:50 +0000 (15:48 +1100)] 
ctdb-tests: Silence some shellcheck complaints

Add most of the fixed files to the associated shellcheck unit test.
Include a couple of formatting fixups.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoctdb-tests: Reformat with "shfmt -w -i 0 -fn"
Martin Schwenke [Wed, 29 Oct 2025 04:44:42 +0000 (15:44 +1100)] 
ctdb-tests: Reformat with "shfmt -w -i 0 -fn"

Best reviewed with "git show -w" or similar.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoctdb-tests: Add a useful comment
Martin Schwenke [Wed, 29 Oct 2025 02:58:00 +0000 (13:58 +1100)] 
ctdb-tests: Add a useful comment

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoctdb-tests: Remove unused variables
Martin Schwenke [Wed, 29 Oct 2025 01:01:27 +0000 (12:01 +1100)] 
ctdb-tests: Remove unused variables

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoctdb-build: Store generator rules in variables
Martin Schwenke [Sun, 22 Feb 2026 22:40:58 +0000 (09:40 +1100)] 
ctdb-build: Store generator rules in variables

This improves readability and maintainability.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoctdb-build: Ensure generated scripts are executable and symlinked
Martin Schwenke [Mon, 27 Oct 2025 06:32:47 +0000 (17:32 +1100)] 
ctdb-build: Ensure generated scripts are executable and symlinked

Ensure that all generated scripts are executable.  All of the
generated scripts (except test harnesses ctdb_run_tests,
ctdb_local_daemons) also need to be linked into the bin/ directory so
they can be more easily run during self-test.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agowafsamba: Add support for chmod of generated items
Martin Schwenke [Sun, 22 Feb 2026 22:22:35 +0000 (09:22 +1100)] 
wafsamba: Add support for chmod of generated items

CTDB generates scripts that are run during self-test, so add a chmod
option to SAMBA_GENERATOR().

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agowafsamba: Add support for symlinking generated items
Martin Schwenke [Sun, 22 Feb 2026 03:31:28 +0000 (14:31 +1100)] 
wafsamba: Add support for symlinking generated items

CTDB generates scripts and these want to be used in self-test.  So,
update SAMBA_GENERATOR() to allow items to be symlinked into bin/.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Signed-off-by: Anoop C S <anoopcs@samba.org>
2 months agothird_party:heimdal: import lorikeet-heimdal-202602190236
Gary Lockyer [Thu, 19 Feb 2026 02:55:36 +0000 (15:55 +1300)] 
third_party:heimdal: import lorikeet-heimdal-202602190236

commits: 4223f36655031fd13ad3b0bedbc937dd9ba40c8d
 1a9371036d4baa7da50e9260e411eefa6cee0811
 53f5f685a474413d009249ecd7750399737dcd39

Action upstream feedback on KB5014754 changes.
pkinit:match_name Implement 3.1.5.2.1.3 Explicit Mapping

Calculate hash for KB5014754 SHA1-PUKEY over entire certificate

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

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Autobuild-User(master): Jennifer Sutton <jsutton@samba.org>
Autobuild-Date(master): Mon Feb 23 21:18:57 UTC 2026 on atb-devel-224

2 months agotest:heimdal:pkinit fixes for SHA1-PUKEY calculation
Gary Lockyer [Thu, 19 Feb 2026 22:55:59 +0000 (11:55 +1300)] 
test:heimdal:pkinit fixes for SHA1-PUKEY calculation

The SHA1 hash for KB5014754 SHA1-PUKEY is calculate over the entire
certificate not just the public key.

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

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
2 months agos4:kdc:db-glue:tests free principal
Gary Lockyer [Wed, 18 Feb 2026 23:19:35 +0000 (12:19 +1300)] 
s4:kdc:db-glue:tests free principal

Call krb5_free_principal to quiet valgrind leak reports

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
2 months agos4:kdc:db-glue altSecurityIdentities DN and serial reversed
Gary Lockyer [Wed, 18 Feb 2026 23:18:38 +0000 (12:18 +1300)] 
s4:kdc:db-glue altSecurityIdentities DN and serial reversed

When altSecurityIdentities is set by RSAT / ADUC they store the
Issuer and Subject DN in last to first order i.e.
       CN=Common Name, O=Organization, C=Country
Need to reverse that to first to last order, i.e.
       C=Country, O=Organization, CN=Common name
Which is how they're stored on the X509 certificates.

Also the serial number is stored in reverse order.

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

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
2 months agoselftest: mark "smb2.lease.rename_dir_openfile" as flapping
Ralph Boehme [Mon, 23 Feb 2026 10:31:56 +0000 (11:31 +0100)] 
selftest: mark "smb2.lease.rename_dir_openfile" as flapping

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Feb 23 12:37:28 UTC 2026 on atb-devel-224

2 months agoctdb-tools: Fix CID 1681637 - Drop unnecessary if-statements
Martin Schwenke [Mon, 23 Feb 2026 03:42:17 +0000 (14:42 +1100)] 
ctdb-tools: Fix CID 1681637 - Drop unnecessary if-statements

The first was found by Coverity:

>>>     CID 1681637:         Incorrect expression  (IDENTICAL_BRANCHES)
>>>     The same code is executed when the condition "ret != 0" is
true or false, because the code in the if-then branch and
after the if statement is identical. Should the if statement
be removed?

The second and third are also obvious.

Sorry, missed these in review.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Signed-off-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Mon Feb 23 08:43:29 UTC 2026 on atb-devel-224

2 months agodocs: smbget: Fix typos and misleading options in manpage
DESKTOP-73571CJ\User [Fri, 13 Feb 2026 12:10:58 +0000 (20:10 +0800)] 
docs: smbget: Fix typos and misleading options in manpage

This patch corrects several issues in the smbget documentation:
- Removed duplicate '-O' from the synopsis (it conflicted with socket
options).
- Clarified that '-o' conflicts with '--recursive', not '-R' (which is
name resolve order).
- Fixed malformed example syntax (changed '-resume' to '--resume').
- Fixed spelling typo of 'recursive' in the BUGS section.

RN: Fixed misleading documentation for smbget options (-O vs --stdout)
and corrected typos.

Signed-off-by: Hugo Chia <hugochiaxyz.nus@gmail.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: John Mulligan <jmulligan@redhat.com>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Sun Feb 22 06:10:46 UTC 2026 on atb-devel-224

2 months agos3/passdb: add parameter to control handling of wellknown SIDs in pdb_tdb
Ralph Boehme [Mon, 26 Jan 2026 14:59:44 +0000 (15:59 +0100)] 
s3/passdb: add parameter to control handling of wellknown SIDs in pdb_tdb

With "tdbsam:map wellknown", one can control if pdb_tdb should be used
to map entries of wellknown SIDs or not. By default, they will not be
mapped, as in previous releases.

This is similar to commit 6a048b424a2ecf38614aa6912f0d8c8a26c87ad5
which added the option "tdbsam:map builtin" for the builtin groups.

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): Fri Feb 20 15:20:31 UTC 2026 on atb-devel-224

2 months agopthreadpool: Fix CID 1681387, Error handling issues (CHECKED_RETURN)
Anoop C S [Thu, 19 Feb 2026 13:55:20 +0000 (19:25 +0530)] 
pthreadpool: Fix CID 1681387, Error handling issues (CHECKED_RETURN)

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Fri Feb 20 08:37:17 UTC 2026 on atb-devel-224

2 months agoctdb-doc: add section to manpage for -j/--json option
John Mulligan [Mon, 9 Feb 2026 18:02:01 +0000 (13:02 -0500)] 
ctdb-doc: add section to manpage for -j/--json option

Signed-off-by: John Mulligan <jmulligan@redhat.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Fri Feb 20 01:50:20 UTC 2026 on atb-devel-224

2 months agoctdb-tools: add some tests cases for ctdb status --json
John Mulligan [Thu, 12 Feb 2026 22:44:59 +0000 (17:44 -0500)] 
ctdb-tools: add some tests cases for ctdb status --json

Signed-off-by: John Mulligan <jmulligan@redhat.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoctdb-tests: add wrapper helper over JSON-mode command
Shachar Sharon [Sun, 8 Feb 2026 11:39:53 +0000 (13:39 +0200)] 
ctdb-tests: add wrapper helper over JSON-mode command

Run ctdb sub-command with '--json' flag only when code has been compiled
with json support. Otherwise, ignore the test silently.

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoctdb-tools: add --json support to 'version' sub-command
Shachar Sharon [Sun, 8 Feb 2026 11:15:02 +0000 (13:15 +0200)] 
ctdb-tools: add --json support to 'version' sub-command

When building ctdb with json-outpuit support, enable json output when
running 'ctdb version --json'. This may be used as indication to json
support in other sub-commands.

Pair-Programmed-With: John Mulligan <jmulligan@redhat.com>
Signed-off-by: Shachar Sharon <ssharon@redhat.com>
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoctdb-tools: add a --json option for ctdb status
John Mulligan [Thu, 12 Feb 2026 22:47:58 +0000 (17:47 -0500)] 
ctdb-tools: add a --json option for ctdb status

Add a new --json option that prints JSON as a higher-level machine
parse-able output. The --json option is only supported if the
jansson library is available.

The --json option will ONLY print json.  If the subcommand does not
(yet) support json it will raise an error rather than fall back to
emitting human readable text. This way a json parser is never given
"invalid" input.

Pair-Programmed-With: Shachar Sharon <ssharon@redhat.com>
Signed-off-by: Shachar Sharon <ssharon@redhat.com>
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoctdb-wscript: support building ctdb command with jansson
John Mulligan [Thu, 12 Feb 2026 22:47:58 +0000 (17:47 -0500)] 
ctdb-wscript: support building ctdb command with jansson

Pair-Programmed-With: Shachar Sharon <ssharon@redhat.com>
Signed-off-by: Shachar Sharon <ssharon@redhat.com>
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agobuild: Move jansson detection and related options to lib/util
Martin Schwenke [Tue, 17 Feb 2026 00:17:57 +0000 (11:17 +1100)] 
build: Move jansson detection and related options to lib/util

This means that standalone builds (e.g. CTDB) can use it.

The check for without JSON but with AD DC stays in the top-level
wscript.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoctdb-tools: reformat ctdb.c with clang-format
John Mulligan [Tue, 10 Feb 2026 18:55:11 +0000 (13:55 -0500)] 
ctdb-tools: reformat ctdb.c with clang-format

This is the result of running:
    clang-format -i ctdb/tools/ctdb.c

This is in preparation for some upcoming changes that add fields to the
struct tables and general recommendations to use `clang-format` and/or
`git clang-format` to keep samba code formatted consistently.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoctdb-failover: Add sm-notify to statd_callout
Peter Schwenke [Thu, 9 Oct 2025 01:48:28 +0000 (12:48 +1100)] 
ctdb-failover: Add sm-notify to statd_callout

sm-notify is required when an NFS client reboots.
rpc-statd on the client will send an sm-notify to
rpc-statd on the NFS sever.

Add a test case.

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

Signed-off-by: Peter Schwenke <pschwenke@ddn.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Wed Feb 18 12:29:16 UTC 2026 on atb-devel-224

2 months agoctdb-scripts: Only send notifies for newly taken IPs
Peter Schwenke [Tue, 29 Apr 2025 06:33:45 +0000 (16:33 +1000)] 
ctdb-scripts: Only send notifies for newly taken IPs

We no longer delete shared state (and send notifies) for
IPs previously held by the current node. The NFS lock manager
won't have released locks for these IPs, so won't generate
SM_MON on reclaim attempts.  Therefore, there will be
no add-client to put them back.

We now record newly taken IP addresses in takeip,
and only send notifies for those during
ipreallocated.  The extra notifies were also confusing
statd.

Update existing tests to always simulate taking all of a node's IPs.
This causes no output changes.

Test updates confirm the subtleties of the statd_callout_helper
behaviour change.  These pretend to only take a single IP, so
SM_NOTIFY must not be sent for other IPs.  Shared state should
remain for these other files.

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

Signed-off-by: Peter Schwenke <pschwenke@ddn.com>
Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoctdb-tests: Update statd-callout unit test infrastructure
Martin Schwenke [Thu, 15 May 2025 05:20:25 +0000 (15:20 +1000)] 
ctdb-tests: Update statd-callout unit test infrastructure

Don't cheat.  Keep some state about what is happening, similar to what
statd_callout and statd_callout_helper are expected to keep.  This
means hinting arguments to check_shared_storage_statd_state() and
check_statd_callout_smnotify() can be dropped.

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

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agovfs_ceph_new: Reduce a level of indirection for SMB_VFS_FSTATVFS
Anoop C S [Tue, 17 Feb 2026 16:21:35 +0000 (21:51 +0530)] 
vfs_ceph_new: Reduce a level of indirection for SMB_VFS_FSTATVFS

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Feb 18 11:12:23 UTC 2026 on atb-devel-224

2 months agovfs_ceph: Reduce a level of indirection for SMB_VFS_FSTATVFS
Anoop C S [Tue, 17 Feb 2026 16:20:45 +0000 (21:50 +0530)] 
vfs_ceph: Reduce a level of indirection for SMB_VFS_FSTATVFS

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agoCVE-2026-20833: WHATSNEW: Document new default for ‘kdc default domain supported...
Jennifer Sutton [Wed, 4 Feb 2026 00:51:38 +0000 (13:51 +1300)] 
CVE-2026-20833: WHATSNEW: Document new default for ‘kdc default domain supported enctypes’

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 Feb 18 01:52:23 UTC 2026 on atb-devel-224

2 months agoCVE-2026-20833: s4:kdc: Make default domain supported enctypes AES by default
Jennifer Sutton [Fri, 30 Jan 2026 02:03:42 +0000 (15:03 +1300)] 
CVE-2026-20833: s4:kdc: Make default domain supported enctypes AES by default

If AES keys are available in the domain, assume that service accounts support
AES by default.

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

Signed-off-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 months agoCVE-2026-20833: selftest: Avoid renaming ‘testallowed_account’
Jennifer Sutton [Wed, 4 Feb 2026 01:43:09 +0000 (14:43 +1300)] 
CVE-2026-20833: selftest: Avoid renaming ‘testallowed_account’

cli_credentials_get_keytab() uses the sAMAccountName to calculate the salt via
cli_credentials_get_salt_principal(). Changing the sAMAccountName means that
cli_credentials_get_keytab() will generate AES Kerberos keys using the wrong
salt, and gensec authentication will fail.

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

Signed-off-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 months agoCVE-2026-20833: python:tests: Set secure channel type for test credentials
Jennifer Sutton [Tue, 3 Feb 2026 01:36:59 +0000 (14:36 +1300)] 
CVE-2026-20833: python:tests: Set secure channel type for test credentials

This will ensure that we use the correct salting algorithm for AES when we
authenticate using gensec.

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

Signed-off-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 months agodocs-xml: Add missing word
Jennifer Sutton [Tue, 27 Jan 2026 04:12:00 +0000 (17:12 +1300)] 
docs-xml: Add missing word

Signed-off-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 months agolib:audit_logging: Fix code spelling
Jennifer Sutton [Sun, 25 Jan 2026 22:23:34 +0000 (11:23 +1300)] 
lib:audit_logging: Fix code spelling

Signed-off-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 months agobuild: allow `./configure _foo=x` to work like FOO=x
Douglas Bagnall [Mon, 2 Feb 2026 21:24:14 +0000 (10:24 +1300)] 
build: allow `./configure _foo=x` to work like FOO=x

OpenWRT passes arguments like '_python_sysroot=x' after the './configure',
which it expects to work as if the occurred before the './configure'
-- that is, setting environment variables (let's assume its build
system is necessarily complex due to all the cross-compiles).

This used to work (or at least not cause a failure return code) until
the upgrade to waf 2.1.5 or 2.1.6 in mid-2025, when waf started using
the argparse parser.

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

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Wed Feb 18 00:00:30 UTC 2026 on atb-devel-224

2 months agos3/libsmb: block anon authentication fallback is use-kerberos = desired
Noel Power [Mon, 19 Jan 2026 16:18:02 +0000 (16:18 +0000)] 
s3/libsmb: block anon authentication fallback is use-kerberos = desired

When cli_credentials_get_kerberos_state returns CRED_USE_KERBEROS_REQUIRED
libsmbclient method SMBC_server_internal will still try to fallback to
anon NTLM. This patch prevents that.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=15789
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Tue Feb 17 16:06:18 UTC 2026 on atb-devel-224

2 months agos3/libsmb: cli_session_creds_init fails when kerberos is desired
Noel Power [Mon, 19 Jan 2026 16:10:10 +0000 (16:10 +0000)] 
s3/libsmb: cli_session_creds_init fails when kerberos is desired

There is a regression with code using cli_session_creds_init when
cli_credentials_get_kerberos_state() returns CRED_USE_KERBEROS_DESIRED

Authentication succeeds when boolean fallback_after_kerberos is false
and fails when true.
There doesn't seem to be a good reason why the value of
fallback_after_kerberos should initialise the krb5 ccache or not.
It would seems that krb5 cache should be setup for creds
for *any* kerberos auth (whether fallback is enabled or not)

Partial patch from <will69@gmx.de> (see bug referenced below)
Bug: https://bugzilla.samba.org/show_bug.cgi?id=15789
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 months agoauth/credentials: Fix regression with --use-kerberos=desired for smbclient
Noel Power [Mon, 19 Jan 2026 15:46:59 +0000 (15:46 +0000)] 
auth/credentials: Fix regression with --use-kerberos=desired for smbclient

As part of the gse_krb5 processing the following call chain

gensec_gse_client_start()
  ---> gensec_kerberos_possible()
         ---> cli_credentials_authentication_requested()

gensec_kerberos_possible()  will always fail when
cli_credentials_get_kerberos_state() returns CRED_USE_KERBEROS_DESIRED

It seems since use kerberos == desired is the default that it isn't
necessary to see if credentials were modified to indicated authentication
was requested. gensec_kerberos_possible() should afaics return true
if kerberos is desired OR required (regardless of whether credentials
were requested)

This commit removes the knownfail associated with this bug.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=15789
Signed-off-by: <noel.power@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 months agoselftest: Update tests to use --use-kereros=desired|required no creds
Noel Power [Fri, 13 Feb 2026 11:54:46 +0000 (11:54 +0000)] 
selftest: Update tests to use --use-kereros=desired|required no creds

Add tests to call smbclient without passing credentials to
demonstrate failure with --use-kereros=desired

Also add knownfail

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 months agovfs_ceph: Handle absolute paths with dirfd = ‑1 in openat
Anoop C S [Sun, 15 Feb 2026 04:27:18 +0000 (09:57 +0530)] 
vfs_ceph: Handle absolute paths with dirfd = ‑1 in openat

ceph_openat() does not follow the convention of ignoring 'dirfd' when
the pathname is absolute, resulting in EBADF. As a temporary workaround,
handle this special case in cephwrap_openat() by calling ceph_open()
directly instead of ceph_openat().

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: John Mulligan <jmulligan@redhat.com>
Reviewed-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
Reviewed-by: Xavi Hernandez <xhernandez@redhat.com>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Mon Feb 16 17:27:03 UTC 2026 on atb-devel-224

2 months agos3:utils: Fix misleading recursive flag in smbget error message
DESKTOP-73571CJ\User [Wed, 11 Feb 2026 08:04:33 +0000 (16:04 +0800)] 
s3:utils: Fix misleading recursive flag in smbget error message

The error message in smbget incorrectly instructs users to use "-R" for
recursive downloads.

In recent Samba versions, the "-R" flag was repurposed for
"--name-resolve" to align with other tools. The correct flag for
recursion is now "--recursive". This mismatch causes confusion as using
"-R" triggers a parameter parsing error rather than enabling recursion.

This patch updates the error string to correctly suggest "--recursive"
instead of "-R".

RN: smbget: Fix error message suggesting wrong flag for recursion.

Signed-off-by: Hugo Chia hugochiaxyz.nus@gmail.com
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: John Mulligan <jmulligan@redhat.com>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Mon Feb 16 15:37:04 UTC 2026 on atb-devel-224

2 months agovfs: Simplify xattr_tdb_getxattrat_send()
Volker Lendecke [Mon, 9 Feb 2026 12:10:07 +0000 (13:10 +0100)] 
vfs: Simplify xattr_tdb_getxattrat_send()

Avoid calls to SMB_VFS_CHDIR and SMB_VFS_GETWD by using
openat_pathref_fsp()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Sun Feb 15 11:45:52 UTC 2026 on atb-devel-224

2 months agoparam: Simplify check_ad_dc_required_mods()
Volker Lendecke [Mon, 9 Feb 2026 12:00:22 +0000 (13:00 +0100)] 
param: Simplify check_ad_dc_required_mods()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agolib: Avoid DEBUGADDs in debug_lock_order()
Volker Lendecke [Tue, 3 Feb 2026 17:58:06 +0000 (18:58 +0100)] 
lib: Avoid DEBUGADDs in debug_lock_order()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoauth: Align integer types
Volker Lendecke [Tue, 3 Feb 2026 17:49:31 +0000 (18:49 +0100)] 
auth: Align integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoauth: Avoid a DEBUGADD in kerberos_decode_pac()
Volker Lendecke [Tue, 3 Feb 2026 17:47:34 +0000 (18:47 +0100)] 
auth: Avoid a DEBUGADD in kerberos_decode_pac()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agoauth: Refactor check_pac_checksum to improve readability
Volker Lendecke [Tue, 3 Feb 2026 17:34:44 +0000 (18:34 +0100)] 
auth: Refactor check_pac_checksum to improve readability

Use ARRAY_SIZE over terminating array element. Easier to read for me.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agolib: Remove unused str_list_show
Volker Lendecke [Mon, 26 Jan 2026 12:00:11 +0000 (13:00 +0100)] 
lib: Remove unused str_list_show

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agosmbd: Modernize a DEBUG
Volker Lendecke [Sat, 31 Jan 2026 10:09:59 +0000 (11:09 +0100)] 
smbd: Modernize a DEBUG

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agosmbd: Simplify smbd_do_qfsinfo()
Volker Lendecke [Thu, 29 Jan 2026 15:18:06 +0000 (16:18 +0100)] 
smbd: Simplify smbd_do_qfsinfo()

We can rely on fsp now, avoid passing and using fname

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agosmbd: smbd_do_qfsinfo() can rely on an fsp now, use fsp's stat info
Volker Lendecke [Thu, 29 Jan 2026 15:16:30 +0000 (16:16 +0100)] 
smbd: smbd_do_qfsinfo() can rely on an fsp now, use fsp's stat info

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agolib: Streamline finding a file's block device for quota code
Volker Lendecke [Mon, 26 Jan 2026 13:01:05 +0000 (14:01 +0100)] 
lib: Streamline finding a file's block device for quota code

Use /proc/self/mountinfo to find the block device a file is mounted on for
quotactl purposes.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agolib: Convert sys_path_to_bdev to talloc
Volker Lendecke [Mon, 26 Jan 2026 14:35:39 +0000 (15:35 +0100)] 
lib: Convert sys_path_to_bdev to talloc

Next we'll have sys_dev_to_bdev based on string_list_make, which is
talloc-based.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agovfs: Add "fsp" to SMB_VFS_SET_QUOTA
Volker Lendecke [Wed, 11 Feb 2026 11:29:54 +0000 (12:29 +0100)] 
vfs: Add "fsp" to SMB_VFS_SET_QUOTA

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agovfs: Change SMB_VFS_GET_QUOTA to take a fsp instead of a name
Volker Lendecke [Wed, 28 Jan 2026 14:57:37 +0000 (15:57 +0100)] 
vfs: Change SMB_VFS_GET_QUOTA to take a fsp instead of a name

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agosmbd: Make disk_quotas() take a fsp
Volker Lendecke [Wed, 28 Jan 2026 14:26:47 +0000 (15:26 +0100)] 
smbd: Make disk_quotas() take a fsp

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agovfs: Remove SMB_VFS_STATVFS
Volker Lendecke [Tue, 27 Jan 2026 17:59:09 +0000 (18:59 +0100)] 
vfs: Remove SMB_VFS_STATVFS

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agosmbd: Call FSTATVFS instead of STATVFS
Volker Lendecke [Tue, 27 Jan 2026 17:46:30 +0000 (18:46 +0100)] 
smbd: Call FSTATVFS instead of STATVFS

To get the fs capabilities we do an openat_pathref_fsp_dot(), which
also avoids a call to SMB_VFS_STAT there.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agovfs: Add SMB_VFS_FSTATVFS
Volker Lendecke [Wed, 19 Nov 2025 13:05:49 +0000 (14:05 +0100)] 
vfs: Add SMB_VFS_FSTATVFS

To replace SMB_VFS_STATVFS next

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agovfs_gpfs: Use fstatvfs() instead of the path-based statvfs()
Volker Lendecke [Tue, 27 Jan 2026 17:37:02 +0000 (18:37 +0100)] 
vfs_gpfs: Use fstatvfs() instead of the path-based statvfs()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
2 months agovfs_default: Use fstatvfs() instead of the path-based statvfs()
Volker Lendecke [Tue, 27 Jan 2026 17:36:40 +0000 (18:36 +0100)] 
vfs_default: Use fstatvfs() instead of the path-based statvfs()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>