]>
git.ipfire.org Git - thirdparty/samba.git/log
Stefan Metzmacher [Mon, 27 Jul 2026 18:21:45 +0000 (20:21 +0200)]
WHATSNEW: Cluster functional level
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Aug 4 10:55:37 UTC 2026 on atb-devel-224
Stefan Metzmacher [Fri, 24 Jul 2026 14:54:17 +0000 (16:54 +0200)]
s3:utils: introduce 'net clusterlevel [features|show|showall|upgrade]' commands
These commands are able to manage the cluster functional level.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Fri, 31 Jul 2026 08:07:58 +0000 (10:07 +0200)]
s3:cluster_level_db: add cluster_level_db_upgrade()
This verifies all nodes are supporting the same ranges
and then upgrades to the highest possible level.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Mon, 27 Jul 2026 14:08:54 +0000 (16:08 +0200)]
s3:messages: add MSG_CLUSTER_LEVEL_UPGRADED handler
This makes it possible notify all processes
connected ctdbd to reload the cluster functional level
from cluster_level.tdb.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Mon, 27 Jul 2026 12:47:16 +0000 (14:47 +0200)]
messaging.idl: define MSG_CLUSTER_LEVEL_UPGRADED
This will be used to inform all processes connected
to ctdbd that the cluster functional level was
upgraded and processes should re-check the value
stored in cluster_level.tdb.
The message itself doesn't have any payload.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Fri, 31 Jul 2026 07:50:16 +0000 (09:50 +0200)]
s3:cluster_level_db: add cluster_level_db_nodes_foreach()
This allows the caller to get information about the supported
ranges of all (non-deleted) nodes together with information
about the node.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Fri, 24 Jul 2026 16:01:41 +0000 (18:01 +0200)]
s3:ctdbd_conn: add ctdbd_nodes_foreach() helper
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 18 Jul 2026 13:52:48 +0000 (15:52 +0200)]
s3:cluster_support: add SMB_ASSERT(!lp_clustering()); to cluster_level_activate_latest()
The cluster cases should use cluster_level_activate() instead.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Wed, 15 Jul 2026 18:07:08 +0000 (20:07 +0200)]
s3:messages: let messaging_init_internal() call cluster_level_db_check_or_update()
This makes sure we prepare the cluster level state before
we do any real work.
We only call cluster_level_db_check_or_update() if needed.
It also prepares the global state so that
cluster_level_activated() can work as desired.
Review with: git show -w --patience
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Thu, 16 Jul 2026 12:39:41 +0000 (14:39 +0200)]
s3:cluster_level_db: add cluster_level_db_check_or_update()
This creates the global record for the active level,
when there's none.
And it creates/updates the per node record of supported
level ranges.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Tue, 14 Jul 2026 16:17:37 +0000 (18:17 +0200)]
s3:lib: introduce cluster_level_db.[ch] with cluster_level_db_check()
This implements getting the global cluster functional level
state (struct cluster_level_active) in read-only mode from
cluster_level.tdb, supposed to be used by the low-level
ctdbd_connection code.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Wed, 15 Jul 2026 13:30:11 +0000 (15:30 +0200)]
s3:ctdbd_conn: add ctdbd_conn_{get,set}_cluster_level() helper functions
These will be used in the next steps...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Fri, 17 Jul 2026 19:04:03 +0000 (21:04 +0200)]
s3:messages: call cluster_level_activate_latest() in messaging_init_internal()
This is just the first step to always use the latest level
defined by the software.
A following commit will change the logic for the clustered case
and call cluster_level_activate() instead, which a value found
in a cluster wide database.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Tue, 14 Jul 2026 16:14:33 +0000 (18:14 +0200)]
s3:lib: add cluster_level related functions to cluster_support.[ch]
This represents our global state related to cluster functional levels.
This doesn't really depend on enabled cluserter support,
but allows the core code to work without #ifdef's.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Tue, 14 Jul 2026 14:59:07 +0000 (16:59 +0200)]
s3:librpc: add cluster_level.idl
This defines the basic structure to implement
a cluster wide functional level.
Upstream (master) will basically update the major number
if a incompatible change was made, similar to
SMB_VFS_INTERFACE_VERSION, at the same time
minor latest is changes to 0.
For any backport the minor number needs to
be updated there.
See also the large comments in the file itself.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Tue, 14 Jul 2026 14:31:21 +0000 (16:31 +0200)]
s3:ctdbd_conn: let ctdbd_init_connection_internal() get the pid and start_time of ctdbd
This will allow the caller to identify database records valid for
the lifetime of the current ctdbd.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 18 Jul 2026 11:36:03 +0000 (13:36 +0200)]
s3:dbwrap_open: protect db_open() against recursive calls
Callers need to use db_open_ex() instead.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Thu, 16 Jul 2026 09:17:17 +0000 (11:17 +0200)]
s3:dbwrap_ctdb: let db_open_ctdb_ex() use g_lock_ctx_init_ex()
This will allow db_open_ctdb_ex() to work without
global state to be setup first.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Thu, 16 Jul 2026 09:10:35 +0000 (11:10 +0200)]
s3:g_lock: split out g_lock_ctx_init_ex()
This prepares us to allow to open a
persistent database in read-write mode
with transactions during early startup
where we don't have global state yet.
This asserts that g_lock_ctx_init() can't
be called recursively.
It will be used in db_open_ctdb_ex()
in the next step.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Thu, 16 Jul 2026 09:04:15 +0000 (11:04 +0200)]
s3:dbwrap_open: split out db_open_ex()
This will allow us to open a persistent database
in read-only mode without allowing transactions.
It allows otherwise global state to be passed down
to db_open_ctdb_ex().
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Tue, 14 Jul 2026 11:45:53 +0000 (13:45 +0200)]
s3:dbwrap_ctdb: split out db_open_ctdb_ex()
This will allow us to open a persistent database
in read-only mode without allowing transactions.
We'll use that in order to implement a
"cluster_level.tdb" in order to
add support for controlled cluster upgrades
in the next steps.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Sat, 18 Jul 2026 10:51:29 +0000 (12:51 +0200)]
s3:global_contexts: add global_messaging_context_raw()
This gets the global context without trying to
create a fresh one.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Fri, 17 Jul 2026 11:21:26 +0000 (13:21 +0200)]
s3:g_lock: let g_lock_trylock() debug if exclusive locker died
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Thu, 16 Jul 2026 10:05:07 +0000 (12:05 +0200)]
s3:ctdbd_conn: remove unused ctdbd_reinit_connection()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Wed, 4 Mar 2026 15:39:10 +0000 (16:39 +0100)]
lib/replace: add BUILD_ASSERT()
This uses _Static_assert() from C11...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Tue, 21 Jul 2026 10:19:01 +0000 (12:19 +0200)]
s3:utils: don't allow misc options to 'net join'
The code from net_ads_join looks at misc options in argv
and also gets a domain name, which might not be our workgroup
nor realm.
The net_rpc_join doesn't do that, instead of uses
the misc options as join type and the domain from
lp_workgroup().
This means the generic 'net join' can't handle
misc options in a sane way.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Tue, 21 Jul 2026 10:16:50 +0000 (12:16 +0200)]
selftest:Samba3: remove useless 'member' argument and use 'net ads join'
The net_ads_join code path tries to join a domain called 'MEMBER'
and only the fallback to net_rpc_join lets this work at all.
The net_rpc_join code path tries to convert the argument
to a join type.
So use a command real admins will use.
I noticed this as I was wondering about the message:
ADS join did not work, falling back to RPC...
on the screen when starting the 'clusteredmember'
environment.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Wed, 29 Jul 2026 11:38:22 +0000 (13:38 +0200)]
net.8.xml: document 'net serverid wipedbs --persistent'
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Volker Lendecke [Fri, 19 Dec 2025 13:27:41 +0000 (14:27 +0100)]
smbd: Make reference_smb_fname_fsp_link() static
Only referenced in files.c
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Mon Aug 3 10:08:42 UTC 2026 on atb-devel-224
Volker Lendecke [Fri, 3 Jul 2026 14:02:45 +0000 (16:02 +0200)]
spnego: Use struct initialization instead of talloc_zero
Also remove some NULL initializations that are implicitly done. I
know, cosmetic change, I like it better this way...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Thu, 30 Jul 2026 12:25:54 +0000 (14:25 +0200)]
libcli: Slightly streamline sddl_flags_to_string()
Only check for talloc failure once with talloc_asprintf_addbuf()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Mon, 6 Jul 2026 11:06:40 +0000 (13:06 +0200)]
spnego: We have gensec_get_unparsed_target_principal() now
It does exactly what the callers did before this patch.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Fri, 3 Jul 2026 10:00:31 +0000 (12:00 +0200)]
spnego: Remove a pointless return;
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Fri, 3 Jul 2026 15:54:13 +0000 (17:54 +0200)]
spnego: Doesn't need base64.h
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Thu, 2 Jul 2026 11:40:04 +0000 (13:40 +0200)]
lib: Streamline a struct assignment
No need to do the struct assignment and then modify the struct in a separate
step.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Mon, 6 Jul 2026 12:02:24 +0000 (14:02 +0200)]
gensec: Simplify domain match check
We don't have to look for our domain twice, once for the check and
once for the DBG_NOTICE.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Mon, 6 Jul 2026 11:59:26 +0000 (13:59 +0200)]
gensec: Declare vars closer to their use
We don't need "workstation" and "domain" in the client case.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Thu, 30 Jul 2026 11:39:33 +0000 (13:39 +0200)]
libcli: Use #defines instead of magic numbers
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Thu, 30 Jul 2026 11:40:36 +0000 (13:40 +0200)]
libcli: Fix whitespace
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Mon, 6 Jul 2026 12:13:37 +0000 (14:13 +0200)]
ntlmssp: Tiny simplification of gensec_ntlmssp_server_negotiate()
Do an early return instead of an else. While there, modernize DEBUGs
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Thu, 30 Jul 2026 10:59:15 +0000 (12:59 +0200)]
gensec: Add GENSEC_OID_NEGOEX
Unused so far, bug so is GENSEC_OID_KERBEROS5_USER2USER
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Fri, 3 Jul 2026 16:11:14 +0000 (18:11 +0200)]
ntlmssp: Avoid an "else", we return early
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Mon, 26 Jan 2026 10:56:45 +0000 (11:56 +0100)]
lib: Make asn1_peek() static
Only used in asn1.c
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Mon, 6 Jul 2026 10:58:46 +0000 (12:58 +0200)]
gensec: Fix a copy&paste error
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Mon, 6 Jul 2026 11:34:11 +0000 (13:34 +0200)]
gensec: Fix a use-after-free error in gensec_external
.length is 0, but the pointer we hand out will be != NULL but free'ed
in the tevent_req_received()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Sat, 11 Jul 2026 11:06:26 +0000 (13:06 +0200)]
rpcclient: Align a few integer types
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Sat, 11 Jul 2026 10:59:38 +0000 (12:59 +0200)]
rpcclient: Use #define
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Mon, 11 May 2026 07:12:44 +0000 (09:12 +0200)]
smbclient3: Slightly simplify target IP handling
Instead of using ?: in a few places, introduce a pointer variable
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Tue, 10 Mar 2026 10:34:17 +0000 (11:34 +0100)]
libsmb: dsgetdcname.h requires NTSTATUS
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Mon, 11 May 2026 06:56:48 +0000 (08:56 +0200)]
smbclient3: Remove an unused variable
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Tue, 26 May 2026 12:59:28 +0000 (14:59 +0200)]
smbd: Fix whitespace, modernize a DEBUG
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Wed, 17 Jun 2026 06:02:35 +0000 (08:02 +0200)]
dns_server: Use talloc_realloc_zero() to avoid explicit ZERO_STRUCT()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Mon, 22 Jun 2026 15:25:19 +0000 (17:25 +0200)]
vfs_cap: Rename confusing "path" parameter
This is the xattr name, not the path
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Tue, 21 Jul 2026 10:38:17 +0000 (12:38 +0200)]
lib: Make signed/unsigned conversion explicit in asn1_peek()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Tue, 21 Jul 2026 10:31:38 +0000 (12:31 +0200)]
lib: Make signed/unsigned conversion explicit in asn1_write()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Tue, 21 Jul 2026 10:27:42 +0000 (12:27 +0200)]
lib: Add central error: exit to asn1_write()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Tue, 21 Jul 2026 09:50:10 +0000 (11:50 +0200)]
ldap_server: Fix -Wswitch in case we want to implement SICILY
See [MS-ADTS] 5.1.1.1.3 Sicily Authentication
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Tue, 21 Jul 2026 09:17:33 +0000 (11:17 +0200)]
lib: One last check before subtraction in asn1_tag_remaining()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Tue, 21 Jul 2026 09:14:33 +0000 (11:14 +0200)]
lib: Make "remaining" unsigned in asn1_tag_remaining()
We checked it can't go negative, avoid signed/unsigned comparisons
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Tue, 21 Jul 2026 09:06:53 +0000 (11:06 +0200)]
lib: Check there's data remaining before calculating how much
Better make sure the subtraction does not go negative before we do it.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Tue, 21 Jul 2026 09:03:59 +0000 (11:03 +0200)]
lib: Add some consistency check to asn1_tag_remaining()
We can't allow "ofs" to be smaller than "nesting->start". This
assumption is implicitly valid, but better be safe than sorry.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Tue, 21 Jul 2026 08:52:55 +0000 (10:52 +0200)]
lib: Simplify asn1_tag_remaining()
Introduce common error exit
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Wed, 15 Jul 2026 11:02:39 +0000 (13:02 +0200)]
lib: Simplify libnet_vampire_cb_apply_schema()
Use talloc_asprintf_addbuf()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Wed, 15 Jul 2026 11:00:27 +0000 (13:00 +0200)]
rpc_server: Simplify dcesrv_samr_GetAliasMembership()
Use talloc_asprintf_addbuf()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Mon, 13 Jul 2026 21:55:10 +0000 (23:55 +0200)]
rpcclient: Fix handling of -1 return from tsocket_address_bsd_sockaddr
socklen_t can be unsigned
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Sun, 12 Jul 2026 08:32:52 +0000 (10:32 +0200)]
netlogond: Fix a typo
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Sun, 12 Jul 2026 08:01:45 +0000 (10:01 +0200)]
pdb_samba_dsdb: Simplify pdb_samba_dsdb_get_domain_info()
"dom_res" is a talloc child of "info"
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Sun, 12 Jul 2026 08:01:00 +0000 (10:01 +0200)]
pdb_samba_dsdb: Add a talloc failure check
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Sun, 12 Jul 2026 07:59:38 +0000 (09:59 +0200)]
pdb_samba_dsdb: We should not run with a zero domain guid
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Sun, 12 Jul 2026 07:38:19 +0000 (09:38 +0200)]
pdb_samba_dsdb: Simplify pdb_samba_dsdb_search_filter() with a central exit
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Sun, 12 Jul 2026 07:36:28 +0000 (09:36 +0200)]
pdb_samba_dsdb: Fix an error return
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Sun, 12 Jul 2026 07:35:49 +0000 (09:35 +0200)]
pdb_samba_dsdb: talloc_stackframe() panics on failure
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Stefan Metzmacher [Thu, 30 Jul 2026 19:01:09 +0000 (21:01 +0200)]
s4:libcli/resolve: let lpcfg_resolve_context() take an explicit mem_ctx
This avoids memory leaks in various places.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=16065
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sat Aug 1 09:11:02 UTC 2026 on atb-devel-224
Stefan Metzmacher [Thu, 30 Jul 2026 18:58:18 +0000 (20:58 +0200)]
s4:py_net: make use of self->libnet_ctx->resolve_ctx
There's no need to call lpcfg_resolve_context() every time again.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=16065
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Volker Lendecke <vl@samba.org>
Martin Schwenke [Thu, 30 Jul 2026 04:49:16 +0000 (14:49 +1000)]
ctdb-common: Align integer types
Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Fri Jul 31 00:48:24 UTC 2026 on atb-devel-224
Martin Schwenke [Thu, 30 Jul 2026 02:21:10 +0000 (12:21 +1000)]
ctdb-common: Avoid Coverity
1697470 /
1697471
These are listed as: Memory - corruptions (OVERRUN)
While sockaddr_ll only has 8 octets for sll_addr, a sockaddr_storage
is being intentionally used here to provide additional space. So, the
overrun is a technicality and there is no corruption.
However, the code is incorrect because it does overrun sll_addr[] in
sockaddr_ll. The assignments into out-of-bounds indices also cause
the -O3 build fail.
So, use an extra variable to point to where sll_addr should start in a
sockaddr_storage and index from there.
Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Martin Schwenke [Thu, 30 Jul 2026 03:27:24 +0000 (13:27 +1000)]
ctdb-tests: Add tests for build of IPv6 link-level multicast address
This is mainly to guard against regressions in known working code.
Test before the changes, test again afterwards...
Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Stefan Metzmacher [Fri, 20 Mar 2026 09:55:08 +0000 (10:55 +0100)]
tevent: version 0.17.2
* let tevent_common_have_events() ignore fd events without active flags,
in order to avoid tevent_loop_wait() to loop forever with only
such events.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jul 30 19:53:15 UTC 2026 on atb-devel-224
Stefan Metzmacher [Fri, 20 Mar 2026 09:51:42 +0000 (10:51 +0100)]
tevent: ignore fd events without flags in tevent_common_have_events()
Allow callers to use tevent_add_fd() with flags=0 in order
to allocate the memory, but without waiting for any event.
This should not cause tevent_loop_wait() to loop forever
if such an fd event is the only event.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Volker Lendecke [Tue, 28 Jul 2026 11:25:43 +0000 (13:25 +0200)]
lib: Fix undefined behaviour at fork time in pthreadpool
If a pthread times out at the same time with a fork, ETIMEDOUT is
overwritten and not being taken care of. This means that we can race
with the forking thread destroying pool->condvar in the next round of
the thread's while(1) loop. pthread_cond_wait() on a condition
variable that has been destroyed is not a good idea.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=16191
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Jul 30 17:51:29 UTC 2026 on atb-devel-224
Volker Lendecke [Wed, 15 Jul 2026 10:58:02 +0000 (12:58 +0200)]
rpc_server: Simplify dns_split_node_name()
Use talloc_asprintf_addsep()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Jul 30 14:14:44 UTC 2026 on atb-devel-224
Volker Lendecke [Wed, 15 Jul 2026 10:22:24 +0000 (12:22 +0200)]
vfs_ceph_rgw: Simplify normalise_name()
Use talloc_asprintf_addsep()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Volker Lendecke [Wed, 15 Jul 2026 10:12:21 +0000 (12:12 +0200)]
smbd: Simplify msdfs_link_string()
Use talloc_asprintf_addsep()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Volker Lendecke [Wed, 15 Jul 2026 10:10:42 +0000 (12:10 +0200)]
smbd: Simplify full_path_extend()
Use talloc_asprintf_addsep()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Volker Lendecke [Wed, 15 Jul 2026 10:06:40 +0000 (12:06 +0200)]
ldb: ldb_dn_get_extended_linearized()
Use talloc_asprintf_addsep()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Volker Lendecke [Tue, 14 Jul 2026 19:55:49 +0000 (21:55 +0200)]
ldb: Slightly simplify ldb_dn_get_extended_linearized()
Return early with dn->ext_comp_num==0, no need to check further down again.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Volker Lendecke [Wed, 15 Jul 2026 10:04:45 +0000 (12:04 +0200)]
ldb: Simplify ldif_write_prefixMap()
Use talloc_asprintf_addsep()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Volker Lendecke [Wed, 15 Jul 2026 10:03:51 +0000 (12:03 +0200)]
ldb: Fix ldif_write_prefixMap()
talloc_asprintf_addbuf() deals well with allocation failure, but we
need to check failure after the string has been set up.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Volker Lendecke [Wed, 15 Jul 2026 10:01:25 +0000 (12:01 +0200)]
ctdb: Simplify compact_args()
Use talloc_asprintf_addsep()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Volker Lendecke [Wed, 15 Jul 2026 09:58:55 +0000 (11:58 +0200)]
talloc: Add talloc_asprintf_addsep()
See the comment in talloc.h for an explanation.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Shachar Sharon [Mon, 23 Mar 2026 09:47:33 +0000 (11:47 +0200)]
smbstatus: Split brlocks logic into collect and dump phases
Split the logic of 'smbstatus --byterange' into two phases:
1) Collect locks-info into in-memory representation (linked-list) under
lock of 'locking.tdb'.
2) Print-out (text or json) locks-info _after_ releasing this lock.
This split-logic is needed to avoid deadlock with smbd; in particular,
cases where the output of 'smbstatus -B' is piped-out into another
process, the primary lock may be held for long duration due to blocked
stdout on smbstatus side, thus causing starvation on smbd side.
Pair-Programmed-With: Volker Lendecke <vl@samba.org>
Signed-off-by: Shachar Sharon <ssharon@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Jul 30 12:41:51 UTC 2026 on atb-devel-224
Stefan Metzmacher [Fri, 24 Jul 2026 07:04:29 +0000 (09:04 +0200)]
s4:torture/smb2: split out smb2.persistent-open-reconnect-contended
This means the rule in selftest/skip actually works.
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): Wed Jul 29 08:33:12 UTC 2026 on atb-devel-224
Stefan Metzmacher [Fri, 24 Jul 2026 07:40:22 +0000 (09:40 +0200)]
s3:selftest: use CLUSTERED_PERSISTENT_TESTS = smbtorture4_testsuites("smb2.persistent")
This is better than list tests manually, so new tests will
be added automatically.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Fri, 24 Jul 2026 07:38:14 +0000 (09:38 +0200)]
s3:selftest: run all smb2.persistent tests against //fileserver/ca_fo_max_rwh
This makes sure new tests will by default against a useful
share.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Wed, 24 Jun 2026 12:42:11 +0000 (14:42 +0200)]
CVE-2026-58222: s4:ldap_server: don't allow untrusted compare requests for confidential attributes
This means we apply acl checks against the search filter similar
to normal ldb searches.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=16148
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Björn Jacke <bjacke@samba.org>
Autobuild-Date(master): Tue Jul 28 17:02:13 UTC 2026 on atb-devel-224
Stefan Metzmacher [Wed, 24 Jun 2026 12:01:32 +0000 (14:01 +0200)]
CVE-2026-58221: s4:dsdb: let rootdse_filter_operations() reject untrusted operations on special DNs
Without this authenticated (also non-admin) users write internal meta
data leading to admin privileges.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=16147
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Stefan Metzmacher [Mon, 29 Jun 2026 17:09:28 +0000 (19:09 +0200)]
CVE-2026-58221: s4:dsdb: provide dsdb_audit_{log_attributes,operation_human_readable}() functions
They are useful outside of audit_log.c soon.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=16147
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Volker Lendecke [Wed, 17 Jun 2026 06:58:40 +0000 (08:58 +0200)]
CVE-2026-58218: dns_server: Only add a tkey after successful authentication
BUG: https://bugzilla.samba.org/show_bug.cgi?id=16115
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Douglas Bagnall <dbagnall@samba.org>
Volker Lendecke [Wed, 17 Jun 2026 06:24:47 +0000 (08:24 +0200)]
CVE-2026-58218: dns_server: Fix an error path memleak
We talloc the new key off "dns->tkeys", which is long-lived. On any
error we never free'd that again. Probably not remotely triggerable,
this is only setting up the gensec context.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=16115
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Douglas Bagnall <dbagnall@samba.org>
Douglas Bagnall [Sun, 31 May 2026 00:48:11 +0000 (12:48 +1200)]
CVE-2026-58216: kdc:kpasswd: calculate correct size for password blob
We were making the enc_data_blob 6 bytes too big.
Its payload is an ASN.1 structure that knows its own size, so the
extra bytes are not usually read by Heimdal, but a crafted packet
could force them to be read.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=16087
Reported-by: Tristan <TristanInSec@gmail.com>
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>