]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
4 weeks agosmbtorture: fix a test rundown
Ralph Boehme [Thu, 9 Oct 2025 17:31:33 +0000 (19:31 +0200)] 
smbtorture: fix a test rundown

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

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

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

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

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

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

Signed-off-by: Shweta Sodani <ssodani@redhat.com>
Reviewed-by: Xavi Hernandez <xhernandez@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Mon Nov 24 18:03:08 UTC 2025 on atb-devel-224

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

This is part of the cmocka.h header file.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Nov 24 11:28:08 UTC 2025 on atb-devel-224

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

This is part of the cmocka.h header file.

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

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

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

This patch fix the issue by checking the valid string

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

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

If these fail to fail, there is a problem.

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

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

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

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

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

With this patch we honour

 kdc name match implicit dollar without canonicalization = no

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

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

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

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

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

In the ad_dc_ntvfs environment.

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

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

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

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

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

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

Before:

> AssertionError: 6 not found in (20,)

After:

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

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

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

to be consistent with all the others.

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

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

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

This does nothing yet.

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

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

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

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

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

git diff -b is probably useful.

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

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

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

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

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

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

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

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

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

because later we go

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Also properly separate the signature algorithm and digest algorithms.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

The flag is passed down the modules stack.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Best viewed ignoring white space changes

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

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

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

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

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

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

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 weeks agoselftest/Samba3: nt4_dc* use vfs_default:VFS_OPEN_HOW_RESOLVE_NO_XDEV=no
Samuel Cabrero [Wed, 8 Oct 2025 08:54:55 +0000 (10:54 +0200)] 
selftest/Samba3: nt4_dc* use vfs_default:VFS_OPEN_HOW_RESOLVE_NO_XDEV=no

From 076c22fbd7ecbf22dbfeb1711609f07fd42f88b0, we should always test the
code path without openat2 being available, even if the kernel supports it.

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 weeks agovfs: Use RESOLVE_NO_XDEV by default on all shares
Samuel Cabrero [Fri, 14 Feb 2025 16:13:39 +0000 (17:13 +0100)] 
vfs: Use RESOLVE_NO_XDEV by default on all shares

Enable the flag by default on all shares, it will be automatically
disabled if the system does not support openat2().

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 weeks agovfs: Bump VFS interface version after adding VFS_OPEN_HOW_RESOLVE_NO_XDEV
Samuel Cabrero [Wed, 8 Oct 2025 08:39:25 +0000 (10:39 +0200)] 
vfs: Bump VFS interface version after adding VFS_OPEN_HOW_RESOLVE_NO_XDEV

If a module was compiled with an older version it won't handle the new flag.

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 weeks agovfs: Add VFS_OPEN_HOW_RESOLVE_NO_XDEV flag
Samuel Cabrero [Fri, 14 Feb 2025 16:07:14 +0000 (17:07 +0100)] 
vfs: Add VFS_OPEN_HOW_RESOLVE_NO_XDEV flag

It disallows traversal of mount points during path resolution, including bind
mounts.

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 weeks agoci: Don't run on private rackspace runner
Volker Lendecke [Sun, 16 Nov 2025 14:53:19 +0000 (15:53 +0100)] 
ci: Don't run on private rackspace runner

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Nov 17 09:37:30 UTC 2025 on atb-devel-224

5 weeks agosmbd: Change open_rootdir_pathref_fsp() to return a smb_filename
Volker Lendecke [Wed, 10 Sep 2025 16:12:22 +0000 (18:12 +0200)] 
smbd: Change open_rootdir_pathref_fsp() to return a smb_filename

Simpler and safer to close in the caller, and
openat_pathref_fsp_rootdir() can use
openat_pathref_fsp_simple_openat(). De-duplicate some logic.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 weeks agosmbd: Factor out openat_pathref_fsp_simple_openat()
Volker Lendecke [Wed, 10 Sep 2025 16:03:39 +0000 (18:03 +0200)] 
smbd: Factor out openat_pathref_fsp_simple_openat()

open_rootdir_pathref_fsp() and openat_pathref_fsp_dot() serve very
similar purposes. Avoid code duplication, this is to be used in
open_rootdir_pathref_fsp() next.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 weeks agosmbd: Fix a comment
Volker Lendecke [Fri, 10 Oct 2025 13:51:14 +0000 (15:51 +0200)] 
smbd: Fix a comment

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 weeks agosmbd: Make fsp_set_gen_id() static
Volker Lendecke [Fri, 10 Oct 2025 13:50:56 +0000 (15:50 +0200)] 
smbd: Make fsp_set_gen_id() static

