s3:utils: Fix memory leaks in test_lm_ntlm_broken()
Direct leak of 104 byte(s) in 1 object(s) allocated from:
#0 0x7f72126fc777 in malloc ../../../../libsanitizer/asan/asan_malloc_linux.cpp:69
#1 0x7f72122e8c57 in __talloc_with_prefix ../../lib/talloc/talloc.c:783
#2 0x7f72122eaacf in __talloc ../../lib/talloc/talloc.c:825
#3 0x7f72122eaacf in _talloc_named_const ../../lib/talloc/talloc.c:982
#4 0x7f72122eaacf in _talloc_array ../../lib/talloc/talloc.c:2784
#5 0x7f72118f6a99 in data_blob_talloc_named ../../lib/util/data_blob.c:58
#6 0x7f72118f6b1b in data_blob_named ../../lib/util/data_blob.c:40
#7 0x55b8512f889c in get_challenge ../../source3/utils/ntlm_auth.c:375
#8 0x55b8512fe1a1 in test_lm_ntlm_broken ../../source3/utils/ntlm_auth_diagnostics.c:63
#9 0x55b8512fec4e in test_lm_ntlm ../../source3/utils/ntlm_auth_diagnostics.c:477
#10 0x55b8513009b6 in diagnose_ntlm_auth ../../source3/utils/ntlm_auth_diagnostics.c:716\n #11 0x55b8512fcefd in main ../../source3/utils/ntlm_auth.c:2855\n #12 0x7f720ee2a2ad in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58\n\nDirect leak of 104 byte(s) in 1 object(s) allocated from:\n #0 0x7f72126fc777 in malloc ../../../../libsanitizer/asan/asan_malloc_linux.cpp:69\n #1 0x7f72122e8c57 in __talloc_with_prefix ../../lib/talloc/talloc.c:783\n #2 0x7f72122eaacf in __talloc ../../lib/talloc/talloc.c:825\n #3 0x7f72122eaacf in _talloc_named_const ../../lib/talloc/talloc.c:982\n #4 0x7f72122eaacf in _talloc_array ../../lib/talloc/talloc.c:2784\n #5 0x7f72118f6a99 in data_blob_talloc_named ../../lib/util/data_blob.c:58\n #6 0x7f72118f6b1b in data_blob_named ../../lib/util/data_blob.c:40\n #7 0x55b8512f889c in get_challenge ../../source3/utils/ntlm_auth.c:375\n #8 0x55b8513000c1 in test_lmv2_ntlmv2_broken ../../source3/utils/ntlm_auth_diagnostics.c:379\n #9 0x55b851300926 in test_lmv2_ntlmv2 ../../source3/utils/ntlm_auth_diagnostics.c:454\n #10 0x55b8513009b6 in diagnose_ntlm_auth ../../source3/utils/ntlm_auth_diagnostics.c:716\n #11 0x55b8512fcefd in main ../../source3/utils/ntlm_auth.c:2855\n #12 0x7f720ee2a2ad in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58\n\nDirect leak of 104 byte(s) in 1 object(s) allocated from:\n #0 0x7f72126fc777 in malloc ../../../../libsanitizer/asan/asan_malloc_linux.cpp:69\n #1 0x7f72122e8c57 in __talloc_with_prefix ../../lib/talloc/talloc.c:783\n #2 0x7f72122eaacf in __talloc ../../lib/talloc/talloc.c:825\n #3 0x7f72122eaacf in _talloc_named_const ../../lib/talloc/talloc.c:982\n #4 0x7f72122eaacf in _talloc_array ../../lib/talloc/talloc.c:2784\n #5 0x7f72118f6a99 in data_blob_talloc_named ../../lib/util/data_blob.c:58\n #6 0x7f72118f6b1b in data_blob_named ../../lib/util/data_blob.c:40\n #7 0x55b8512f889c in get_challenge ../../source3/utils/ntlm_auth.c:375\n #8 0x55b8512ff72c in test_ntlm_in_lm ../../source3/utils/ntlm_auth_diagnostics.c:202\n #9 0x55b8513009b6 in diagnose_ntlm_auth ../../source3/utils/ntlm_auth_diagnostics.c:716\n #10 0x55b8512fcefd in main ../../source3/utils/ntlm_auth.c:2855\n #11 0x7f720ee2a2ad in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58\n\nDirect leak of 104 byte(s) in 1 object(s) allocated from:\n #0 0x7f72126fc777 in malloc ../../../../libsanitizer/asan/asan_malloc_linux.cpp:69\n #1 0x7f72122e8c57 in __talloc_with_prefix ../../lib/talloc/talloc.c:783\n #2 0x7f72122eaacf in __talloc ../../lib/talloc/talloc.c:825\n #3 0x7f72122eaacf in _talloc_named_const ../../lib/talloc/talloc.c:982\n #4 0x7f72122eaacf in _talloc_array ../../lib/talloc/talloc.c:2784\n #5 0x7f72118f6a99 in data_blob_talloc_named ../../lib/util/data_blob.c:58\n #6 0x7f72118f6b1b in data_blob_named ../../lib/util/data_blob.c:40\n #7 0x55b8512f889c in get_challenge ../../source3/utils/ntlm_auth.c:375\n #8 0x55b8512fee10 in test_ntlm_in_both ../../source3/utils/ntlm_auth_diagnostics.c:291\n #9 0x55b8513009b6 in diagnose_ntlm_auth ../../source3/utils/ntlm_auth_diagnostics.c:716\n #10 0x55b8512fcefd in main ../../source3/utils/ntlm_auth.c:2855\n #11 0x7f720ee2a2ad in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58\n\nDirect leak of 104 byte(s) in 1 object(s) allocated from:\n #0 0x7f72126fc777 in malloc ../../../../libsanitizer/asan/asan_malloc_linux.cpp:69\n #1 0x7f72122e8c57 in __talloc_with_prefix ../../lib/talloc/talloc.c:783\n #2 0x7f72122eaacf in __talloc ../../lib/talloc/talloc.c:825\n #3 0x7f72122eaacf in _talloc_named_const ../../lib/talloc/talloc.c:982\n #4 0x7f72122eaacf in _talloc_array ../../lib/talloc/talloc.c:2784\n #5 0x7f72118f6a99 in data_blob_talloc_named ../../lib/util/data_blob.c:58\n #6 0x7f72118f6b1b in data_blob_named ../../lib/util/data_blob.c:40\n #7 0x55b8512f889c in get_challenge ../../source3/utils/ntlm_auth.c:375\n #8 0x55b8513000c1 in test_lmv2_ntlmv2_broken ../../source3/utils/ntlm_auth_diagnostics.c:379\n #9 0x55b851300936 in test_ntlmv2 ../../source3/utils/ntlm_auth_diagnostics.c:472\n #10 0x55b8513009b6 in diagnose_ntlm_auth ../../source3/utils/ntlm_auth_diagnostics.c:716\n #11 0x55b8512fcefd in main ../../source3/utils/ntlm_auth.c:2855\n #12 0x7f720ee2a2ad in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58\n\nDirect leak of 104 byte(s) in 1 object(s) allocated from:\n #0 0x7f72126fc777 in malloc ../../../../libsanitizer/asan/asan_malloc_linux.cpp:69\n #1 0x7f72122e8c57 in __talloc_with_prefix ../../lib/talloc/talloc.c:783\n #2 0x7f72122eaacf in __talloc ../../lib/talloc/talloc.c:825\n #3 0x7f72122eaacf in _talloc_named_const ../../lib/talloc/talloc.c:982\n #4 0x7f72122eaacf in _talloc_array ../../lib/talloc/talloc.c:2784\n #5 0x7f72118f6a99 in data_blob_talloc_named ../../lib/util/data_blob.c:58\n #6 0x7f72118f6b1b in data_blob_named ../../lib/util/data_blob.c:40\n #7 0x55b8512f889c in get_challenge ../../source3/utils/ntlm_auth.c:375\n #8 0x55b8512fe1a1 in test_lm_ntlm_broken ../../source3/utils/ntlm_auth_diagnostics.c:63\n #9 0x55b8512fec3a in test_ntlm ../../source3/utils/ntlm_auth_diagnostics.c:185\n #10 0x55b8513009b6 in diagnose_ntlm_auth ../../source3/utils/ntlm_auth_diagnostics.c:716\n #11 0x55b8512fcefd in main ../../source3/utils/ntlm_auth.c:2855\n #12 0x7f720ee2a2ad in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58\n\nDirect leak of 104 byte(s) in 1 object(s) allocated from:\n #0 0x7f72126fc777 in malloc ../../../../libsanitizer/asan/asan_malloc_linux.cpp:69\n #1 0x7f72122e8c57 in __talloc_with_prefix ../../lib/talloc/talloc.c:783\n #2 0x7f72122eaacf in __talloc ../../lib/talloc/talloc.c:825\n #3 0x7f72122eaacf in _talloc_named_const ../../lib/talloc/talloc.c:982\n #4 0x7f72122eaacf in _talloc_array ../../lib/talloc/talloc.c:2784\n #5 0x7f72118f6a99 in data_blob_talloc_named ../../lib/util/data_blob.c:58\n #6 0x7f72118f6b1b in data_blob_named ../../lib/util/data_blob.c:40\n #7 0x55b8512f889c in get_challenge ../../source3/utils/ntlm_auth.c:375\n #8 0x55b8513000c1 in test_lmv2_ntlmv2_broken ../../source3/utils/ntlm_auth_diagnostics.c:379\n #9 0x55b851300916 in test_lmv2 ../../source3/utils/ntlm_auth_diagnostics.c:463\n #10 0x55b8513009b6 in diagnose_ntlm_auth ../../source3/utils/ntlm_auth_diagnostics.c:716\n #11 0x55b8512fcefd in main ../../source3/utils/ntlm_auth.c:2855\n #12 0x7f720ee2a2ad in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58\n\nDirect leak of 104 byte(s) in 1 object(s) allocated from:\n #0 0x7f72126fc777 in malloc ../../../../libsanitizer/asan/asan_malloc_linux.cpp:69\n #1 0x7f72122e8c57 in __talloc_with_prefix ../../lib/talloc/talloc.c:783\n #2 0x7f72122eaacf in __talloc ../../lib/talloc/talloc.c:825\n #3 0x7f72122eaacf in _talloc_named_const ../../lib/talloc/talloc.c:982\n #4 0x7f72122eaacf in _talloc_array ../../lib/talloc/talloc.c:2784\n #5 0x7f72118f6a99 in data_blob_talloc_named ../../lib/util/data_blob.c:58\n #6 0x7f72118f6b1b in data_blob_named ../../lib/util/data_blob.c:40\n #7 0x55b8512f889c in get_challenge ../../source3/utils/ntlm_auth.c:375\n #8 0x55b8513000c1 in test_lmv2_ntlmv2_broken ../../source3/utils/ntlm_auth_diagnostics.c:379\n #9 0x55b851300906 in test_ntlmv2_lmv2_broken ../../source3/utils/ntlm_auth_diagnostics.c:492\n #10 0x55b8513009b6 in diagnose_ntlm_auth ../../source3/utils/ntlm_auth_diagnostics.c:716\n #11 0x55b8512fcefd in main ../../source3/utils/ntlm_auth.c:2855\n #12 0x7f720ee2a2ad in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58\n\nDirect leak of 104 byte(s) in 1 object(s) allocated from:\n #0 0x7f72126fc777 in malloc ../../../../libsanitizer/asan/asan_malloc_linux.cpp:69\n #1 0x7f72122e8c57 in __talloc_with_prefix ../../lib/talloc/talloc.c:783\n #2 0x7f72122eaacf in __talloc ../../lib/talloc/talloc.c:825\n #3 0x7f72122eaacf in _talloc_named_const ../../lib/talloc/talloc.c:982\n #4 0x7f72122eaacf in _talloc_array ../../lib/talloc/talloc.c:2784\n #5 0x7f72118f6a99 in data_blob_talloc_named ../../lib/util/data_blob.c:58\n #6 0x7f72118f6b1b in data_blob_named ../../lib/util/data_blob.c:40\n #7 0x55b8512f889c in get_challenge ../../source3/utils/ntlm_auth.c:375\n #8 0x55b8513000c1 in test_lmv2_ntlmv2_broken ../../source3/utils/ntlm_auth_diagnostics.c:379\n #9 0x55b8513008f6 in test_ntlmv2_ntlmv2_broken ../../source3/utils/ntlm_auth_diagnostics.c:497\n #10 0x55b8513009b6 in diagnose_ntlm_auth ../../source3/utils/ntlm_auth_diagnostics.c:716\n #11 0x55b8512fcefd in main ../../source3/utils/ntlm_auth.c:2855\n #12 0x7f720ee2a2ad in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58\n\nDirect leak of 104 byte(s) in 1 object(s) allocated from:\n #0 0x7f72126fc777 in malloc ../../../../libsanitizer/asan/asan_malloc_linux.cpp:69\n #1 0x7f72122e8c57 in __talloc_with_prefix ../../lib/talloc/talloc.c:783\n #2 0x7f72122eaacf in __talloc ../../lib/talloc/talloc.c:825\n #3 0x7f72122eaacf in _talloc_named_const ../../lib/talloc/talloc.c:982\n #4 0x7f72122eaacf in _talloc_array ../../lib/talloc/talloc.c:2784\n #5 0x7f72118f6a99 in data_blob_talloc_named ../../lib/util/data_blob.c:58\n #6 0x7f72118f6b1b in data_blob_named ../../lib/util/data_blob.c:40\n #7 0x55b8512f889c in get_challenge ../../source3/utils/ntlm_auth.c:375\n #8 0x55b8512fe1a1 in test_lm_ntlm_broken ../../source3/utils/ntlm_auth_diagnostics.c:63\n #9 0x55b8512fec26 in test_ntlm_lm_broken ../../source3/utils/ntlm_auth_diagnostics.c:482\n #10 0x55b8513009b6 in diagnose_ntlm_auth ../../source3/utils/ntlm_auth_diagnostics.c:716\n #11 0x55b8512fcefd in main ../../source3/utils/ntlm_auth.c:2855\n #12 0x7f720ee2a2ad in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58\n\nDirect leak of 104 byte(s) in 1 object(s) allocated from:\n #0 0x7f72126fc777 in malloc ../../../../libsanitizer/asan/asan_malloc_linux.cpp:69\n #1 0x7f72122e8c57 in __talloc_with_prefix ../../lib/talloc/talloc.c:783\n #2 0x7f72122eaacf in __talloc ../../lib/talloc/talloc.c:825\n #3 0x7f72122eaacf in _talloc_named_const ../../lib/talloc/talloc.c:982\n #4 0x7f72122eaacf in _talloc_array ../../lib/talloc/talloc.c:2784\n #5 0x7f72118f6a99 in data_blob_talloc_named ../../lib/util/data_blob.c:58\n #6 0x7f72118f6b1b in data_blob_named ../../lib/util/data_blob.c:40\n #7 0x55b8512f889c in get_challenge ../../source3/utils/ntlm_auth.c:375\n #8 0x55b8512fe1a1 in test_lm_ntlm_broken ../../source3/utils/ntlm_auth_diagnostics.c:63\n #9 0x55b8512fec62 in test_lm ../../source3/utils/ntlm_auth_diagnostics.c:176\n #10 0x55b8513009b6 in diagnose_ntlm_auth ../../source3/utils/ntlm_auth_diagnostics.c:716\n #11 0x55b8512fcefd in main ../../source3/utils/ntlm_auth.c:2855\n #12 0x7f720ee2a2ad in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58\n\n-----------------------------------------------------\nSuppressions used:\n count bytes template\n 1 125 libpopt.so\n-----------------------------------------------------\n\nSUMMARY: AddressSanitizer: 1144 byte(s) leaked in 11 allocation(s).\n''; message: expected return code 0; got 1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Noel Power <npower@samba.org>
Direct leak of 112 byte(s) in 1 object(s) allocated from:
#0 0x7ff61d8fc777 in malloc ../../../../libsanitizer/asan/asan_malloc_linux.cpp:69
#1 0x7ff61d450c57 in __talloc_with_prefix ../../lib/talloc/talloc.c:783
#2 0x7ff61d452acf in __talloc ../../lib/talloc/talloc.c:825
#3 0x7ff61d452acf in _talloc_named_const ../../lib/talloc/talloc.c:982
#4 0x7ff61d452acf in _talloc_array ../../lib/talloc/talloc.c:2784
#5 0x7ff61c9f6a99 in data_blob_talloc_named ../../lib/util/data_blob.c:58
#6 0x7ff61c9f6b1b in data_blob_named ../../lib/util/data_blob.c:40
#7 0x561cafffad96 in test_ntlm_in_both ../../source3/utils/ntlm_auth_diagnostics.c:285
#8 0x561cafffc8d4 in diagnose_ntlm_auth ../../source3/utils/ntlm_auth_diagnostics.c:714
#9 0x561cafff8efd in main ../../source3/utils/ntlm_auth.c:2855
#10 0x7ff61a02a2ad in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Noel Power <npower@samba.org>
Anoop C S [Sat, 14 Jun 2025 09:02:28 +0000 (14:32 +0530)]
vfs_ceph_new: Handle the special case of UTIME_NOW
As per utimensat(2)[1]:
. . .
If the tv_nsec field of one of the timespec structures has the special
value UTIME_NOW, then the corresponding file timestamp is set to the
current time.
. . .
Instead of utimes() or futimes() we make use of ceph_ll_setattr() with
appropriate mask to update timsestamps. It is also important to note
that ceph_ll_setattr() does not handle timestamps in pairs of timespec
structs. This had a shortcoming that the special consideration for the
magic value UTIME_NOW was left unattended resulting in epoch timestamps.
Therefore we reset those timestamps where UTIME_NOW is set in tv_nsec
with the current time.
Signed-off-by: Anoop C S <anoopcs@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Jun 30 14:16:52 UTC 2025 on atb-devel-224
Anoop C S [Sat, 14 Jun 2025 09:24:52 +0000 (14:54 +0530)]
vfs_ceph: Handle the special case of UTIME_NOW
As per utimensat(2)[1]:
. . .
If the tv_nsec field of one of the timespec structures has the special
value UTIME_NOW, then the corresponding file timestamp is set to the
current time.
. . .
Instead of utimes() or futimes() we make use of ceph_setattrx() with
appropriate mask to update timsestamps. It is also important to note
that ceph_setattrx() does not handle timestamps in pairs of timespec
structs. This had a shortcoming that the special consideration for the
magic value UTIME_NOW was left unattended resulting in epoch timestamps.
Therefore we reset those timestamps where UTIME_NOW is set in tv_nsec
with the current time.
Daniel Widrick [Tue, 24 Jun 2025 02:07:44 +0000 (22:07 -0400)]
s3:winbind: Correct spelling in debug messages related to ADS
Corrected spelling of 'security' from 'secuirity' in debug messages related to ADS
Signed-off-by: Daniel Widrick <daniel@widrick.net> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-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): Sat Jun 28 09:04:56 UTC 2025 on atb-devel-224
As of now smb2_request_to_snum() is only meaningful when profiling is
enabled.
Signed-off-by: Anoop C S <anoopcs@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Tue Jun 24 14:24:57 UTC 2025 on atb-devel-224
Samuel Cabrero [Tue, 27 May 2025 11:46:45 +0000 (13:46 +0200)]
s3:winbind: Delegate normalize_name_unmap to the idmap child in winbindd_getgroups
Delegate name unmapping to the idmap child to avoid blocking the parent while
querying the LDAP server, depending on the idmap configuration.
Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Jun 24 08:51:39 UTC 2025 on atb-devel-224
Shachar Sharon [Mon, 12 May 2025 09:14:52 +0000 (12:14 +0300)]
vfs_ceph_new: use per-share profile macros
Signed-off-by: Shachar Sharon <ssharon@redhat.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Mon Jun 23 14:01:51 UTC 2025 on atb-devel-224
Iterate over per-share TDB entries (is exists) and export as Prometheus
metrics via call-back function.
Allow passing share-name as additional label to Prometheus metrics. By
default, use empty label to follow OpenMetrics[1] conventions ("Empty
label values SHOULD be treated as if the label was not present").
Allow per-share profile counters by setting a configure option
'smbd profiling share = yes' on each share which wants this option
enabled. Requires global profiling to be enabled.
Signed-off-by: Shachar Sharon <ssharon@redhat.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
profile: defined helper macros for per-share counters
Helper macros the use per-share profile counters, using 'snum' as
lookup key.
Signed-off-by: Shachar Sharon <ssharon@redhat.com> Co-Authored-By: Anoop C S <anoopcs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
Mechanism to support per-share per-process run-time profiling counters.
Use in-memory cache for storing run-time entries, using 'snum' as key.
When storing in TDB file, uses unique key for each per-share profile
entry.
Signed-off-by: Shachar Sharon <ssharon@redhat.com> Signed-off-by: Avan Thakkar <athakkar@redhat.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
Volker Lendecke [Thu, 19 Jun 2025 15:44:31 +0000 (17:44 +0200)]
auth: Direct variable initialization
talloc_stackframe() panics on failure
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): Fri Jun 20 11:12:14 UTC 2025 on atb-devel-224
Coverity ID "1649525 Use of 32-bit time_t" is correct. What Coverity
does not see is that this routine is the only one assigning to
ev->wait_timeout. Make Coverity happy with the MIN().
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
Gary Lockyer [Tue, 10 Jun 2025 21:04:01 +0000 (09:04 +1200)]
librpc/idl: Add idl for msDS-KeyCredentialLink
Idl and supporting helpers for msDS-KeyCredentialLinks.
See [MS-ADTS] 2.2.20 Key Credential Link Structures
Currently the KeyMaterial is treated as a binary blob
The naming and casing of the variable names is close as is possible to
those in the specification.
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): Thu Jun 19 00:08:31 UTC 2025 on atb-devel-224
s3:selftest: run smb2.{bench,connect,credits,ioctl,rw} over bsd-tstream
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): Wed Jun 18 19:02:29 UTC 2025 on atb-devel-224
smbXcli_conn_monitor_{send,recv} can be used to monitor
a connection over a long time. It will only come back
if there's a connection error.
smbXcli_conn_monitor_once() will be used by sync callers
without a long term tevent context and needs to be called
multiple times per second in order to work correctly.
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Jun 18 12:10:03 UTC 2025 on atb-devel-224
Gary Lockyer [Tue, 17 Jun 2025 21:03:55 +0000 (09:03 +1200)]
Enable clang 20 cast-qual warnings
Now that pam_wrapper has been upgraded to 1.1.8, it compiles without
cast-qual warnings. So lets re-enable the warnings.
Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> 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 Jun 18 06:26:53 UTC 2025 on atb-devel-224
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Jun 17 08:38:35 UTC 2025 on atb-devel-224
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Björn Baumbach <bb@samba.org>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Mon Jun 16 22:22:27 UTC 2025 on atb-devel-224
Directly get a "struct stat" plus a 32-bit uint32 for the dosatts
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Jun 16 16:08:20 UTC 2025 on atb-devel-224
Volker Lendecke [Mon, 31 Mar 2025 08:27:13 +0000 (10:27 +0200)]
smbd: Modernize DBGs
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): Sat Jun 14 09:49:16 UTC 2025 on atb-devel-224
Volker Lendecke [Thu, 20 Mar 2025 16:57:11 +0000 (17:57 +0100)]
net: Fix a panic in "net vfs getntacl"
We have to explicitly free smb_fname, because after openat_pathref_fsp
we have a file descriptor around. If we then later talloc_free() the
connection_struct, fd_handle_destructor() panics because talloc_free()
does not free smb_fname before the connection_struct.
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
Shachar Sharon [Wed, 11 Jun 2025 12:04:31 +0000 (15:04 +0300)]
s3:auth: Fix Coverity ID 1646934: memory leak in make_pw_chat
make_pw_chat may succeed in the first call to SMB_CALLOC_ARRAY but fail
in one of the following loop iterations, in which the list is already
populated with dynamically allocated entries. Make sure that we free the
list before bailing out with NULL.
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): Sat Jun 14 07:41:48 UTC 2025 on atb-devel-224
This commit refactors the code by replacing fgets with
getline for more reliable line reading.
Additionally this PR,
- Corrects the error message for calloc failure.
- Ensures that resources are properly freed and
closed before calling errx(), fixing potential
resource leaks.
- Adds a check to gracefully skip newlines and
comment lines(starting with #)
- simplifies error handling by grouping repetitive
free statements under goto block
Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.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): Fri Jun 13 16:46:33 UTC 2025 on atb-devel-224
Shachar Sharon [Tue, 3 Jun 2025 08:31:20 +0000 (11:31 +0300)]
smbd: Fix Coverity ID 1648344: print work-dir properly
Commit 509081e7e ("smbd: expand logging in contend_dirleases()") added a
log-trace which calls get_current_dir_name() on-the-fly, which caused a
Coverity issue (memory-leak). Replace this call with the proper call to
SMB_VFS_GETWD (+ release memory).
Vinit Agnihotri [Thu, 12 Jun 2025 10:30:26 +0000 (16:00 +0530)]
smbd: Fix coverity#1646864 Move variable init code in checked block
xconn was getting dereference outside NULL check block, causing
'Dereference after null check' issue.
Fix moves offeding initialisation in NULL check blog.
Signed-off-by: Vinit Agnihotri <vagnihot@redhat.com> Reviewed-by: Anoop C S <anoopcs@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Thu Jun 12 16:49:02 UTC 2025 on atb-devel-224