]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
7 weeks agoWHATSNEW: Add release notes for Samba 4.23.0rc4.
Jule Anger [Fri, 5 Sep 2025 11:03:05 +0000 (13:03 +0200)] 
WHATSNEW: Add release notes for Samba 4.23.0rc4.

Signed-off-by: Jule Anger <janger@samba.org>
7 weeks agos3:net: fix "net ads group"
MikeLiu [Fri, 29 Aug 2025 09:31:36 +0000 (17:31 +0800)] 
s3:net: fix "net ads group"

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

Signed-off-by: MikeLiu <mikeliu@qnap.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Sep  4 09:33:27 UTC 2025 on atb-devel-224

(cherry picked from commit 8738fa1cc42d913e3ab2b54fe1e75ca4da37073f)

Autobuild-User(v4-23-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-23-test): Fri Sep  5 09:20:08 UTC 2025 on atb-devel-224

7 weeks agokrb5: handle GSS-Proxy credentials lifetime
Alexander Bokovoy [Tue, 2 Sep 2025 07:36:11 +0000 (10:36 +0300)] 
krb5: handle GSS-Proxy credentials lifetime

GSS-Proxy stores its credential in encrypted form in the Kerberos ccache
with a start and end time of 0 and a server principal in the realm named
'X-GSSPROXY:'. This credential is accessed through GSS-Proxy interposer
mechanism in MIT Kerberos and cannot be analysed with raw krb5 API.

As MIT Kerberos has no krb5_cc_get_lifetime() implementation, add check
for the GSS-Proxy credential to smb_krb5_cc_get_lifetime() wrapper to
return KRB5_PLUGIN_NO_HANDLE. The two places where
smb_krb5_cc_get_lifetime() is used then handle this return code to avoid
deciding on the 'expired' lifetime to cause a kinit.

This fixes FreeIPA use case where an IPA API endpoint uses Samba Python
bindings with a GSS-Proxy-controlled credential cache.

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

Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org>
Autobuild-Date(master): Wed Sep  3 10:15:50 UTC 2025 on atb-devel-224

(cherry picked from commit c00b98ad840706cda222bb610d0d4860b98c72d4)

8 weeks agoVERSION: Bump version up to Samba 4.23.0rc4...
Jule Anger [Fri, 29 Aug 2025 12:09:05 +0000 (14:09 +0200)] 
VERSION: Bump version up to Samba 4.23.0rc4...

and re-enable GIT_SNAPSHOT.

Signed-off-by: Jule Anger <janger@samba.org>
8 weeks agoVERSION: Disable GIT_SNAPSHOT for the 4.23.0rc3 release. samba-4.23.0rc3
Jule Anger [Fri, 29 Aug 2025 12:08:48 +0000 (14:08 +0200)] 
VERSION: Disable GIT_SNAPSHOT for the 4.23.0rc3 release.

Signed-off-by: Jule Anger <janger@samba.org>
8 weeks agoWHATSNEW: Add release notes for Samba 4.23.0rc3.
Jule Anger [Fri, 29 Aug 2025 12:07:49 +0000 (14:07 +0200)] 
WHATSNEW: Add release notes for Samba 4.23.0rc3.

Signed-off-by: Jule Anger <janger@samba.org>
2 months agoWHATSNEW: unify format
Jule Anger [Thu, 28 Aug 2025 08:26:05 +0000 (10:26 +0200)] 
WHATSNEW: unify format

Signed-off-by: Jule Anger <janger@samba.org>
Autobuild-User(v4-23-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-23-test): Thu Aug 28 10:39:47 UTC 2025 on atb-devel-224

2 months agoWHATSNEW: add Initial version of smb_prometheus_endpoint
Jule Anger [Thu, 28 Aug 2025 08:22:49 +0000 (10:22 +0200)] 
WHATSNEW: add Initial version of smb_prometheus_endpoint

Signed-off-by: Ralph Boehme <slow@samba.org>
2 months agoWHATSNEW: add Modern write time update logic
Jule Anger [Thu, 28 Aug 2025 08:21:49 +0000 (10:21 +0200)] 
WHATSNEW: add Modern write time update logic

Signed-off-by: Ralph Boehme <slow@samba.org>
2 months agoWHATSNEW: add SMB3 Unix Extensions
Jule Anger [Thu, 28 Aug 2025 08:20:32 +0000 (10:20 +0200)] 
WHATSNEW: add SMB3 Unix Extensions

Signed-off-by: Ralph Boehme <slow@samba.org>
2 months agoWHATSNEW: add support for SMB3 over QUIC
Jule Anger [Thu, 28 Aug 2025 08:18:01 +0000 (10:18 +0200)] 
WHATSNEW: add support for SMB3 over QUIC

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2 months agos4:lib/tls: add additional dns hostnames as GNUTLS_SAN_DNSNAME for self-signed certif...
Stefan Metzmacher [Tue, 26 Aug 2025 13:22:10 +0000 (15:22 +0200)] 
s4:lib/tls: add additional dns hostnames as GNUTLS_SAN_DNSNAME for self-signed certificates

It's better to include X509v3 Subject Alternative Name with
DNS names also for additional dns hostnames.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Aug 26 22:00:26 UTC 2025 on atb-devel-224

(cherry picked from commit 499656a05011a462b2e44faea7318a02c847de5e)

