]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
5 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>
5 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>
5 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>
5 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>
5 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

5 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>
5 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>
5 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>
5 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>
5 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

5 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>
5 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>
5 weeks agodfs_server: Use talloc_asprintf_strlower_m()
Volker Lendecke [Mon, 20 Oct 2025 16:08:12 +0000 (18:08 +0200)] 
dfs_server: Use talloc_asprintf_strlower_m()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agolib: Fix trailing whitespace
Volker Lendecke [Mon, 20 Oct 2025 15:42:40 +0000 (17:42 +0200)] 
lib: Fix trailing whitespace

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agosmbd: Save lines in conn_new()
Volker Lendecke [Mon, 20 Oct 2025 14:35:09 +0000 (16:35 +0200)] 
smbd: Save lines in conn_new()

"nomem" is the only failure condition here

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agoexamples: Fix trailing whitespace
Volker Lendecke [Sun, 19 Oct 2025 10:02:14 +0000 (12:02 +0200)] 
examples: Fix trailing whitespace

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agosmbd: Fix some whitespace
Volker Lendecke [Wed, 22 Oct 2025 09:15:08 +0000 (11:15 +0200)] 
smbd: Fix some whitespace

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agosmbd: Replace a ZERO_STRUCT with a direct struct initialization
Volker Lendecke [Wed, 22 Oct 2025 09:13:18 +0000 (11:13 +0200)] 
smbd: Replace a ZERO_STRUCT with a direct struct initialization

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agovfs: Fix trailing whitespace
Volker Lendecke [Thu, 23 Oct 2025 18:45:04 +0000 (20:45 +0200)] 
vfs: Fix trailing whitespace

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agosmbd: README.Coding for file_name_hash()
Volker Lendecke [Thu, 23 Oct 2025 17:26:27 +0000 (19:26 +0200)] 
smbd: README.Coding for file_name_hash()

Initialize pointers

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agosmbd: Modernize a DEBUG
Volker Lendecke [Thu, 23 Oct 2025 17:24:42 +0000 (19:24 +0200)] 
smbd: Modernize a DEBUG

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agosmbd: Make file_name_hash() static
Volker Lendecke [Thu, 23 Oct 2025 17:22:03 +0000 (19:22 +0200)] 
smbd: Make file_name_hash() static

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agovfs: Remove some code duplication
Volker Lendecke [Thu, 23 Oct 2025 16:53:11 +0000 (18:53 +0200)] 
vfs: Remove some code duplication

We do the chdir in both cases

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agoauth: Simplify check_account()
Volker Lendecke [Thu, 16 Oct 2025 11:07:23 +0000 (13:07 +0200)] 
auth: Simplify check_account()

We have strlower_talloc() for this

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agolib: Fix whitespace
Volker Lendecke [Thu, 16 Oct 2025 10:54:14 +0000 (12:54 +0200)] 
lib: Fix whitespace

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agosmbd: Fix a typo
Volker Lendecke [Mon, 13 Oct 2025 16:48:11 +0000 (18:48 +0200)] 
smbd: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agosamr_server: Remove an obsolete and confusing comment
Volker Lendecke [Mon, 13 Oct 2025 16:24:34 +0000 (18:24 +0200)] 
samr_server: Remove an obsolete and confusing comment

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agolib: Add some const to bitmap functions
Volker Lendecke [Wed, 29 Oct 2025 12:45:18 +0000 (13:45 +0100)] 
lib: Add some const to bitmap functions

The unusual use of const comes from bitmap_copy :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agolib: Fix bitmap_talloc()'s parameter to unsigned
Volker Lendecke [Wed, 29 Oct 2025 12:41:30 +0000 (13:41 +0100)] 
lib: Fix bitmap_talloc()'s parameter to unsigned

It does not make sense to allocate a negative number of bits

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agolib: Simplify num_parameters() with ARRAY_SIZE()
Volker Lendecke [Wed, 29 Oct 2025 12:39:38 +0000 (13:39 +0100)] 
lib: Simplify num_parameters() with ARRAY_SIZE()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agolib: "boolean == true" looks strange :-)
Volker Lendecke [Sun, 21 Sep 2025 12:36:37 +0000 (14:36 +0200)] 
lib: "boolean == true" looks strange :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agolib: Remove some unused code #ifdef'ed out for more than 10 years
Volker Lendecke [Fri, 19 Sep 2025 21:02:57 +0000 (14:02 -0700)] 
lib: Remove some unused code #ifdef'ed out for more than 10 years

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agolib: Remove an ancient prototype
Volker Lendecke [Fri, 19 Sep 2025 20:50:13 +0000 (13:50 -0700)] 
lib: Remove an ancient prototype

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agosmbd: Fix a few possible buffer read overruns
Volker Lendecke [Sat, 13 Sep 2025 07:11:39 +0000 (09:11 +0200)] 
smbd: Fix a few possible buffer read overruns

