lib/tsocket: optimize tdgram_recvfrom_done() into tdgram_recvfrom_send()
For callers using tdgram_bsd_optimize_recvfrom() it is every useful
to know it data was already waiting in the socket.
In that case the result from tdgram_bsd_recvfrom_send() would
already report tevent_req_is_in_progress() as false.
But the result of tdgram_recvfrom_send() available to the
caller would see tevent_req_is_in_progress() reporting true.
With this change also the result of tdgram_recvfrom_send()
would report tevent_req_is_in_progress() as false,
which will be useful for callers, which would otherwise
set a timeout on the request.
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
third_party: add quic_ko_wrapper to simulate IPPROTO_QUIC sockets
For now this is only part of Samba, so no real third_party,
but in future we may decide have a standalone repository
or move it to https://github.com/lxin/quic.git
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
s3:libsmb: add support for SMB_TRANSPORT_TYPE_QUIC
This requires https://github.com/lxin/quic, which provides a kernel
module quic.ko for Linux (tested with Linux 6.8 and 6.14).
The userspace libquic is mirrored under third_party/quic for now.
This can be activated by adding 'quic' to 'client smb transports'.
The following smb.conf options are also relevant:
'tls enabled'
'tls ca directories'
'tls trust system cas'
'tls cafile'
'tls crlfile'
'tls verify peer'
Note that tools like smbclient are able to take
--option='client smb transports = quic" --option='tls verify peer=no_check'
in order to test it without changing smb.conf,
You may not want to use 'tls verify peer=no_check' for
production, it would make the transport as unprotected
as a tcp connection.
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This requires https://github.com/lxin/quic, which provides a kernel
module quic.ko for Linux (tested with Linux 6.8 and 6.14).
The userspace libquic is mirrored under third_party/quic for now.
This can be activated by adding 'quic' to 'server smb transports'.
The following smb.conf options are also relevant:
'tls enabled'
'tls cafile'
'tls certfile'
'tls keyfile'
If the files pointed to by 'tls cafile', 'tls certfile' and
'tls keyfile' all don't exist, self-signed tls certificates are
generated automatically at startup.
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
third_party: import quic from https://github.com/lxin/quic.git
For now the VERSION argument to third_party/quic/update.sh
is ignored as there are no versions yet. For now we require
version 1.1 (not releases) for a system library, in order to make sure
it is recent enough.
Add check for the GPO link to have at least two attributes separated by semicolumn. Allows to handle empty links.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15877
RN: Fix handling of empty GPO link
Singed-off-by: Alex Sharov (kororland@gmail.com) Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Jul 10 18:55:33 UTC 2025 on atb-devel-224
tests: Rename local variable: prefix_abs -> prefix
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Jul 10 16:15:24 UTC 2025 on atb-devel-224
Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Samuel Cabrero <scabrero@samba.org>
Autobuild-Date(master): Tue Jul 8 07:21:26 UTC 2025 on atb-devel-224
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Jul 7 17:45:13 UTC 2025 on atb-devel-224
Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Jul 7 10:44:37 UTC 2025 on atb-devel-224
Michael Saxl [Wed, 28 May 2025 14:49:13 +0000 (16:49 +0200)]
rpc registry: add ProductType for AD DC
HKLM\SYSTEM\CurrentControlSet\Control\ProductOptions contains a key
ProductType
The value of that key should be LanmanNT on a domain controller (of any
type).
The switch had no case for ROLE_ACTIVE_DIRECTORY_DC
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15863 Signed-off-by: Michael Saxl <mike@mwsys.mine.bz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Jul 1 09:17:08 UTC 2025 on atb-devel-224
Direct leak of 104 byte(s) in 1 object(s) allocated from:
#0 0x7f597eefc777 in malloc ../../../../libsanitizer/asan/asan_malloc_linux.cpp:69
#1 0x7f597eae3c57 in __talloc_with_prefix ../../lib/talloc/talloc.c:783
#2 0x7f597eae5acf in __talloc ../../lib/talloc/talloc.c:825
#3 0x7f597eae5acf in _talloc_named_const ../../lib/talloc/talloc.c:982
#4 0x7f597eae5acf in _talloc_array ../../lib/talloc/talloc.c:2784
#5 0x7f597e865a99 in data_blob_talloc_named ../../lib/util/data_blob.c:58
#6 0x7f597e865b1b in data_blob_named ../../lib/util/data_blob.c:40
#7 0x55a95a1a389c in get_challenge ../../source3/utils/ntlm_auth.c:375
#8 0x55a95a1aa724 in test_ntlm_in_lm ../../source3/utils/ntlm_auth_diagnostics.c:203
#9 0x55a95a1ab947 in diagnose_ntlm_auth ../../source3/utils/ntlm_auth_diagnostics.c:721
#10 0x55a95a1a7efd in main ../../source3/utils/ntlm_auth.c:2855
#11 0x7f597b62a2ad 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>
s3:utils: Fix memory leaks in test_lmv2_ntlmv2_broken()
Direct leak of 104 byte(s) in 1 object(s) allocated from:
#0 0x7f48254fc777 in malloc ../../../../libsanitizer/asan/asan_malloc_linux.cpp:69
#1 0x7f48250d9c57 in __talloc_with_prefix ../../lib/talloc/talloc.c:783
#2 0x7f48250dbacf in __talloc ../../lib/talloc/talloc.c:825
#3 0x7f48250dbacf in _talloc_named_const ../../lib/talloc/talloc.c:982
#4 0x7f48250dbacf in _talloc_array ../../lib/talloc/talloc.c:2784
#5 0x7f4824e59a99 in data_blob_talloc_named ../../lib/util/data_blob.c:58
#6 0x7f4824e59b1b in data_blob_named ../../lib/util/data_blob.c:40
#7 0x56084d20789c in get_challenge ../../source3/utils/ntlm_auth.c:375
#8 0x56084d20f0b9 in test_lmv2_ntlmv2_broken ../../source3/utils/ntlm_auth_diagnostics.c:381
#9 0x56084d20f92e in test_ntlmv2 ../../source3/utils/ntlm_auth_diagnostics.c:474
#10 0x56084d20f9ae in diagnose_ntlm_auth ../../source3/utils/ntlm_auth_diagnostics.c:718
#11 0x56084d20befd in main ../../source3/utils/ntlm_auth.c:2855
#12 0x7f4821c2a2ad 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>
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>