Only called from files.c

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 weeks agosmbd: Make fsp_new() return a files_struct
Volker Lendecke [Thu, 23 Oct 2025 18:11:35 +0000 (20:11 +0200)] 
smbd: Make fsp_new() return a files_struct

There's only the ENOMEM failure condition

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 weeks agosmbd: Make fsp_set_smb_fname() return bool
Volker Lendecke [Thu, 23 Oct 2025 18:00:08 +0000 (20:00 +0200)] 
smbd: Make fsp_set_smb_fname() return bool

There's only the ENOMEM failure condition

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 weeks agosmbd: Make fsp_attach_smb_fname() return bool
Volker Lendecke [Thu, 23 Oct 2025 17:47:09 +0000 (19:47 +0200)] 
smbd: Make fsp_attach_smb_fname() return bool

There's only the ENOMEM failure condition

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 weeks agosmbd: Make fsp_smb_fname_link() return bool
Volker Lendecke [Thu, 23 Oct 2025 17:38:16 +0000 (19:38 +0200)] 
smbd: Make fsp_smb_fname_link() return bool

There's only the ENOMEM failure condition

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 weeks agosmbd: Make file_name_hash() return bool
Volker Lendecke [Thu, 23 Oct 2025 17:27:13 +0000 (19:27 +0200)] 
smbd: Make file_name_hash() return bool

There's only the ENOMEM failure condition

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 weeks agoprinting: Fix coverity issue CID#1669074 (Unchecked return value)
Vinit Agnihotri [Fri, 14 Nov 2025 06:00:20 +0000 (11:30 +0530)] 
printing: Fix coverity issue CID#1669074 (Unchecked return value)

A new coverity issue (Unchecked return value) is flagged as a regression
due to commit#e9a7dce599e.
This could have been present prior to comit#e9a7dce599e, however got missed.

This change fixes this issue by checking return value.

Signed-off-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-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): Mon Nov 17 08:31:24 UTC 2025 on atb-devel-224

5 weeks agopython:tests: Take INTERDOMAIN_TRUST into account
Andreas Schneider [Tue, 11 Nov 2025 06:26:16 +0000 (07:26 +0100)] 
python:tests: Take INTERDOMAIN_TRUST into account

If we run e.g. fl2008rc2 env before we run this test, we have a trust account
for this domain.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Nov 14 19:23:38 UTC 2025 on atb-devel-224

5 weeks agopython:tests: Add debug output to test_query_filter_enum()
Andreas Schneider [Fri, 7 Nov 2025 12:23:34 +0000 (13:23 +0100)] 
python:tests: Add debug output to test_query_filter_enum()

This test runs relatively late in 'make test'. It finds some accounts which are
neither a computer nor a user account and complains that the overall account
count doesn't match.

Add some debug so we can find out more about the accounts.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 weeks agopython:tests: Use random users for domain_auth_silo.py
Andreas Schneider [Mon, 10 Nov 2025 10:11:28 +0000 (11:11 +0100)] 
python:tests: Use random users for domain_auth_silo.py

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 weeks agopython:tests: Use random users for user_auth_silo.py
Andreas Schneider [Mon, 10 Nov 2025 10:06:11 +0000 (11:06 +0100)] 
python:tests: Use random users for user_auth_silo.py

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 weeks agopython:tests: Use random users for user_auth_policy.py
Andreas Schneider [Mon, 10 Nov 2025 10:01:05 +0000 (11:01 +0100)] 
python:tests: Use random users for user_auth_policy.py

We should not work on alice, bob and joe. We should use random user so we can
clean up afterwards. If we don't do this the dbcheck tests will fails with:

UNEXPECTED(failure): samba4.blackbox.dbcheck(ad_dc).dbcheck(ad_dc:local)
REASON: Exception: Exception: Checking 21449 objects
WARNING: target DN is deleted for msDS-AssignedAuthNPolicy in object CN=alice,CN=Users,DC=addom,DC=samba,DC=example,DC=com - <GUID=66bd1f51-084f-4259-a769-efa59adb6e31>;<RMD_ADDTIM
E=134051822550000000>;<RMD_CHANGETIME=134051822550000000>;<RMD_FLAGS=1>;<RMD_INVOCID=b5064b02-c91e-40c0-bc1f-a92a0105a810>;<RMD_LOCAL_USN=14061>;<RMD_ORIGINATING_USN=14061>;<RMD_VE
RSION=2>;CN=User Policy,CN=AuthN Policies,CN=AuthN Policy Configuration,CN=Services,CN=Configuration,DC=addom,DC=samba,DC=example,DC=com
Target GUID points at deleted DN 'CN=User Policy\\0ADEL:66bd1f51-084f-4259-a769-efa59adb6e31,CN=Deleted Objects,CN=Configuration,DC=addom,DC=samba,DC=example,DC=com'
Not removing
WARNING: target DN is deleted for msDS-AssignedAuthNPolicySilo in object CN=alice,CN=Users,DC=addom,DC=samba,DC=example,DC=com - <GUID=287d6c3d-bea8-4c06-bdf8-7d4b579bc0e9>;<RMD_AD
DTIME=134051822560000000>;<RMD_CHANGETIME=134051822560000000>;<RMD_FLAGS=1>;<RMD_INVOCID=b5064b02-c91e-40c0-bc1f-a92a0105a810>;<RMD_LOCAL_USN=14081>;<RMD_ORIGINATING_USN=14081>;<RM
D_VERSION=2>;CN=Developers,CN=AuthN Silos,CN=AuthN Policy Configuration,CN=Services,CN=Configuration,DC=addom,DC=samba,DC=example,DC=com
Target GUID points at deleted DN 'CN=Developers\\0ADEL:287d6c3d-bea8-4c06-bdf8-7d4b579bc0e9,CN=Deleted Objects,CN=Configuration,DC=addom,DC=samba,DC=example,DC=com'
Not removing
WARNING: target DN is deleted for msDS-AssignedAuthNPolicy in object CN=bob,CN=Users,DC=addom,DC=samba,DC=example,DC=com - <GUID=66bd1f51-084f-4259-a769-efa59adb6e31>;<RMD_ADDTIME=
134051822550000000>;<RMD_CHANGETIME=134051822550000000>;<RMD_FLAGS=1>;<RMD_INVOCID=b5064b02-c91e-40c0-bc1f-a92a0105a810>;<RMD_LOCAL_USN=14065>;<RMD_ORIGINATING_USN=14065>;<RMD_VERS
ION=4>;CN=User Policy,CN=AuthN Policies,CN=AuthN Policy Configuration,CN=Services,CN=Configuration,DC=addom,DC=samba,DC=example,DC=com
Target GUID points at deleted DN 'CN=User Policy\\0ADEL:66bd1f51-084f-4259-a769-efa59adb6e31,CN=Deleted Objects,CN=Configuration,DC=addom,DC=samba,DC=example,DC=com'
Not removing
WARNING: target DN is deleted for msDS-AssignedAuthNPolicySilo in object CN=bob,CN=Users,DC=addom,DC=samba,DC=example,DC=com - <GUID=1a1e5cdf-b92e-4a80-bc35-cccad8e9f865>;<RMD_ADDT
IME=134051822560000000>;<RMD_CHANGETIME=134051822560000000>;<RMD_FLAGS=1>;<RMD_INVOCID=b5064b02-c91e-40c0-bc1f-a92a0105a810>;<RMD_LOCAL_USN=14085>;<RMD_ORIGINATING_USN=14085>;<RMD_
VERSION=4>;CN=QA,CN=AuthN Silos,CN=AuthN Policy Configuration,CN=Services,CN=Configuration,DC=addom,DC=samba,DC=example,DC=com
Target GUID points at deleted DN 'CN=QA\\0ADEL:1a1e5cdf-b92e-4a80-bc35-cccad8e9f865,CN=Deleted Objects,CN=Configuration,DC=addom,DC=samba,DC=example,DC=com'
Not removing
Checked 21449 objects (4 errors)

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 weeks agoselftest: Create libdir in setup_clusteredmember()
Andreas Schneider [Mon, 10 Nov 2025 14:49:59 +0000 (15:49 +0100)] 
selftest: Create libdir in setup_clusteredmember()

This fixes:

can't open st/clusteredmember/lib/krb5.conf at selftest/target/Samba.pm line 328.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 weeks agoselftest: Add blackbox claims test to knownfail_mit_kdc
Andreas Schneider [Mon, 10 Nov 2025 09:40:52 +0000 (10:40 +0100)] 
selftest: Add blackbox claims test to knownfail_mit_kdc

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 weeks agobootstrap: Remove libtracker-sparql-2
Andreas Schneider [Tue, 11 Nov 2025 10:48:10 +0000 (11:48 +0100)] 
bootstrap: Remove libtracker-sparql-2

This is not used anymore.

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): Fri Nov 14 16:34:48 UTC 2025 on atb-devel-224

5 weeks agos3:mdssvc: Remove support for tracker sparql support
Andreas Schneider [Tue, 11 Nov 2025 10:45:23 +0000 (11:45 +0100)] 
s3:mdssvc: Remove support for tracker sparql support