... only happens with invalid smb.conf settings....

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agosmbd: Modernize DEBUGs
Volker Lendecke [Mon, 27 Oct 2025 12:23:29 +0000 (13:23 +0100)] 
smbd: Modernize DEBUGs

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agosmbd: Fix a comment
Volker Lendecke [Wed, 22 Oct 2025 09:07:10 +0000 (11:07 +0200)] 
smbd: Fix a comment

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agolib: Remove duplicate #define of TALLOC_FREE()
Volker Lendecke [Fri, 17 Oct 2025 12:46:48 +0000 (14:46 +0200)] 
lib: Remove duplicate #define of TALLOC_FREE()

These days talloc.h has it.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agos3: Remove TALLOC_REALLOC() macro
Volker Lendecke [Fri, 17 Oct 2025 12:44:56 +0000 (14:44 +0200)] 
s3: Remove TALLOC_REALLOC() macro

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agos3: talloc_destroy() -> TALLOC_FREE()
Volker Lendecke [Fri, 17 Oct 2025 12:39:18 +0000 (14:39 +0200)] 
s3: talloc_destroy() -> TALLOC_FREE()

Sweeping change, I know. Should not change compiled code in most
cases, the compiler should be smart enough to elide the assignment
right before a return. In the cases where this is not right before the
return, TALLOC_FREE() is safer as it makes use-after-free crash.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agos3: Replace TALLOC_SIZE() with talloc_size()
Volker Lendecke [Fri, 17 Oct 2025 12:28:40 +0000 (14:28 +0200)] 
s3: Replace TALLOC_SIZE() with talloc_size()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agovfs: Fix trailing whitespace
Volker Lendecke [Fri, 17 Oct 2025 12:27:32 +0000 (14:27 +0200)] 
vfs: Fix trailing whitespace

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agos3: Remove the now-unused TALLOC() macro
Volker Lendecke [Fri, 17 Oct 2025 12:26:32 +0000 (14:26 +0200)] 
s3: Remove the now-unused TALLOC() macro

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agos3: Replace a few calls to TALLOC() with talloc_size()
Volker Lendecke [Fri, 17 Oct 2025 12:26:00 +0000 (14:26 +0200)] 
s3: Replace a few calls to TALLOC() with talloc_size()

That does the same

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agos3: Replace a few calls to TALLOC() with talloc_array()
Volker Lendecke [Fri, 17 Oct 2025 12:24:02 +0000 (14:24 +0200)] 
s3: Replace a few calls to TALLOC() with talloc_array()

No explicit cast necessary

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agoprinting: Fix trailing whitespace
Volker Lendecke [Fri, 17 Oct 2025 12:12:12 +0000 (14:12 +0200)] 
printing: Fix trailing whitespace

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agosmbd: Remove an obsolete comment
Volker Lendecke [Fri, 17 Oct 2025 12:02:42 +0000 (14:02 +0200)] 
smbd: Remove an obsolete comment

This does not apply anymore for a pretty long time

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agosmbd: Make get_real_filename_full_scan_at() static
Volker Lendecke [Mon, 27 Oct 2025 11:26:27 +0000 (12:26 +0100)] 
smbd: Make get_real_filename_full_scan_at() static

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agovfs: Simplify vfs_gpfs_get_real_filename_at()
Volker Lendecke [Mon, 27 Oct 2025 11:25:42 +0000 (12:25 +0100)] 
vfs: Simplify vfs_gpfs_get_real_filename_at()

The mangled case is handled in the caller

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agosmbd: Remove an unused struct member
Volker Lendecke [Fri, 7 Nov 2025 12:01:33 +0000 (13:01 +0100)] 
smbd: Remove an unused struct member

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agovfs: Remove audit_file function
Volker Lendecke [Sun, 9 Nov 2025 10:19:03 +0000 (11:19 +0100)] 
vfs: Remove audit_file function

Added in 2012 with 0dc3f423d25d3a, but I could not find any user of
that call.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agovfs: Remove connectpath function
Volker Lendecke [Fri, 7 Nov 2025 12:38:58 +0000 (13:38 +0100)] 
vfs: Remove connectpath function

Nobody called this

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
5 weeks agovfs: Fix smb_full_audit_parent_pathname()
Volker Lendecke [Fri, 7 Nov 2025 12:21:23 +0000 (13:21 +0100)] 
vfs: Fix smb_full_audit_parent_pathname()

Make it log the right name

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
6 weeks agos3:winbind: Improve logging for query_user_list()
Andreas Schneider [Wed, 5 Nov 2025 11:28:39 +0000 (12:28 +0100)] 
s3:winbind: Improve logging for query_user_list()

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): Fri Nov  7 16:06:50 UTC 2025 on atb-devel-224

6 weeks agos3-client: Use the passed down memory context for cli_connect_nb()
Andreas Schneider [Wed, 29 Oct 2025 10:16:53 +0000 (11:16 +0100)] 
s3-client: Use the passed down memory context for cli_connect_nb()

With the patches coming before this patch, we can use main talloc
context to allocate the connections on and make sure we only free them
after we don't need them anymore.

This fixes a lot of memory leaks found by LeakSanitizer. One example is:

==838668==ERROR: LeakSanitizer: detected memory leaks