2 months agos4:lib/tls: set GNUTLS_SAN_DNSNAME for self-signed certificates
Stefan Metzmacher [Tue, 26 Aug 2025 09:55:40 +0000 (11:55 +0200)] 
s4:lib/tls: set GNUTLS_SAN_DNSNAME for self-signed certificates

It's better to include X509v3 Subject Alternative Name with
DNS names in the self-signed certificate...

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 49e179963f56e749dac4e20284dc567e382ccdb2)

2 months agos4:lib/tls: let tstream_tls_params_server_lpcfg() use lpcfg_dns_hostname() internally
Stefan Metzmacher [Tue, 26 Aug 2025 09:22:43 +0000 (11:22 +0200)] 
s4:lib/tls: let tstream_tls_params_server_lpcfg() use lpcfg_dns_hostname() internally

This is simpler and the next step will also make use of
lpcfg_additional_dns_hostnames() too...

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 6116bc64961fb2330df5ff4256b4ef75dca08cf0)

2 months agoauth:creds: Update the documentation for set_principal and set_realm
Andreas Schneider [Wed, 6 Aug 2025 05:54:52 +0000 (07:54 +0200)] 
auth:creds: Update the documentation for set_principal and set_realm

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Alexander Bokovoy <ab@samba.org>
Autobuild-Date(master): Mon Aug 25 12:08:22 UTC 2025 on atb-devel-224

(cherry picked from commit 7a19fde92605a3a3699998fb226e3e787de0b5ca)

2 months agoauth:creds: Make sure to uppercase the realm of a principal
Andreas Schneider [Wed, 6 Aug 2025 14:33:21 +0000 (16:33 +0200)] 
auth:creds: Make sure to uppercase the realm of a principal

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
(cherry picked from commit 5879410caf9303a378f3d90365e60928a735e65a)

2 months agoauth:creds: Validate realm names in set_realm and set_principal
Andreas Schneider [Tue, 5 Aug 2025 13:25:54 +0000 (15:25 +0200)] 
auth:creds: Validate realm names in set_realm and set_principal

See also
https://web.mit.edu/kerberos/krb5-latest/doc/admin/realm_config.html#realm-name

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
(cherry picked from commit e848671f34f969634d55eb7b846d70e6334034ae)

2 months agos3:utils: Keep password secret in ntlm_auth get_password()
Andreas Schneider [Thu, 7 Aug 2025 11:48:26 +0000 (13:48 +0200)] 
s3:utils: Keep password secret in ntlm_auth get_password()

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
(cherry picked from commit f86739e3abd63ba0b7ba632d796968fec9fa2f8f)

2 months agoauth:creds: Keep password secret in cmdline_get_userpassword()
Andreas Schneider [Thu, 7 Aug 2025 11:48:04 +0000 (13:48 +0200)] 
auth:creds: Keep password secret in cmdline_get_userpassword()

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
(cherry picked from commit 34482f4ad014a09c84b484097a8d03dfec4f6512)

2 months agoauth:creds: Keep the password secret
Andreas Schneider [Thu, 7 Aug 2025 11:45:48 +0000 (13:45 +0200)] 
auth:creds: Keep the password secret

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
(cherry picked from commit 705db6c8b295f65f40b7dcd0d5dc0f6db901c8d7)

2 months agoauth:creds: Allow to reset the principal by passing NULL to set_principal
Andreas Schneider [Wed, 6 Aug 2025 12:42:51 +0000 (14:42 +0200)] 
auth:creds: Allow to reset the principal by passing NULL to set_principal

We do that e.g. in cli_credentials_set_anonymous()

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
(cherry picked from commit 67c2feba290764c62ab01602d5bc9d4d122c2c12)

2 months agoauth:creds: Also uppercase realm set via a callback
Andreas Schneider [Thu, 7 Aug 2025 11:32:47 +0000 (13:32 +0200)] 
auth:creds: Also uppercase realm set via a callback

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
(cherry picked from commit 4f8ff3a567d6318c71b0960345592224721c9594)

2 months agoauth:creds: Allow to reset the realm by passing NULL
Andreas Schneider [Wed, 6 Aug 2025 12:40:34 +0000 (14:40 +0200)] 
auth:creds: Allow to reset the realm by passing NULL

This is e.g. done by cli_credentials_set_anonymous().

We can't call TALLOC_FREE(cred->realm), as this would break
cli_credentials_shallow_copy().

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
(cherry picked from commit e5608cdb2e5a7ef2641ec0e7b0ce0b4640a02ce1)

2 months agosmbd: return correct reparse tag DFS when listing directories
Ralph Boehme [Fri, 15 Aug 2025 08:13:33 +0000 (10:13 +0200)] 
smbd: return correct reparse tag DFS when listing directories

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

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 Aug 15 15:37:05 UTC 2025 on atb-devel-224

(cherry picked from commit 0be53d7ac0a39d6a48c6c5e2144f342c0d406781)

2 months agoCI: add Python test samba.tests.dcerpc.dfs.DfsTests.test_dfs_reparse_tag
Ralph Boehme [Thu, 14 Aug 2025 15:18:08 +0000 (17:18 +0200)] 
CI: add Python test samba.tests.dcerpc.dfs.DfsTests.test_dfs_reparse_tag

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 43ee86c0c757e95712ed52bd336d2085485498ba)