This only support v2 of tracker sparql which is only avilable on the Ubuntu
20.04 runner. All newer distributions provide only tracker sparql v3.

Also the tevent glib stopped working on Fedora 43.

Time to remove it.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 weeks agodocs-xml: Improve the samba-bgqd manpage
Andreas Schneider [Thu, 23 Oct 2025 09:00:38 +0000 (11:00 +0200)] 
docs-xml: Improve the samba-bgqd manpage

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Nov 14 15:05:11 UTC 2025 on atb-devel-224

5 weeks agos3:printing: Load the shares for [printers] in samba-bgqd
Andreas Schneider [Thu, 23 Oct 2025 08:49:31 +0000 (10:49 +0200)] 
s3:printing: Load the shares for [printers] in samba-bgqd

One of the main functions of bgqd is:

        delete_and_reload_printers_full()

It isn't able to do its work, if we don't load the shares. Normally bgqd was
forked from smbd and this loaded the shares. But with the introduction of
samba-dcerpcd it is a standalone service now. As a standalone service it is
responsible to load the shares if it needs to work on them.

The following message is printed if delete_and_reload_printers_full() tries to
do its job:

[2025/10/23 09:57:27,  7, pid=41935, effective(0, 0), real(0, 0)] ../../source3/param/loadparm.c:4419(lp_servicenumber)
  lp_servicenumber: couldn't find printers
[2025/10/23 09:57:27,  7, pid=41935, effective(0, 0), real(0, 0)] ../../source3/param/loadparm.c:4419(lp_servicenumber)
  lp_servicenumber: couldn't find printers

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agos3:smbd: Fix segfault in smb2_reply
Andreas Schneider [Fri, 14 Nov 2025 09:59:19 +0000 (10:59 +0100)] 
s3:smbd: Fix segfault in smb2_reply

This is triggered by: make test TESTS="samba3.smb2.streams.simpleserver

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

Pair-Programmed-With: Ralph Boehme <slow@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Ralph Boehme <slow@samba.org>
6 weeks agos4:kdc always include the PAC
Gary Lockyer [Mon, 20 Oct 2025 00:03:31 +0000 (13:03 +1300)] 
s4:kdc always include the PAC

Set the heimdal always_include_pac configuration flag, based on the samba
kdc always include pac option

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Thu Nov 13 23:12:55 UTC 2025 on atb-devel-224

6 weeks agos4:kdc:tests: support "kdc always generate pac"
Gary Lockyer [Thu, 30 Oct 2025 19:31:33 +0000 (08:31 +1300)] 
s4:kdc:tests: support "kdc always generate pac"

Update the tests to check the "kdc always generate pac" configuration and
expect the presence of a PAC accordingly.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
6 weeks agos4:kdc:test add tgs tests to fl2008r2dc env
Gary Lockyer [Thu, 30 Oct 2025 19:38:08 +0000 (08:38 +1300)] 
s4:kdc:test add tgs tests to fl2008r2dc env

Add kdc_tgs tests to the fl2008r2dc test environment, to ensure that they are
run with "kdc always generate pac" set to no

Note: This required updating known_fail_mit/kdc_tgs to handle the
      expected failures for the fl2008r2dc environment when run against
      the MIT kdc

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
6 weeks agoselftest:fl2008r2dc set "kdc always generate pac"" to no
Gary Lockyer [Thu, 30 Oct 2025 19:36:50 +0000 (08:36 +1300)] 
selftest:fl2008r2dc set "kdc always generate pac"" to no

Set the new configuration option "kdc always generate pac" to "no" in the
fl2008r2dc test environment

This will ensure that kdc will be run with the option set to "no", the default
is "yes".

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
6 weeks agoconfig: add kdc always include pac
Gary Lockyer [Mon, 20 Oct 2025 00:01:14 +0000 (13:01 +1300)] 
config: add kdc always include pac

This option over-rides the PA-PAC-REQUEST received from the client.  When
enabled (the default) a PAC will always be included in the response.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
6 weeks agothird_party:heimdal: import lorikeet-heimdal-202510192136
Gary Lockyer [Sun, 19 Oct 2025 22:44:26 +0000 (11:44 +1300)] 
third_party:heimdal: import lorikeet-heimdal-202510192136

(commit 041c5049eb0e97edaa422ec240ccfe7380667190)

Add a new flag always_include_pac to the krb5_kdc_configuration.

If set this over-rides the PA-PAC-REQUEST and the PAC is always included in
the response.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
6 weeks agoprinting: Fix use of time_t CID#1509005
Vinit Agnihotri [Tue, 16 Sep 2025 06:00:57 +0000 (11:30 +0530)] 
printing: Fix use of time_t CID#1509005

 - This Fixes coverity issue Y2K38_SAFTY in print_queue_update(),
   with use of fetch/store_share_cache_time helper function.
 - Additional changes: Use helper functions fetch/store_share_cache_time for tdb
   key==MSG_PENDING for print_cache_expired()