Indirect leak of 4784 byte(s) in 13 object(s) allocated from:
    #0 0x7fdb1ef21c2b in malloc (/lib64/libasan.so.8+0x121c2b) (BuildId: cbfe49f3b7600c4f194d4c54774c977296e9d98a)
    #1 0x7fdb1ebbb6a0 in __talloc_with_prefix ../../lib/talloc/talloc.c:783
    #2 0x7fdb1ebbcf75 in __talloc ../../lib/talloc/talloc.c:825
    #3 0x7fdb1ebbcf75 in _talloc_named_const ../../lib/talloc/talloc.c:982
    #4 0x7fdb1ebbcf75 in _talloc_zero ../../lib/talloc/talloc.c:2421
    #5 0x7fdb1cfd1b25 in idr_pre_get ../../lib/util/idtree.c:98
    #6 0x7fdb1cfd1b25 in idr_get_new_above_int ../../lib/util/idtree.c:202
    #7 0x7fdb1cfd2c30 in idr_get_new_above ../../lib/util/idtree.c:368
    #8 0x7fdb1de3246f in map_smb2_handle_to_fnum ../../source3/libsmb/cli_smb2_fnum.c:95
    #9 0x7fdb1de3246f in cli_smb2_create_fnum_done ../../source3/libsmb/cli_smb2_fnum.c:438
    #10 0x7fdb1dbaca05 in _tevent_req_notify_callback ../../lib/tevent/tevent_req.c:177
    #11 0x7fdb1dbacc3c in tevent_req_finish ../../lib/tevent/tevent_req.c:234
    #12 0x7fdb1dbacca4 in _tevent_req_done ../../lib/tevent/tevent_req.c:240
    #13 0x7fdb1ed0eb35 in smb2cli_create_done ../../libcli/smb/smb2cli_create.c:483
    #14 0x7fdb1dbaca05 in _tevent_req_notify_callback ../../lib/tevent/tevent_req.c:177
    #15 0x7fdb1dbacc3c in tevent_req_finish ../../lib/tevent/tevent_req.c:234
    #16 0x7fdb1dbacd74 in tevent_req_trigger ../../lib/tevent/tevent_req.c:291
    #17 0x7fdb1dbaad1e in tevent_common_invoke_immediate_handler ../../lib/tevent/tevent_immediate.c:190
    #18 0x7fdb1dbaad5b in tevent_common_loop_immediate ../../lib/tevent/tevent_immediate.c:236
    #19 0x7fdb1dbbe42f in epoll_event_loop_once ../../lib/tevent/tevent_epoll.c:908
    #20 0x7fdb1dbb7787 in std_event_loop_once ../../lib/tevent/tevent_standard.c:110
    #21 0x7fdb1dba7466 in _tevent_loop_once ../../lib/tevent/tevent.c:860
    #22 0x7fdb1dbad082 in tevent_req_poll ../../lib/tevent/tevent_req.c:342
    #23 0x7fdb1eaa93d4 in tevent_req_poll_ntstatus ../../lib/util/tevent_ntstatus.c:109
    #24 0x7fdb1de138bb in cli_list ../../source3/libsmb/clilist.c:1188
    #25 0x000000239f0f in do_list ../../source3/client/client.c:853
    #26 0x00000023a93a in cmd_dir ../../source3/client/client.c:936
    #27 0x00000023f090 in process_stdin ../../source3/client/client.c:6215
    #28 0x00000023f090 in process ../../source3/client/client.c:6269
    #29 0x00000023f090 in main ../../source3/client/client.c:6811
    #30 0x7fdb1ac2b2fa in __libc_start_call_main (/lib64/libc.so.6+0x2b2fa) (BuildId: 8523b213e7586a93ab00f6dd476418b1e521e62c)
    #31 0x7ffd7d5613af  ([stack]+0x3a3af)

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Thu Nov  6 09:58:52 UTC 2025 on atb-devel-224

6 weeks agos3:libsmb: Use a long living context for cli_resolve_path()
Andreas Schneider [Thu, 30 Oct 2025 10:03:35 +0000 (11:03 +0100)] 
s3:libsmb: Use a long living context for cli_resolve_path()

Signed-off-by: Andreas Schneider <asn@samba.org>
v

6 weeks agos3:libsmb: Add a talloc context to the internal data structure
Andreas Schneider [Thu, 30 Oct 2025 09:56:43 +0000 (10:56 +0100)] 
s3:libsmb: Add a talloc context to the internal data structure

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
6 weeks agos3:client: Use a long living memory context for cli_cm_open()
Andreas Schneider [Wed, 29 Oct 2025 14:11:37 +0000 (15:11 +0100)] 
s3:client: Use a long living memory context for cli_cm_open()