2 months agopython/tests: also populate self.server in calls LibsmbTests setup()
Ralph Boehme [Fri, 15 Aug 2025 09:49:27 +0000 (11:49 +0200)] 
python/tests: also populate self.server in calls LibsmbTests setup()

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 5f7b31927733b0ff3e1207be242f1ddb2cb699bd)

2 months agopylibsmb: add SMB2_FIND_ID_BOTH_DIRECTORY_INFO
Ralph Boehme [Fri, 15 Aug 2025 08:14:53 +0000 (10:14 +0200)] 
pylibsmb: add SMB2_FIND_ID_BOTH_DIRECTORY_INFO

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 698a0195f72a091e9ed6b0448160c79e37761840)

2 months agovfs_xattr_tdb: fix dangling symlink detection
Ralph Boehme [Fri, 15 Aug 2025 09:50:26 +0000 (11:50 +0200)] 
vfs_xattr_tdb: fix dangling symlink detection

The caller might not have called stat on smb_fname.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 2e88ba4b4de146327c19682d59bbe34d68158bf7)

2 months agos3/rpc_server/dfs: fix creating a DFS link
Ralph Boehme [Thu, 14 Aug 2025 17:20:02 +0000 (19:20 +0200)] 
s3/rpc_server/dfs: fix creating a DFS link

If there's no existing link, get_referred_path() returns NT_STATUS_OBJECT_PATH_NOT_FOUND.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 2cb2991ccdd5d4f63e4c5b3ccc4454a6b39d6afe)

2 months agoVERSION: Bump version up to Samba 4.23.0rc3...
Jule Anger [Fri, 22 Aug 2025 15:31:25 +0000 (17:31 +0200)] 
VERSION: Bump version up to Samba 4.23.0rc3...

and re-enable GIT_SNAPSHOT.

Signed-off-by: Jule Anger <janger@samba.org>
2 months agoVERSION: Disable GIT_SNAPSHOT for the 4.23.0rc2 release. samba-4.23.0rc2
Jule Anger [Fri, 22 Aug 2025 15:30:46 +0000 (17:30 +0200)] 
VERSION: Disable GIT_SNAPSHOT for the 4.23.0rc2 release.

Signed-off-by: Jule Anger <janger@samba.org>
2 months agoWHATSNEW: Add release notes for Samba 4.23.0rc2.
Jule Anger [Fri, 22 Aug 2025 15:30:02 +0000 (17:30 +0200)] 
WHATSNEW: Add release notes for Samba 4.23.0rc2.

Signed-off-by: Jule Anger <janger@samba.org>
2 months agoWHATSNEW: samba-tool domain backup --no-secrets changes
Douglas Bagnall [Wed, 20 Aug 2025 00:18:53 +0000 (12:18 +1200)] 
WHATSNEW: samba-tool domain backup --no-secrets changes

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 months agothird_party:quic_ko_wrapper Fix compilation with clang-20
Gary Lockyer [Thu, 14 Aug 2025 21:38:07 +0000 (09:38 +1200)] 
third_party:quic_ko_wrapper Fix compilation with clang-20

Rework the code to remove the non portable variable length array in the union.
Based on the code in wrap_msghdr_add_cmsghdr().

NOTE: this removes the 64 bit alignment, which I think should be ok.

./../third_party/quic_ko_wrapper/quic_ko_wrapper.c:3523:11: error:
   fields must have a constant size: 'variable length array in structure'
   extension will never be supported
  3523 |                 uint8_t cmbuf[cmspace];
       |                         ^
1 error generated.

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

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Björn Baumbach <bb@sernet.de>
Autobuild-Date(master): Wed Aug 20 15:04:34 UTC 2025 on atb-devel-224

(cherry picked from commit 26065e1f1ee111f5ddfb64782638492af65aeb95)

Autobuild-User(v4-23-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-23-test): Fri Aug 22 13:11:45 UTC 2025 on atb-devel-224

2 months agothird_party:quic Fix compilation with clang-20
Gary Lockyer [Thu, 14 Aug 2025 21:33:24 +0000 (09:33 +1200)] 
third_party:quic Fix compilation with clang-20

Add -Wno-error=format-nonliteral so that quic builds with clang 20

../../third_party/quic/libquic/handshake.c:106:35: error:
   format string is not a string literal [-Werror,-Wformat-nonliteral]
  106 |         rc = vsnprintf(msg, sizeof(msg), fmt, arg);
      |                                          ^~~
../../third_party/quic/libquic/handshake.c:135:35: error:
   format string is not a string literal [-Werror,-Wformat-nonliteral]
  135 |         rc = vsnprintf(msg, sizeof(msg), fmt, arg);
      |                                          ^~~
../../third_party/quic/libquic/handshake.c:164:35: error:
   format string is not a string literal [-Werror,-Wformat-nonliteral]
  164 |         rc = vsnprintf(msg, sizeof(msg), fmt, arg);
      |                                          ^~~

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

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit de7932ea8d12348208f50f7b050b826d236ea597)

2 months agothird_party: fix libquic build on older systems
Björn Baumbach [Fri, 8 Aug 2025 15:31:34 +0000 (17:31 +0200)] 
third_party: fix libquic build on older systems

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

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Björn Baumbach <bb@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 149933854f39b4628b14abc5dcd57e73e2a0a637)

2 months agolibads: change netlogon_pings() behaviour wrt to min_servers parameter
Ralph Boehme [Thu, 24 Jul 2025 10:59:30 +0000 (12:59 +0200)] 
libads: change netlogon_pings() behaviour wrt to min_servers parameter