Signed-off-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-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): Wed Nov 12 16:04:43 UTC 2025 on atb-devel-224

6 weeks agoprinting: Fix use of time_t CID#1509036
Vinit Agnihotri [Mon, 15 Sep 2025 12:11:52 +0000 (17:41 +0530)] 
printing: Fix use of time_t CID#1509036

 - Use format specifier 'D' for time_t
 - This fixes covery reported issue Y2K38_SAFTY for pjob_store()

Signed-off-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
6 weeks agoprinting: Fix use of time_t CID#1508987
Vinit Agnihotri [Mon, 15 Sep 2025 13:08:32 +0000 (18:38 +0530)] 
printing: Fix use of time_t CID#1508987

 - This fixes coverity issue Y2K38_SAFTY for print_update_queue_internal()

Signed-off-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
6 weeks agoprinting: Define and use methods to fetch/store time in share cache
Vinit Agnihotri [Tue, 16 Sep 2025 05:03:50 +0000 (10:33 +0530)] 
printing: Define and use methods to fetch/store time in share cache

Signed-off-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
6 weeks agoprinting: Update version for print database
Vinit Agnihotri [Tue, 16 Sep 2025 08:55:40 +0000 (14:25 +0530)] 
printing: Update version for print database

Updating version to change time_t related store/fetch from exisiting
uint32_t values to time_t (64-bit) values.

Signed-off-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
6 weeks agolib:util: Add APIs for fetch/store int64/uint64 values to/from tdb
Vinit Agnihotri [Wed, 24 Sep 2025 07:14:07 +0000 (12:44 +0530)] 
lib:util: Add APIs for fetch/store int64/uint64 values to/from tdb

Signed-off-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
6 weeks agos3:lib:util_tdb: Add format identifier for 64-bit integer pack/unpack
Vinit Agnihotri [Wed, 24 Sep 2025 06:19:15 +0000 (11:49 +0530)] 
s3:lib:util_tdb: Add format identifier for 64-bit integer pack/unpack

Signed-off-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
6 weeks agolib:replace: Remove memset_s()
Andreas Schneider [Thu, 16 Oct 2025 09:22:46 +0000 (11:22 +0200)] 
lib:replace: Remove memset_s()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Nov 11 14:51:45 UTC 2025 on atb-devel-224

6 weeks agoReplace memset_s() with memset_explicit()
Andreas Schneider [Thu, 16 Oct 2025 09:19:51 +0000 (11:19 +0200)] 
Replace memset_s() with memset_explicit()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 weeks agolib:replace: Add test for memset_explicit()
Douglas Bagnall [Thu, 30 Oct 2025 15:01:36 +0000 (16:01 +0100)] 
lib:replace: Add test for memset_explicit()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 weeks agolib:replace: Implement memset_explicit()
Andreas Schneider [Thu, 16 Oct 2025 09:06:56 +0000 (11:06 +0200)] 
lib:replace: Implement memset_explicit()

The memset_s() implementation is a bit obscure, as it requires a
constraint handler to be set up. You don't really find any
implmentations out there.

With C23 memset_explicit() was added and this has been implemented
for glibc 2.43 and also in FreeBSD.

See https://sourceware.org/bugzilla/show_bug.cgi?id=32378
See https://reviews.freebsd.org/D47286

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 weeks agolib:replace: Remove trailing spaces in README
Andreas Schneider [Thu, 16 Oct 2025 09:09:29 +0000 (11:09 +0200)] 
lib:replace: Remove trailing spaces in README

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 weeks agolib: Introduce cp_smb_basename() helper function
Volker Lendecke [Sat, 8 Nov 2025 09:37:55 +0000 (10:37 +0100)] 
lib: Introduce cp_smb_basename() helper function

I always had to look up the sequence of NULLs and 0s. Save lines.

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): Mon Nov 10 14:33:28 UTC 2025 on atb-devel-224

6 weeks agosmbd: Move file_fsp() to smb1_utils.c
Volker Lendecke [Thu, 23 Oct 2025 15:18:16 +0000 (17:18 +0200)] 
smbd: Move file_fsp() to smb1_utils.c

16-bit file ids are a smb1 thing

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
6 weeks agodfs_server: Modernize DEBUGs
Volker Lendecke [Mon, 20 Oct 2025 18:24:06 +0000 (20:24 +0200)] 
dfs_server: Modernize DEBUGs

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