This will fix memory leaks with a later commit.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
6 weeks agos3:client: Pass down a talloc context to do_cd()
Andreas Schneider [Wed, 29 Oct 2025 10:21:58 +0000 (11:21 +0100)] 
s3:client: Pass down a talloc context to do_cd()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
6 weeks agos3:client: Pass a talloc context down to cmd_*() functions
Andreas Schneider [Wed, 29 Oct 2025 09:12:29 +0000 (10:12 +0100)] 
s3:client: Pass a talloc context down to cmd_*() functions

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
6 weeks agos3:client: Pass down a talloc context to process_command_string()
Andreas Schneider [Wed, 29 Oct 2025 10:07:08 +0000 (11:07 +0100)] 
s3:client: Pass down a talloc context to process_command_string()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
6 weeks agos3:client: Pass down a talloc context to do_tar_op()
Andreas Schneider [Wed, 29 Oct 2025 10:03:45 +0000 (11:03 +0100)] 
s3:client: Pass down a talloc context to do_tar_op()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
6 weeks agos3:client: Pass down a talloc context to do_message_op()
Andreas Schneider [Wed, 29 Oct 2025 10:00:18 +0000 (11:00 +0100)] 
s3:client: Pass down a talloc context to do_message_op()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
6 weeks agos3:client: Pass down a talloc context to do_host_query()
Andreas Schneider [Wed, 29 Oct 2025 09:58:56 +0000 (10:58 +0100)] 
s3:client: Pass down a talloc context to do_host_query()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
6 weeks agos3:client: Pass down a talloc context to process()
Andreas Schneider [Mon, 27 Oct 2025 14:08:53 +0000 (15:08 +0100)] 
s3:client: Pass down a talloc context to process()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
6 weeks agos3:client: Use a stackframe in process_command_string()
Andreas Schneider [Wed, 29 Oct 2025 09:35:16 +0000 (10:35 +0100)] 
s3:client: Use a stackframe in process_command_string()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
6 weeks agos3:client: Only allocate the stackframe once in process_stdin()
Andreas Schneider [Tue, 28 Oct 2025 09:01:00 +0000 (10:01 +0100)] 
s3:client: Only allocate the stackframe once in process_stdin()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
6 weeks agos3:client: Do not call exit() in cmd_quit()
Andreas Schneider [Wed, 29 Oct 2025 09:13:44 +0000 (10:13 +0100)] 
s3:client: Do not call exit() in cmd_quit()

We want to go through deallocation in the main function.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
6 weeks agos3:client: Always goto out (destructor) in do_cd()
Andreas Schneider [Tue, 28 Oct 2025 09:06:25 +0000 (10:06 +0100)] 
s3:client: Always goto out (destructor) in do_cd()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
6 weeks agos3:client: Make cmd_iosize() static
Andreas Schneider [Wed, 29 Oct 2025 09:25:39 +0000 (10:25 +0100)] 
s3:client: Make cmd_iosize() static

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
6 weeks agos3-smbd: send notifications for ACL changes
Günther Deschner [Thu, 2 Oct 2025 14:04:42 +0000 (16:04 +0200)] 
s3-smbd: send notifications for ACL changes

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

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Nov  6 02:42:06 UTC 2025 on atb-devel-224

6 weeks agos4-torture: add test for FILE_NOTIFY_CHANGE_SECURITY
Günther Deschner [Sun, 12 Oct 2025 12:25:12 +0000 (14:25 +0200)] 
s4-torture: add test for FILE_NOTIFY_CHANGE_SECURITY

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

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 weeks agowireshark-pidl: Don't warn about unused hfs used in CODE blocks
John Thacker [Sun, 12 Oct 2025 19:18:11 +0000 (15:18 -0400)] 
wireshark-pidl: Don't warn about unused hfs used in CODE blocks

From the Wireshark development branch:

    commit 4f55543f6b6e5c5d15572889a2cac2b0ec28200e
    Author: John Thacker <johnthacker@gmail.com>
    Date:   Fri Oct 10 11:10:13 2025 -0400

        pidl: Check if a hf is used in a CODE block

        If a field declared in a conformance file appears within a custom
        CODE block in the conformance file, don't warn about the hf being
        unused. This theoretically could have false negatives if a field
        is mentioned only in a comment in the CODE block; we'd have to
        remove the comments with something like Regexp::Common before
        searching to avoid that.

        The current conformance files in the Wireshark distribution don't
        have any such false negative cases, but there are dozens of false
        positives prevented by this change.

Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Nov  5 11:12:35 UTC 2025 on atb-devel-224

6 weeks agowireshark-pidl: Do not calculate functions replaced by manual code
John Thacker [Sun, 12 Oct 2025 19:14:47 +0000 (15:14 -0400)] 
wireshark-pidl: Do not calculate functions replaced by manual code

From the Wireshark development branch:

    commit d2232d7e51640e0e736d7b8df1b21598a21a1c85
    Author: John Thacker <johnthacker@gmail.com>
    Date:   Fri Oct 10 23:02:58 2025 -0400

        pidl: Do not produce a function that is replaced by MANUAL code

        If a MANUAL directive in a conformance file causes a function not to be
        emitted, do not bother calculating the function that will not be used.
        This is similar to the NOEMIT directive, but has different logic because
        MANUAL only prevents emitting the function for one level of an element
        instead of all the functions and variables. This does not change the
        dissectors produced at all, only skips some unnecessary compilation.

        In particular, the messages when compiling the pidl-dissectors target:

        dnsserver.idl:159: error: Inline arrays not supported
        eventlog.idl:54: error: Inline arrays not supported

        are no longer inaccurately produced. The inline arrays in those two IDL
        files have long been supported through the MANUAL code blocks.

        Expand on the error message to suggest the use of MANUAL directives
        for implementation.

Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 weeks agowireshark-pidl: Fix filter names for subcontext length fields
John Thacker [Sun, 12 Oct 2025 19:11:39 +0000 (15:11 -0400)] 
wireshark-pidl: Fix filter names for subcontext length fields