Currently if a caller passes min_servers=X with X>1, netlogon_pings() will fail
if it can't contact X DCs. This is not really what we want. What we want is: we
want at least one DC, and up to X.

Change implemenentation in that sense and rename the min_servers argument to
wanted_servers to express this behaviour change.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Aug 13 19:31:10 UTC 2025 on atb-devel-224

(cherry picked from commit 85dd55a5fef0049660126bdcd48abfa1c48da259)

2 months agolibads: reverse termination condition in netlogon_pings_done()
Ralph Boehme [Thu, 24 Jul 2025 10:55:30 +0000 (12:55 +0200)] 
libads: reverse termination condition in netlogon_pings_done()

No change in behaviour, prepares for upcoming change and minimizes its diff.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit 6643d1fb3375903e2857e5bff33b39a4562c5a4d)

2 months agoidmap_ad: add and use ldap_timeout and fix LDAP server failover
Ralph Boehme [Thu, 24 Jul 2025 13:49:19 +0000 (15:49 +0200)] 
idmap_ad: add and use ldap_timeout and fix LDAP server failover

The key parts are:

1. If an LDAP search fails with the hardcoded fatal error, remove the
retry. That would only retry the query against the same server, taken
from the DCINFO cache key. Instead, force a DC rediscovery.

2. Set a default ldap_timeout and pass it to tldap_search(). This
avoids tldap_search() hanging forever on a stale TCP connection.

3. The LDAP server idmap_ad is using is not necessarily the same DC
we're using for RPC, so in case we learn about a dead DC, put it in
the negative-conn-cache.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit 4d69ec473b7be763399c9787eda8e659a1582184)

2 months agotldap: use tevent_req_set_endtime() to terminate LDAP searches
Ralph Boehme [Mon, 21 Jul 2025 04:44:22 +0000 (06:44 +0200)] 
tldap: use tevent_req_set_endtime() to terminate LDAP searches

Needed to detect unresponsive LDAP servers, otherwise we might be sitting up to
924.6 seconds after sending a request before the kernel notifies us of a broken
connection.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit 4e79fe13325385ef4fe37baeec8656c9b332de19)

2 months agowinbindd: use find_domain_from_name_noinit() in find_dns_domain_name()
Ralph Boehme [Tue, 22 Jul 2025 17:16:14 +0000 (19:16 +0200)] 
winbindd: use find_domain_from_name_noinit() in find_dns_domain_name()

Avoid triggering a connection to a DC of a trusted domain.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit 9ad2e59a464bb472da2071c61a254547b6497625)

2 months agolibads: fix get_kdc_ip_string()
Ralph Boehme [Tue, 22 Jul 2025 17:22:31 +0000 (19:22 +0200)] 
libads: fix get_kdc_ip_string()

Correctly handle the interaction between optionally passed in DC via
pss and DC lookup.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit 23f100f67c0586a940e91e9e1e6f42b804401322)

2 months agoWHATSNEW: add Per-share profiling stats
Jule Anger [Wed, 13 Aug 2025 09:01:00 +0000 (11:01 +0200)] 
WHATSNEW: add Per-share profiling stats

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
2 months agoWHATSNEW: add CTDB changes
Jule Anger [Mon, 11 Aug 2025 06:52:10 +0000 (08:52 +0200)] 
WHATSNEW: add CTDB changes

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
2 months agoVERSION: Bump version up to Samba 4.23.0rc2...
Jule Anger [Thu, 7 Aug 2025 15:03:47 +0000 (17:03 +0200)] 
VERSION: Bump version up to Samba 4.23.0rc2...

and re-enable GIT_SNAPSHOT.

Signed-off-by: Jule Anger <janger@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agoVERSION: Disable GIT_SNAPSHOT for the Samba 4.23.0rc1 release. samba-4.23.0rc1
Jule Anger [Thu, 7 Aug 2025 11:33:08 +0000 (13:33 +0200)] 
VERSION: Disable GIT_SNAPSHOT for the Samba 4.23.0rc1 release.

Signed-off-by: Jule Anger <janger@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agoWHATSNEW: Up to Samba 4.23.0rc1.
Jule Anger [Thu, 7 Aug 2025 11:32:00 +0000 (13:32 +0200)] 
WHATSNEW: Up to Samba 4.23.0rc1.

Signed-off-by: Jule Anger <janger@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agoWHATSNEW: add smb.conf changes and titles for new features
Jule Anger [Thu, 7 Aug 2025 12:25:15 +0000 (14:25 +0200)] 
WHATSNEW: add smb.conf changes and titles for new features

Signed-off-by: Jule Anger <janger@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agotevent: version 0.17.1 tevent-0.17.1
Jule Anger [Thu, 7 Aug 2025 10:01:59 +0000 (12:01 +0200)] 
tevent: version 0.17.1

* Coverity checks:
    Fix 1649525 Use of 32-bit time_t
    Fix Coverity ID 1649524 Dereference before null check
    Fix Coverity ID 1649526 Dereference before null check

Signed-off-by: Jule Anger <janger@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agotdb: version 1.4.14 tdb-1.4.14
Jule Anger [Thu, 7 Aug 2025 10:01:48 +0000 (12:01 +0200)] 
tdb: version 1.4.14

* let tdbtool return error on failure (BUG 15890)

Signed-off-by: Jule Anger <janger@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agos3:passdb: Fix CIDs 1596750,1596751 uninitialized pointer read
Michael Adam [Wed, 6 Aug 2025 09:27:48 +0000 (11:27 +0200)] 
s3:passdb: Fix CIDs 1596750,1596751 uninitialized pointer read

This fixes two coverity issues of type

CID 1596750 - uninitialized pointer read
CID 1596751 - uninitialized pointer read

 It fixes one occurrence in each of
pdb_samba_dsdb_create_user and pdb_samba_dsdb_create_alias

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Rabinarayan Panigrahi <rapanigr@redhat.com>
Reviewed-by: Shachar Sharon <ssharon@redhat.com>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Thu Aug  7 11:20:25 UTC 2025 on atb-devel-224

2 months agolibcli/security: use talloc_free at the end of sub-tests
Rabinarayan Panigrahi [Sun, 3 Aug 2025 14:44:17 +0000 (20:14 +0530)] 
libcli/security: use talloc_free at the end of sub-tests

Memory should be free by talloc_free() if it is allocated using talloc_new()

Signed-off-by: Rabinarayan Panigrahi <rapanigr@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Thu Aug  7 09:02:29 UTC 2025 on atb-devel-224

2 months agoctdb: Fix a stuck cluster lock holder after a delayed leader bcast
Volker Lendecke [Wed, 6 Aug 2025 13:28:29 +0000 (15:28 +0200)] 
ctdb: Fix a stuck cluster lock holder after a delayed leader bcast

If a delayed broadcast by a previous cluster lock holder arrives, the
new legitimate leader will accept this without questioning in
leader_handler(). Without this patch rec->leader will never be
overwritten, and because rec->pnn != rec->leader we'll also never send
out fresh leader broadcasts. And because we hold the cluster lock,
nobody else can step up.

Fix this in the next round of leader broadcast timeout.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=15892
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): Thu Aug  7 02:59:20 UTC 2025 on atb-devel-224

2 months agolibrpc:ndr:keycredlink don't require that kmi be a talloc_context
Gary Lockyer [Wed, 6 Aug 2025 01:03:30 +0000 (13:03 +1200)] 
librpc:ndr:keycredlink don't require that kmi be a talloc_context

This prevents fuzzing of ndr_pull_KeyMaterialInternal which we want. So instead
allocate against the ndr talloc context, then the callers can talloc_steal,
memcpy the data as appropriate.

 5 abort
 6 talloc_abort samba/lib/talloc/talloc.c:506:3
 7 talloc_chunk_from_ptr samba/lib/talloc/talloc.c:0
 8 __talloc_with_prefix samba/lib/talloc/talloc.c:762:12
 9 __talloc samba/lib/talloc/talloc.c:825:9
10 _talloc_named_const samba/lib/talloc/talloc.c:982:8
11 _talloc_memdup samba/lib/talloc/talloc.c:2441:9
12 data_blob_talloc_named samba/lib/util/data_blob.c:56:25
13 pull_BCRYPT_RSAPUBLIC_BLOB samba/librpc/ndr/ndr_keycredlink.c:878:17
14 ndr_pull_KeyMaterialInternal samba/librpc/ndr/ndr_keycredlink.c:959:10
15 LLVMFuzzerTestOneInput samba/bin/default/lib/fuzzing/
               fuzz_ndr_keycredlink_TYPE_STRUCT.c:282:13

REF: https://issues.oss-fuzz.com/issues/435760432

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 Aug  6 05:10:43 UTC 2025 on atb-devel-224

2 months agos4:kdc:db-glue talloc steal pub_key data
Gary Lockyer [Wed, 6 Aug 2025 01:00:32 +0000 (13:00 +1200)] 
s4:kdc:db-glue talloc steal pub_key data

talloc_steal the data pointers of pub_key, modulus and exponent onto pub_key.
To allow fuzz testing of ndr_pull_KeyMaterialInternal the KeyMaterialInternal
struct may not be a talloc_context.  So the data portions will be allocated on
the ndr context.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 months agolibrpc:ndr:keycredlink clean up includes
Gary Lockyer [Wed, 6 Aug 2025 00:58:45 +0000 (12:58 +1200)] 
librpc:ndr:keycredlink clean up includes

Remove redundant and unused includes from librpc/ndr/ndr_keycredlink.c

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 months agodocs: document serverid command
Ralph Boehme [Fri, 11 Jul 2025 12:29:38 +0000 (14:29 +0200)] 
docs: document serverid command

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Aug  5 16:03:56 UTC 2025 on atb-devel-224

2 months agonet: add `net tdb smbXsrv wipedbs` alias for `net serverid wipedbs`
Ralph Boehme [Sun, 29 Jun 2025 16:04:41 +0000 (18:04 +0200)] 
net: add `net tdb smbXsrv wipedbs` alias for `net serverid wipedbs`

`net serverid` is imho not the right place for the wipedbs functionality. Add
it as an alias to `net tdb`. It works pretty opaque and unless you run

 # net tdb smbXsrv wipedbs --help
 Usage:
 net serverid wipedbs [--test] [--verbose]
 Example:
 net serverid wipedbs -v