From the Wireshark development branch:

    commit e3d8636109182d7e243eea6216af7f14edda3227
    Author: John Thacker <johnthacker@gmail.com>
    Date:   Thu Oct 9 20:06:43 2025 -0400

        pidl: Fix filter names for subcontext length fields

        The Perl variable $_->{NAME} never exists at the point in the code;
        $e->{NAME} is almost surely intended instead, which makes the subcontext
        length field have the same filter name as the parent field with
        ".subcontext" added.

        This changes a few fields, including making some fields in the same
        struct or union that incorrectly shared a filter name now have unique
        filter names. Also prevents Perl warnings:

        Use of uninitialized value in concatenation (.) or string at /builds/wireshark/wireshark/tools/pid
    l/lib/Parse/Pidl/Wireshark/NDR.pm line 438.

Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 weeks agowireshark-pidl: Check for undefined SwitchType first
John Thacker [Sun, 12 Oct 2025 19:07:00 +0000 (15:07 -0400)] 
wireshark-pidl: Check for undefined SwitchType first

From the Wireshark development branch:

    commit edc98c1b537cbd7b8fb35cdb8b61b7dd000a1544
    Author: John Thacker <johnthacker@gmail.com>
    Date:   Thu Oct 9 18:31:35 2025 -0400

        pidl: Check for undefined SwitchType first

        If the switch type is not defined (e.g. in a union with no
        discriminant) check for that first instead of doing a bunch of
        comparisons with an uninitialized scalar variable. Doesn't change
        the dissector results, but prevents a bunch of Perl warnings:

        Use of uninitialized value $t in hash element at /wireshark/tools/pidl/lib/Parse/Pidl/Typelist.pm
    line 194.
        Use of uninitialized value in string eq at /wireshark/tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm l
    ine 480.
        Use of uninitialized value in string eq at /wireshark/tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm l
    ine 482.
        Use of uninitialized value in string eq at /wireshark/tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm l
    ine 484.

Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 weeks agowireshark-pidl: Warn appropriately on unsupported switch_is discriminants
John Thacker [Sun, 12 Oct 2025 19:00:35 +0000 (15:00 -0400)] 
wireshark-pidl: Warn appropriately on unsupported switch_is discriminants