the use won't notice it is an alias.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agonet: handle replay records in `net serverid wipedbs`
Ralph Boehme [Sat, 26 Jul 2025 13:27:41 +0000 (15:27 +0200)] 
net: handle replay records in `net serverid wipedbs`

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agosmbd: return replay-cache records in smbXsrv_open_global_traverse()
Ralph Boehme [Fri, 11 Jul 2025 04:30:15 +0000 (06:30 +0200)] 
smbd: return replay-cache records in smbXsrv_open_global_traverse()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agosmbd: reformat smbXsrv_open_global_traverse() function pointer args
Ralph Boehme [Tue, 17 Jun 2025 14:13:52 +0000 (16:13 +0200)] 
smbd: reformat smbXsrv_open_global_traverse() function pointer args

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agosmbd: also delete replay cache record in smbXsrv_open_cleanup()
Ralph Boehme [Tue, 17 Jun 2025 14:59:07 +0000 (16:59 +0200)] 
smbd: also delete replay cache record in smbXsrv_open_cleanup()

Add and use smbXsrv_replay_cleanup() to delete replay cache records. Another
external caller comes later, hence adding this as a public function.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agosmbd: make create-replay cache disk backed
Ralph Boehme [Sat, 26 Jul 2025 13:05:45 +0000 (15:05 +0200)] 
smbd: make create-replay cache disk backed

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agolibndr: add support for unions to ndr_pull_struct_blob_noalloc() and ndr_push_struct_...
Ralph Boehme [Fri, 11 Jul 2025 04:02:13 +0000 (06:02 +0200)] 
libndr: add support for unions to ndr_pull_struct_blob_noalloc() and ndr_push_struct_into_fixed_blob()

The union switch value is stored by ndr_token_store() which uses talloc to
manage ndr.switch_list. Preallocate a ndr_token array and ndr_token_list on the
stack of size ndr_token_list.fixed_alloc_count and optionally use that in
ndr_token_store().

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agosmbd: implement session check from MS-SMB2 3.3.5.9 Receiving an SMB2 CREATE Request
Ralph Boehme [Thu, 10 Jul 2025 14:48:22 +0000 (16:48 +0200)] 
smbd: implement session check from MS-SMB2 3.3.5.9 Receiving an SMB2 CREATE Request

If the server implements the SMB 3.x dialect family and all of the following conditions are TRUE, the
server MUST look up an Open in GlobalOpenTable where Open.IsReplayEligible is TRUE and
Open.CreateGuid matches the CreateGuid in the SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2
create context and Open.ClientGuid matches the ClientGuid of the connection that received this
request:

...

If an Open is found, the server MUST perform the following:

...

If Open.Session.SessionId is not equal to the current Session.SessionId, the server MUST fail
the request with STATUS_DUPLICATE_OBJECTID.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agosmbd: Add session_global_id and tcon_global_id to smbXsrv_open_global0
Ralph Boehme [Thu, 10 Jul 2025 11:10:42 +0000 (13:10 +0200)] 
smbd: Add session_global_id and tcon_global_id to smbXsrv_open_global0

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agosmbd: add smbXsrv_tcon to smbXsrv_open
Ralph Boehme [Fri, 11 Jul 2025 04:49:54 +0000 (06:49 +0200)] 
smbd: add smbXsrv_tcon to smbXsrv_open

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agosmbd: add smbXsrv_session to smbXsrv_open
Ralph Boehme [Sat, 28 Jun 2025 06:55:25 +0000 (08:55 +0200)] 
smbd: add smbXsrv_session to smbXsrv_open

From "MS-SMB2 3.3.1.10 Per Open":

  Open.Session: A reference to the authenticated session, as specified in section
  3.3.1.8, over which this open was performed. If the open is not attached to a
  session at this time, this value MUST be NULL.

Needed to implement:

  3.3.5.9 Receiving an SMB2 CREATE Request

  If the server implements the SMB 3.x dialect family and all of the following
  conditions are TRUE, the server MUST look up an Open in GlobalOpenTable where
  Open.IsReplayEligible is TRUE and Open.CreateGuid matches the CreateGuid in
  the SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 create context and Open.ClientGuid
  matches the ClientGuid of the connection that received this request:

  ...

  If an Open is found, the server MUST perform the following:

  ..

  If Open.Session.SessionId is not equal to the current Session.SessionId, the
  server MUST fail the request with STATUS_DUPLICATE_OBJECTID.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agosmbd: add and use smbXsrv_open_replay_cache_key_buf
Ralph Boehme [Sat, 26 Jul 2025 12:49:10 +0000 (14:49 +0200)] 
smbd: add and use smbXsrv_open_replay_cache_key_buf

No change in behaviour.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agosmbd: make the replay cache record an index on the global open table
Ralph Boehme [Thu, 10 Jul 2025 14:31:16 +0000 (16:31 +0200)] 
smbd: make the replay cache record an index on the global open table

Store only the open_global record key as is in the replay-cache record, making
it an index into the global open table. Then in the replay code, use the new
function smbXsrv_open_global_lookup() to get at the open records.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agosmbd: invert logic when handling pending create in smb2srv_open_lookup_replay_cache()
Ralph Boehme [Sat, 12 Jul 2025 06:27:38 +0000 (08:27 +0200)] 
smbd: invert logic when handling pending create in smb2srv_open_lookup_replay_cache()

No change in behaviour.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agosmbd: move create_action to smbXsrv_open_global0
Ralph Boehme [Thu, 10 Jul 2025 13:51:12 +0000 (15:51 +0200)] 
smbd: move create_action to smbXsrv_open_global0

In preperation for making create replay disk backed.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agosmbd: simplify create-replay
Ralph Boehme [Thu, 10 Jul 2025 13:33:48 +0000 (15:33 +0200)] 
smbd: simplify create-replay

Just check state->open_was_deferred and skip calling
smb2srv_open_lookup_replay_cache() if it is set.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agosmbd: move DH2Q context processing to its own function
Ralph Boehme [Thu, 10 Jul 2025 12:38:53 +0000 (14:38 +0200)] 
smbd: move DH2Q context processing to its own function

The DH2Q processing code is getting a bit bloated, move it to it's own
function. This also simplifies a coming change where I'll add an early out.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agosmbd: add some debugging to smbXsrv_open_[lookup|set]_replay_cache()
Ralph Boehme [Sat, 14 Jun 2025 17:13:44 +0000 (19:13 +0200)] 
smbd: add some debugging to smbXsrv_open_[lookup|set]_replay_cache()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agosmbd: move create_action handling to smbd_smb2_create_after_exec()
Ralph Boehme [Sat, 14 Jun 2025 13:41:38 +0000 (15:41 +0200)] 
smbd: move create_action handling to smbd_smb2_create_after_exec()

This ensures op->create_action is set when we're calling smbXsrv_open_update()
and fixes create_action handling for create replays.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agosmbd: simplify create_action handling
Ralph Boehme [Tue, 8 Jul 2025 12:47:24 +0000 (14:47 +0200)] 
smbd: simplify create_action handling

(state->info == FILE_WAS_OVERWRITTEN) can only happen when returning
SMB_VFS_CREATE_FILE(), not for a Durable Handle reconnect or Replay, hence we
can move the check and adjustment of state->info to smbd_smb2_create_send()
after the call to SMB_VFS_CREATE_FILE().

This nicely simplifies the logic in smbd_smb2_create_finish() where we can now
just set state->op->create_action and state->out_create_action to the value of
state->info.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agosmbtorture: add test smb2.replay.replay-twice-durable
Ralph Boehme [Mon, 30 Jun 2025 14:45:35 +0000 (16:45 +0200)] 
smbtorture: add test smb2.replay.replay-twice-durable

This verifies a second replay on a durable handle, after the handle has
already been used, is "ignored" and handled as a normal open.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agosmbtorture: add test smb2.replay.durable-reconnect-replay3
Ralph Boehme [Mon, 30 Jun 2025 10:17:24 +0000 (12:17 +0200)] 
smbtorture: add test smb2.replay.durable-reconnect-replay3

This verifies a CREATE replay on a second connection with previous_session_id
set is working correctly.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agosmbtorture: add test smb2.replay.durable-reconnect-replay2
Ralph Boehme [Mon, 30 Jun 2025 08:19:14 +0000 (10:19 +0200)] 
smbtorture: add test smb2.replay.durable-reconnect-replay2

This verifies a replay on a new connection with a new sesssion fails
with NT_STATUS_DUPLICATE_OBJECTID.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agosmbtorture: add test smb2.replay.durable-reconnect-replay1
Ralph Boehme [Tue, 17 Jun 2025 15:56:07 +0000 (17:56 +0200)] 
smbtorture: add test smb2.replay.durable-reconnect-replay1

This verifies CREATE replay is working on a new connection.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agosmbd: fix include order in smbXsrv_open.c
Ralph Boehme [Tue, 17 Jun 2025 14:26:46 +0000 (16:26 +0200)] 
smbd: fix include order in smbXsrv_open.c

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agos3/dbwrap_watch: avoid leaking backend db handle in traverses
Ralph Boehme [Mon, 23 Jun 2025 08:17:32 +0000 (10:17 +0200)] 
s3/dbwrap_watch: avoid leaking backend db handle in traverses

Currently in a traverse callback dbwrap_record_get_db() returns the backend db
handle.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 months agos3:utils: Allow ROLE_IPA_DC to allow to use Kerberos in gensec
Pavel Filipenský [Mon, 4 Aug 2025 21:28:24 +0000 (23:28 +0200)] 
s3:utils: Allow ROLE_IPA_DC to allow to use Kerberos in gensec

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

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Aug  5 14:51:51 UTC 2025 on atb-devel-224

2 months agos3:netlogon: IPA DC is the PDC as well - allow ROLE_IPA_DC in _netr_DsRGetForestTrust...
Pavel Filipenský [Mon, 4 Aug 2025 21:26:02 +0000 (23:26 +0200)] 
s3:netlogon: IPA DC is the PDC as well - allow ROLE_IPA_DC in _netr_DsRGetForestTrustInformation()

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

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 months agodocs-xml: Make smb.conf 'server role' value consistent with ROLE_IPA_DC in libparam
Pavel Filipenský [Mon, 4 Aug 2025 06:35:29 +0000 (08:35 +0200)] 
docs-xml: Make smb.conf 'server role' value consistent with ROLE_IPA_DC in libparam

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

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 months agos3:winbindd: Resolve dc name using CLDAP also for ROLE_IPA_DC
Pavel Filipenský [Wed, 23 Jul 2025 13:09:21 +0000 (15:09 +0200)] 
s3:winbindd: Resolve dc name using CLDAP also for ROLE_IPA_DC