From the Wireshark development branch:

    commit 448a0d6a239f3f274d3a3a3a39ea9c6ce7fd2611
    Author: John Thacker <johnthacker@gmail.com>
    Date:   Thu Oct 9 10:18:07 2025 -0400

        pidl: Warn appropriately on unsupported switch_is discriminants

        Microsoft's MIDL supports switch_is discriminants which have limited
        C-language expressions including conditionals, logical, relational,
        and arithmetic expressions. [1] Some of the distributed IDL files include
        such expressions. The current handling in PIDL's Wireshark NDR.pm only
        supports a single identifier (possibly a pointer), which appears to be
        the way it is defined in the original DCE IDL. [2,3]

        In addition, the switch_is discriminant may simply be misspelled or
        otherwise not found when parsing, leading to an empty array reference.
        Test for the empty array in order to produce a helpful warning message
        with the filename and line number, instead of unhelpful Perl warnings.

        This does not provide support for the construct not affect the generated
        dissectors at all, only reduces 4 unclear warnings into a single useful
        warning.

        Before:
        Use of uninitialized value $name in string ne at /home/johnthacker/wireshark/tools/pidl/lib/Parse/
    Pidl/Wireshark/NDR.pm line 516.
        Use of uninitialized value in string eq at /home/johnthacker/wireshark/tools/pidl/lib/Parse/Pidl/W
    ireshark/NDR.pm line 525.
        Use of uninitialized value $name in string ne at /home/johnthacker/wireshark/tools/pidl/lib/Parse/
    Pidl/Wireshark/NDR.pm line 527.
        Use of uninitialized value $name in string ne at /home/johnthacker/wireshark/tools/pidl/lib/Parse/
    Pidl/Wireshark/NDR.pm line 531.

        After:
        drsuapi.idl:828: warning: ctr switch_is discriminant `level|(type<<16)' not found. (Only single id
    entifiers are supported, not expressions as in MIDL.)

        [1] - https://learn.microsoft.com/en-us/windows/win32/midl/switch-is
        [2] - https://pubs.opengroup.org/onlinepubs/9629399/chap4.htm#tagcjh_08_02_12
        [3] - https://pubs.opengroup.org/onlinepubs/9629399/chap4.htm#tagcjh_08_04

Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 weeks agowireshark-pidl: Reduce Perl strict warnings
John Thacker [Sun, 12 Oct 2025 18:56:40 +0000 (14:56 -0400)] 
wireshark-pidl: Reduce Perl strict warnings

From the Wireshark git development branch:

    commit 8dee8601776175a6132bef7ab19f36ee3d589d06
    Author: John Thacker <johnthacker@gmail.com>
    Date:   Wed Oct 8 17:15:56 2025 -0400

        pidl: Use has_property to avoid comparing undef with the empty string

        Prevents a bunch of (harmless) warnings when compiling:

        Use of uninitialized value in string eq at /builds/wireshark/wireshark/tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm line 521.

Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 weeks agowireshark-pidl: Reduce false positive warnings when compiling
John Thacker [Sun, 12 Oct 2025 18:53:49 +0000 (14:53 -0400)] 
wireshark-pidl: Reduce false positive warnings when compiling

From the Wireshark git repository, to reduce false positive warnings when
compiling dissectors with pidl:

    commit 919f15ab2ea313d69cc2578426430f22f65a51b5
    Author: John Thacker <johnthacker@gmail.com>
    Date:   Wed Oct 8 16:52:09 2025 -0400

        pidl: Don't warn about params that are used

        The "USED" indicator is never set for params, which results in many
        bogus "warning: dissector param never used" messages when compiling
        the pidl dissectors. Set it when used, to reduce the number of messages.

Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 weeks agodocs-xml: Document samba-tool subcommand to generate Certificate Signing Requests
Jennifer Sutton [Mon, 3 Nov 2025 03:50:52 +0000 (16:50 +1300)] 
docs-xml: Document samba-tool subcommand to generate Certificate Signing Requests

Signed-off-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Wed Nov  5 05:13:01 UTC 2025 on atb-devel-224

6 weeks agosamba-tool: Add subcommand to generate Certificate Signing Requests with SID extension
Jennifer Sutton [Wed, 8 Oct 2025 01:34:25 +0000 (14:34 +1300)] 
samba-tool: Add subcommand to generate Certificate Signing Requests with SID extension

Signed-off-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
6 weeks agopython: Factor out asn.1 methods into their own module
Jennifer Sutton [Sun, 2 Nov 2025 21:45:44 +0000 (10:45 +1300)] 
python: Factor out asn.1 methods into their own module

Signed-off-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
6 weeks agosamba-tool: Fix comments
Jennifer Sutton [Tue, 7 Oct 2025 21:58:53 +0000 (10:58 +1300)] 
samba-tool: Fix comments

Signed-off-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
6 weeks agopython:tests: Fix code spelling
Jennifer Sutton [Thu, 23 Oct 2025 23:25:15 +0000 (12:25 +1300)] 
python:tests: Fix code spelling

Signed-off-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
6 weeks agovfs_recycle: Make recycle:touch/touch_mtime work again if recycle:keeptree is set
Pavel Filipenský [Fri, 24 Oct 2025 22:24:35 +0000 (00:24 +0200)] 
vfs_recycle: Make recycle:touch/touch_mtime work again if recycle:keeptree is set

Problem: Since commit c7839fa smbd: Remove non_widelink_open()

the atime/mtime is not updated if recycle:keeptree is set

        recycle:keeptree = yes
        recycle:touch = yes
        recycle:touch_mtime = yes

Cause: recycle_do_touch() fails since the path ".deleted/administrator/./file"
contains a dot '.' - openat_pathref_fsp_nosymlink() loops over all
components and fails if there is a dot:

[2025/10/24 20:09:24.618003, 10, pid=95965, effective(65534, 65534), real(65534, 0)] ../../source3/smbd/files.c:1144(openat_pathref_fsp_nosymlink)
  openat_pathref_fsp_nosymlink: .deleted/administrator/. contains a dot
[2025/10/24 20:09:24.618007,  5, pid=95965, effective(65534, 65534), real(65534, 0)] ../../source3/smbd/files.c:2337(file_free)
  file_free: freed files structure 0 (4 used)
[2025/10/24 20:09:24.618010, 10, pid=95965, effective(65534, 65534), real(65534, 0)] ../../source3/smbd/filename.c:811(filename_convert_dirfsp_nosymlink)
  filename_convert_dirfsp_nosymlink: opening directory .deleted/administrator/. failed: NT_STATUS_OBJECT_NAME_INVALID
[2025/10/24 20:09:24.618014, 10, pid=95965, effective(65534, 65534), real(65534, 0)] ../../source3/smbd/open.c:568(fd_openat)
  fd_openat: filename_convert_dirfsp_rel returned NT_STATUS_OBJECT_PATH_NOT_FOUND
[2025/10/24 20:09:24.618021, 10, pid=95965, effective(65534, 65534), real(65534, 0)] ../../source3/smbd/files.c:487(openat_pathref_fullname)
  openat_pathref_fullname: Opening pathref for [.deleted/administrator/./file] failed: NT_STATUS_OBJECT_NAME_NOT_FOUND

Here is a backtrace when openat_pathref_fsp_nosymlink() hits: DBG_DEBUG("%s contains a dot\n", path_in);

0  openat_pathref_fsp_nosymlink (mem_ctx=0x353463c0, conn=0x35322350, in_dirfsp=0x3532a820, path_in=0x3533afe0 ".trash/.", twrp=0, posix=true, _smb_fname=0x7ffdb25df138, _symlink_err=0x7ffdb25df140) at ../../source3/smbd/files.c:1144
1  filename_convert_dirfsp_nosymlink (mem_ctx=0x353463c0, conn=0x35322350, basedir=0x3532a820, name_in=0x35321a80 ".trash/./mmm", ucf_flags=8, twrp=0, _dirfsp=0x7ffdb25df370, _smb_fname=0x7ffdb25df378, _smb_fname_rel=0x7ffdb25df380, _symlink_err=0x7ffdb25df2d8) at ../../source3/smbd/filename.c:782
2  filename_convert_dirfsp_rel (mem_ctx=0x353463c0, conn=0x35322350, basedir=0x3532a820, name_in=0x35321a80 ".trash/./mmm", ucf_flags=8, twrp=0, _dirfsp=0x7ffdb25df370, _smb_fname=0x7ffdb25df378, _smb_fname_rel=0x7ffdb25df380) at ../../source3/smbd/filename.c:1097
3  fd_openat (dirfsp=0x3532a820, smb_fname=0x35321950, fsp=0x3531b670, _how=0x7ffdb25df4b0) at ../../source3/smbd/open.c:549
4  openat_pathref_fullname (conn=0x35322350, dirfsp=0x3532a820, full_fname=0x7ffdb25df498, smb_fname=0x35321950, how=0x7ffdb25df4b0) at ../../source3/smbd/files.c:437
5  openat_pathref_fsp (dirfsp=0x3532a820, smb_fname=0x35321950) at ../../source3/smbd/files.c:545
6  synthetic_pathref (mem_ctx=0x353463c0, dirfsp=0x3532a820, base_name=0x35346ef0 ".trash/./mmm", stream_name=0x0, psbuf=0x0, twrp=0, flags=0, _smb_fname=0x7ffdb25df578) at ../../source3/smbd/files.c:1871
7  recycle_do_touch (handle=0x35311cb0, smb_fname=0x35346dc0, touch_mtime=true) at ../../source3/modules/vfs_recycle.c:439
8  recycle_unlink_internal (handle=0x35311cb0, dirfsp=0x352592a0, smb_fname=0x35335eb0, flags=0) at ../../source3/modules/vfs_recycle.c:726
9  recycle_unlinkat (handle=0x35311cb0, dirfsp=0x352592a0, smb_fname=0x35335eb0, flags=0) at ../../source3/modules/vfs_recycle.c:746
10 smb_vfs_call_unlinkat (handle=0x35311cb0, dirfsp=0x352592a0, smb_fname=0x35335eb0, flags=0) at ../../source3/smbd/vfs.c:1987
11 close_remove_share_mode (fsp=0x35344a40, close_type=NORMAL_CLOSE) at ../../source3/smbd/close.c:624
12 close_normal_file (req=0x35336eb0, fsp=0x35344a40, close_type=NORMAL_CLOSE) at ../../source3/smbd/close.c:932
13 close_file_smb (req=0x35336eb0, fsp=0x35344a40, close_type=NORMAL_CLOSE) at ../../source3/smbd/close.c:1414

Fix: If the path_name is '.', just do not add it.

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

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org>
Autobuild-Date(master): Tue Nov  4 11:38:52 UTC 2025 on atb-devel-224

6 weeks agovfs_recycle: Fix trailing whitespace in vfs_recycle.c
Pavel Filipenský [Fri, 24 Oct 2025 22:24:33 +0000 (00:24 +0200)] 
vfs_recycle: Fix trailing whitespace in vfs_recycle.c

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

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 weeks agoselftest: Add a test for recycle:touch,touch_mtime,keeptree
Pavel Filipenský [Sun, 26 Oct 2025 20:01:40 +0000 (21:01 +0100)] 
selftest: Add a test for recycle:touch,touch_mtime,keeptree

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

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 weeks agoRemove previous himmelblau integration attempt
David Mulder [Thu, 28 Aug 2025 19:09:36 +0000 (13:09 -0600)] 
Remove previous himmelblau integration attempt

This was a project attempting to integrate
Himmelblau into Samba, but it has been
abandoned.

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): David Mulder <dmulder@samba.org>
Autobuild-Date(master): Tue Nov  4 09:09:40 UTC 2025 on atb-devel-224

7 weeks agonsswitch: Do not leak memory in wbinfo_pam_logon() of wbinfo
Andreas Schneider [Wed, 22 Oct 2025 09:47:43 +0000 (11:47 +0200)] 
nsswitch: Do not leak memory in wbinfo_pam_logon() of wbinfo

We need to always free the memory, not only if verbose mode is wanted.

Direct leak of 40 byte(s) in 1 object(s) allocated from:
    #0 0x7f4df73215a3 in calloc (/lib64/libasan.so.8+0x1215a3) (BuildId: 388ee9ac193f74c177c6f52988d2d0dab110de41)
    #1 0x7f4df712833f in wbcAllocateMemory ../../nsswitch/libwbclient/wbclient.c:216
    #2 0x7f4df712d996 in wbc_create_logon_info ../../nsswitch/libwbclient/wbc_pam.c:326
    #3 0x7f4df712d996 in wbcCtxLogonUser ../../nsswitch/libwbclient/wbc_pam.c:1288
    #4 0x7f4df712dda5 in wbcLogonUser ../../nsswitch/libwbclient/wbc_pam.c:1311
    #5 0x00000021c014 in wbinfo_pam_logon ../../nsswitch/wbinfo.c:1995
    #6 0x00000021c014 in main ../../nsswitch/wbinfo.c:3209
    #7 0x7f4df422b2fa in __libc_start_call_main (/lib64/libc.so.6+0x2b2fa) (BuildId: 8523b213e7586a93ab00f6dd476418b1e521e62c)
    #8 0x7ffc9aee3e03  ([stack]+0x20e03)

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Thu Oct 30 09:11:26 UTC 2025 on atb-devel-224

7 weeks agovfs_streams_xattr: Fix CID 1667321 REVERSE_INULL
Shwetha K Acharya [Wed, 29 Oct 2025 11:12:47 +0000 (16:42 +0530)] 
vfs_streams_xattr: Fix CID 1667321 REVERSE_INULL

Remove NULL check for fsp. A NULL fsp is a fatal error
that should never occur in this context.

Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.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 Oct 29 14:43:28 UTC 2025 on atb-devel-224

7 weeks agovfs_streams_xattr: Fix CID 1667323 Resource Leak
Shwetha K Acharya [Tue, 28 Oct 2025 06:06:04 +0000 (11:36 +0530)] 
vfs_streams_xattr: Fix CID 1667323 Resource Leak

val was not freed on early return paths; addressed it using
done block.

Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
7 weeks agolib:ldb:tests: Fix memory leaks in ldb_lmdb_free_list_test
Andreas Schneider [Mon, 14 Oct 2024 13:52:53 +0000 (15:52 +0200)] 
lib:ldb:tests: Fix memory leaks in ldb_lmdb_free_list_test

Found by Leak Sanitizer

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Wed Oct 29 12:18:43 UTC 2025 on atb-devel-224

7 weeks agolib:ldb:tests: Avoid memory leaks in ldb_kv_ops test
Andreas Schneider [Mon, 14 Oct 2024 13:33:29 +0000 (15:33 +0200)] 
lib:ldb:tests: Avoid memory leaks in ldb_kv_ops test

Detected by Leak Sanitizer.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Anoop C S <anoopcs@samba.org>
7 weeks agoWHATSNEW: Mention MR 4212
Volker Lendecke [Wed, 22 Oct 2025 05:13:29 +0000 (07:13 +0200)] 
WHATSNEW: Mention MR 4212

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): Sun Oct 26 09:10:57 UTC 2025 on atb-devel-224

8 weeks agos3:client: Use talloc to avoid memory leaks in smbspool
Andreas Schneider [Wed, 22 Oct 2025 09:24:24 +0000 (11:24 +0200)] 
s3:client: Use talloc to avoid memory leaks in smbspool

The function uri_unescape_alloc() is called by main() which has a talloc
stackframe.

Direct leak of 13 byte(s) in 1 object(s) allocated from:
    #0 0x7fc31351b9a0 in strdup (/lib64/libasan.so.8+0x11b9a0) (BuildId: 388ee9ac193f74c177c6f52988d2d0dab110de41)
    #1 0x7fc3129cfb50 in smb_xstrdup ../../lib/util/util.c:760
    #2 0x0000002059f8 in uri_unescape_alloc ../../source3/client/smbspool.c:888
    #3 0x00000020752a in main ../../source3/client/smbspool.c:347
    #4 0x7fc30f62b2fa in __libc_start_call_main (/lib64/libc.so.6+0x2b2fa) (BuildId: 8523b213e7586a93ab00f6dd476418b1e521e62c)
    #5 0x7ffd8bb806be  ([stack]+0x3b6be)

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Fri Oct 24 07:42:37 UTC 2025 on atb-devel-224

8 weeks agodocs-xml: Document SID extension certificate mappings
Jennifer Sutton [Tue, 14 Oct 2025 04:05:20 +0000 (17:05 +1300)] 
docs-xml: Document SID extension certificate mappings

Signed-off-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Autobuild-User(master): Jennifer Sutton <jsutton@samba.org>
Autobuild-Date(master): Thu Oct 23 01:03:36 UTC 2025 on atb-devel-224

8 weeks agos4:kdc: Implement Object SID certificate security extension
Jennifer Sutton [Mon, 25 Aug 2025 00:40:09 +0000 (12:40 +1200)] 
s4:kdc: Implement Object SID certificate security extension

Signed-off-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
8 weeks agothird_party/heimdal: Import lorikeet-heimdal-202510122217 (commit c2d91bdde528ba018da...
Jennifer Sutton [Sun, 12 Oct 2025 22:25:48 +0000 (11:25 +1300)] 
third_party/heimdal: Import lorikeet-heimdal-202510122217 (commit c2d91bdde528ba018da27b88baa22b46f323f659)

Signed-off-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
8 weeks agos4:kdc: Don’t leak pub_keys.keys
Jennifer Sutton [Thu, 9 Oct 2025 04:09:40 +0000 (17:09 +1300)] 
s4:kdc: Don’t leak pub_keys.keys

Signed-off-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
8 weeks agos4:kdc: Move talloc_steal() back to function end
Jennifer Sutton [Fri, 3 Oct 2025 02:14:00 +0000 (15:14 +1300)] 
s4:kdc: Move talloc_steal() back to function end

Signed-off-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
8 weeks agos4:kdc: Correct debug messages
Jennifer Sutton [Fri, 3 Oct 2025 02:12:19 +0000 (15:12 +1300)] 
s4:kdc: Correct debug messages

Signed-off-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>