server role ROLE_IPA_DC (introduced in e2d5b4d) needs special handling
in dcip_check_name().  We should resolve the DC name using:
- CLDAP in dcip_check_name_ads()
instead of:
- NETBIOS in nbt_getdc() that fails if Windows is not providing netbios.

The impacted environment has:

domain->alt_name = example.com
domain->active_directory = 1
security = USER
server role = ROLE_IPA_DC

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

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Pair-programmed-with: Andreas Schneider <asn@samba.org>

Reviewed-by: Alexander Bokovoy <ab@samba.org>
2 months agos3:tests: Use bash and disable history expansion for test_wbinfo_lookuprids_cache.sh
Andreas Schneider [Tue, 5 Aug 2025 09:31:59 +0000 (11:31 +0200)] 
s3:tests: Use bash and disable history expansion for test_wbinfo_lookuprids_cache.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Aug  5 12:50:07 UTC 2025 on atb-devel-224

2 months agos3:tests: Fix shellcheck warning of test_wbinfo_lookuprids_cache.sh
Andreas Schneider [Tue, 5 Aug 2025 09:11:10 +0000 (11:11 +0200)] 
s3:tests: Fix shellcheck warning of test_wbinfo_lookuprids_cache.sh

In source3/script/tests/test_wbinfo_lookuprids_cache.sh line 27:
key=$("$TDBDUMP" "$cache" | grep ^key.*NDR.*/"$opnum"/ | cut -d\" -f2)
                                 ^-------------------^ SC2062 (warning):
                                 Quote the grep pattern so the shell won't
                                 interpret it.

Lets better use awk for matching the pattern.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 months agodocs-xml: Update documentation for --use-kerberos and --use-krb5-ccache
Andreas Schneider [Tue, 5 Aug 2025 07:15:43 +0000 (09:15 +0200)] 
docs-xml: Update documentation for --use-kerberos and --use-krb5-ccache

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Aug  5 11:49:35 UTC 2025 on atb-devel-224

2 months agolib:cmdline: Check if we have a valid default ccache
Andreas Schneider [Fri, 25 Apr 2025 15:32:16 +0000 (17:32 +0200)] 
lib:cmdline: Check if we have a valid default ccache

If you don't specify anything, and we have a valid ccache then try to
use it!

> smbclient -L //samba1.earth.milkyway.site
Anonymous login successful

        Sharename       Type      Comment
        ---------       ----      -------
        print$          Disk      Printer Drivers
        IPC$            IPC       IPC Service (Samba 4.22.1)
SMB1 disabled -- no workgroup available

In case the user specifies a principal, it will ask for a password:

> bin/smbclient -L //samba1.earth.milkyway.site -Ualice1@EARTH.MILKYWAY.SITE
Password for [alice1@EARTH.MILKYWAY.SITE]:

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2 months agolibrpc:gse: Implement storing tickets into an emtpy ccache
Andreas Schneider [Fri, 4 Apr 2025 11:37:21 +0000 (13:37 +0200)] 
librpc:gse: Implement storing tickets into an emtpy ccache

smbclient //server/share --krb5-use-ccache=/tmp/foo

Will write the ticket to the specified ccache.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2 months agoauth:creds: Add cli_credentials_get_out_ccache_name()
Andreas Schneider [Fri, 4 Apr 2025 11:33:19 +0000 (13:33 +0200)] 
auth:creds: Add cli_credentials_get_out_ccache_name()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2 months agoauth:creds: Always store the ccache name
Andreas Schneider [Fri, 4 Apr 2025 11:32:41 +0000 (13:32 +0200)] 
auth:creds: Always store the ccache name

This will allow us to specify the cache as one to fill with credentials.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2 months agoauth:creds: Make sure when parsing username that realm is uppercase
Andreas Schneider [Fri, 25 Apr 2025 09:30:14 +0000 (11:30 +0200)] 
auth:creds: Make sure when parsing username that realm is uppercase

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2 months agosource3/printing: Fix CID 1273086 - Resource Leak
Shwetha K Acharya [Thu, 31 Jul 2025 12:59:05 +0000 (18:29 +0530)] 
source3/printing: Fix CID 1273086 - Resource Leak

Ensure print_queue_struct *q is initialized to NULL to avoid
undefined behavior when freeing on error paths. Move SAFE_FREE(q)
outside the ret > 0 block to ensure q is always freed.

Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Vinit Agnihotri <vagnihot@redhat.com>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Tue Aug  5 09:20:17 UTC 2025 on atb-devel-224

2 months agocoverity: Add some additional check for strequal()
Andreas Schneider [Tue, 29 Jul 2025 12:44:50 +0000 (14:44 +0200)] 
coverity: Add some additional check for strequal()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Tue Aug  5 07:09:04 UTC 2025 on atb-devel-224

2 months agocoverity: Update README.md
Andreas Schneider [Fri, 3 Feb 2023 10:30:34 +0000 (11:30 +0100)] 
coverity: Update README.md

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
2 months agocoverity: Rename README to README.md
Andreas Schneider [Fri, 3 Feb 2023 10:22:40 +0000 (11:22 +0100)] 
coverity: Rename README to README.md

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
2 months agocoverity: Add makefile to build/test the modelling file
Andreas Schneider [Fri, 3 Feb 2023 10:20:17 +0000 (11:20 +0100)] 
coverity: Add makefile to build/test the modelling file

This allows to check that it compiles at least with gcc.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>