Commits on Source (90)
-
Jule Anger authored
and re-enable GIT_SNAPSHOT. Signed-off-by: Jule Anger <janger@samba.org>
8a602310 -
Ralph Boehme authored
This can happen if DELETE-ON-CLOSE is set, but the deletion fails for some reason. The bug was introduced by 1808e5c1. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15417 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 10 21:32:32 UTC 2023 on atb-devel-224 (cherry picked from commit 4da50463) Autobuild-User(v4-17-test): Jule Anger <janger@samba.org> Autobuild-Date(v4-17-test): Wed Jul 19 16:27:39 UTC 2023 on sn-devel-184
cdce89e4 -
Ralph Boehme authored
SLQ_STATE_RESULTS implies that there are already results attached to the slq which is not the case. Instead the backend will start processing from where it left off when it hits the maximum result limit and had set the state to SLQ_STATE_FULL. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15342 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 4149ef97)
9d97cd01 -
Ralph Boehme authored
If a query is still running in the backend and we have no results yet, returning 0 triggers a search termination by the client in latest macOS releases. macOS returns 0x23 in this case. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15342 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 925fefae)
19f10cb9 -
Ralph Boehme authored
SL_PAGESIZE is the number of entries we want to process per paged search result set. This is different from MAX_SL_RESULTS which ought to be a default maximum value for total number of results returned for a search query. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15342 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 086c2602)
506e9a2d -
Ralph Boehme authored
This wasn't enforced at all thus a query would return all available matches without limit. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15342 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit d8fa5c8e)
57d8d007 -
Ralph Boehme authored
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15342 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 7f5e4edf)
31a6264f -
Ralph Boehme authored
Lastest macOS queries additional file metadata per search result, which causes the mashalled paged result set including metadata to exceed the 64 KB result fragment buffer. Lacking fragementation support in mdssvc (it's supported by the protocol), for now just reduce the maximum number of results per search page. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15342 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 724a0518)
e7eb2286 -
Ralph Boehme authored
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15427 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 9dc66fec)
a6fba558 -
Ralph Boehme authored
Did this ever work? Possible just copied over from Netatalk and was always broken... The Mac client expects the timevalue as seconds relative to 2001-01-01 00:00:00 UTC, packed as IEEE float. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15427 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 620ca1e6)
c7ee8854 -
Ralph Boehme authored
Mac 10.10 uses kMDItemContentModificationDate instead of kMDItemFSContentChangeDate. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15427 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): Wed Jul 26 23:42:44 UTC 2023 on atb-devel-224 (cherry picked from commit c2e83ebe) Autobuild-User(v4-17-test): Jule Anger <janger@samba.org> Autobuild-Date(v4-17-test): Mon Jul 31 09:11:27 UTC 2023 on sn-devel-184
947790f8 -
Arvid Requate authored
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9959 Signed-off-by: Arvid Requate <requate@univention.de> [abartlet@samba.org Added additional talloc_free() in failure paths] Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit b6e80733)
517339b1 -
Arvid Requate authored
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9959 Signed-off-by: Arvid Requate <requate@univention.de> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 2d461844)
7112efed -
Andrew Bartlett authored
This will replace many calls crafting or searching for this DN elsewhere in the code. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9959 Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 25b0e110)
bac861ed -
Andrew Bartlett authored
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9959 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 97b682e0)
d3c4dd68 -
Andrew Bartlett authored
By doing this we use the common samdb_get_system_container_dn() routine and we avoid doing a linerize and parse step on the main DN, instead using the already stored parse of the DN. This is more hygenic. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9959 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 3669caa9)
30c14e87 -
Andrew Bartlett authored
This is now exactly the same actions, but just uses common code to do it. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9959 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 4e18066f)
cabc2292 -
Andrew Bartlett authored
This is now exactly the same actions, but just uses common code to do it. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9959 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit a900f6aa)
0d6bc07a -
Andrew Bartlett authored
This is now exactly the same actions, but just uses common code to do it. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9959 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 13eed1e0)
558834c3 -
Andrew Bartlett authored
This is now exactly the same actions, but just uses common code to do it. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9959 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 9b4f3f3c)
ecbba6ae -
Andrew Bartlett authored
This is now exactly the same actions, but just uses common code to do it. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9959 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 4250d07e)
dc74e3e9 -
Andrew Bartlett authored
This makes more calls to add children, but avoids the cn=system string in the codebase which makes it easier to audit that this is always being built correctly. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Mon Jul 31 07:20:21 UTC 2023 on atb-devel-224 (cherry picked from commit 5571ce96) RN: A second container with name CN=System would disable the operation of the Samba AD DC. Samba now finds the CN=System container by exact DN and not a search. Autobuild-User(v4-17-test): Jule Anger <janger@samba.org> Autobuild-Date(v4-17-test): Tue Aug 1 10:57:31 UTC 2023 on sn-devel-184
9313ebba -
Noel Power authored
since 5cc3c1b5 if we don't have a realm specified either on cmdline or in conf file we try to copy (talloc_strdup) a NULL variable which triggers a NO_MEMORY error when we check the result of the copy BUG: https://bugzilla.samba.org/show_bug.cgi?id=15384 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sun Jun 4 12:42:16 UTC 2023 on atb-devel-224 (cherry picked from commit 22ab42c1) Autobuild-User(v4-17-test): Jule Anger <janger@samba.org> Autobuild-Date(v4-17-test): Wed Aug 2 11:45:00 UTC 2023 on sn-devel-184
d94cbb10 -
Noel Power authored
Adds share (to be used in later test) that has dfs node but additionally has widelinks set to yes BUG: https://bugzilla.samba.org/show_bug.cgi?id=15435 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit b57cdfd7)
9ace5309 -
Noel Power authored
Adds a new test trying to cd into dfs path on share with widelinks enabled, should generate an error (see BUG:) Add a knownfail so CI continues BUG: https://bugzilla.samba.org/show_bug.cgi?id=15435 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 3d2e9db8)
98a53e95 -
Noel Power authored
Not used yet, will be used in the next commit to avoid testing if the connected share is a dfs one. Pair-Programmed-With: Jeremy Alison <jra@samba.org> BUG: https://bugzilla.samba.org/show_bug.cgi?id=15435 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 2668dcd0)
b63c917c -
Noel Power authored
In openat(), even if we fail to open the file, propagate stat if and only if the object is a link in a DFS share. This allows calling code to further process the link. Also remove knownfail Pair-Programmed-With: Jeremy Alison <jra@samba.org> BUG: https://bugzilla.samba.org/show_bug.cgi?id=15435 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Jul 29 00:43:52 UTC 2023 on atb-devel-224 (cherry picked from commit 0bf8b25a) Autobuild-User(v4-17-test): Jule Anger <janger@samba.org> Autobuild-Date(v4-17-test): Thu Aug 3 12:46:29 UTC 2023 on sn-devel-184
10f3fafc -
Stefan Metzmacher authored
During 'samba-tool ntacl sysvolreset' and similar. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15441 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit 3694f2ce)
3a6964d0 -
Jones Syue authored
If configured as AD DC and aio_pthread appended into 'vfs objects'[1], run these commands would get segfault: 1. sudo samba-tool ntacl get . 2. sudo net vfs getntacl sysvol . gdb said it goes through aio_pthread_openat_fn() @ vfs_aio_pthread.c[2], and the fsp->conn->sconn->client is null (0x0). 'sconn->client' memory is allocated when a new connection is accpeted: smbd_accept_connection > smbd_process > smbXsrv_client_create While running local commands looks like it would not go through smbXsrv_client_create so the 'client' is null, segfault might happen. We should not dereference 'client->server_multi_channel_enabled', if 'client' is null. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15441 [1] smb.conf example, samba-4.18.5, ubuntu 22.04.2 [global] dns forwarder = 127.0.0.53 netbios name = U22-JONES-88X1 realm = U22-JONES-88X1.X88X1.JONES server role = active directory domain controller workgroup = X88X1 idmap_ldb:use rfc2307 = yes vfs objects = dfs_samba4 acl_xattr aio_pthread [sysvol] path = /var/lib/samba/sysvol read only = No [netlogon] path = /var/lib/samba/sysvol/u22-jones-88x1.x88x1.jones/scripts read only = No [2] gdb (gdb) run /usr/local/samba/bin/samba-tool ntacl get . Starting program: /usr/local/Python3/bin/python3 /usr/local/samba/bin/samba-tool ntacl get . [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/libthread_db.so.1". Program received signal SIGSEGV, Segmentation fault. 0x00007fffd0eb809e in aio_pthread_openat_fn (handle=0x8d5cc0, dirfsp=0x8c3070, smb_fname=0x18ab4f0, fsp=0x1af3550, flags=196608, mode=0) at ../../source3/modules/vfs_aio_pthread.c:467 warning: Source file is more recent than executable. 467 if (fsp->conn->sconn->client->server_multi_channel_enabled) { (gdb) bt at ../../source3/modules/vfs_aio_pthread.c:467 at ../../source3/smbd/pysmbd.c:320 ---Type <return> to continue, or q <return> to quit--- (gdb) f at ../../source3/modules/vfs_aio_pthread.c:467 467 if (fsp->conn->sconn->client->server_multi_channel_enabled) { (gdb) p fsp->conn->sconn->client $1 = (struct smbXsrv_client *) 0x0 (gdb) Signed-off-by: Jones Syue <jonessyue@qnap.com> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 8f4c1c67)
f99fec49 -
Stefan Metzmacher authored
The PDUs were generated by Windows clients. And we fail to parse them currently. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15446 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit c37adb76)
95bb8115 -
Stefan Metzmacher authored
DCERPC_PKT_CO_CANCEL and DCERPC_PKT_ORPHANED don't have any payload by default. In order to receive them via dcerpc_read_ncacn_packet_send/recv we need to allow fragments with frag_len == DCERPC_NCACN_PAYLOAD_OFFSET. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15446 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit 5c724a3e)
4233de9b -
Stefan Metzmacher authored
It seems commit 259129e8 was partly just fantasy... Windows clients just use 16 bytes for DCERPC_PKT_CO_CANCEL and DCERPC_PKT_ORPHANED pdus. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15446 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Aug 8 08:57:46 UTC 2023 on atb-devel-224 (cherry picked from commit 9ec22e68) Autobuild-User(v4-17-test): Jule Anger <janger@samba.org> Autobuild-Date(v4-17-test): Tue Aug 8 13:39:40 UTC 2023 on sn-devel-184
3a0ae0c6 -
Jeremy Allison authored
(Back-ported from commit 20df26b9) BUG: https://bugzilla.samba.org/show_bug.cgi?id=15419 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(v4-17-test): Jule Anger <janger@samba.org> Autobuild-Date(v4-17-test): Mon Aug 14 09:27:37 UTC 2023 on sn-devel-184
fec91383 -
Volker Lendecke authored
We already don't allow setting max_credits in the sync wrapper, so omit the contexts there as well. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Aug 26 19:54:03 UTC 2022 on sn-devel-184 BUG: https://bugzilla.samba.org/show_bug.cgi?id=15346 (cherry picked from commit 4ddd277c)
d167b80d -
Stefan Metzmacher authored
There's no need for smb2_connect_ext(). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15346 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit ade663ee)
65b05090 -
Stefan Metzmacher authored
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15346 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit dc5a500f)
8c727eef -
Stefan Metzmacher authored
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15346 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit 2b93058b)
3c23c7f3 -
Stefan Metzmacher authored
This demonstrates the race quite easily against Samba and works fine against Windows Server 2022. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15346 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit 4028d658)
534f1363 -
Stefan Metzmacher authored
Commit 5d66d5b8 introduced a 'verify_again:' target, if we ever hit that, we would leak the existing filter_subreq. Moving it just above a possible messaging_filtered_read_send() will allow us to only clear it if we actually create a new request. That will help us in the next commits. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15346 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit 50d61e53)
f3d5e3ad -
Stefan Metzmacher authored
If a client opens multiple connection with the same client guid in parallel, our connection passing is likely to hit a race. Assume we have 3 processes: smbdA: This process already handles all connections for a given client guid smbdB: This just received a new connection with an SMB2 neprot for the same client guid smbdC: This also received a new connection with an SMB2 neprot for the same client guid Now both smbdB and smbdC send a MSG_SMBXSRV_CONNECTION_PASS message to smbdA. These messages contain the socket fd for each connection. While waiting for a MSG_SMBXSRV_CONNECTION_PASSED message from smbdA, both smbdB and smbdC watch the smbXcli_client.tdb record for changes (that also verifies smbdA stays alive). Once one of them say smbdB received the MSG_SMBXSRV_CONNECTION_PASSED message, the dbwrap_watch logic will wakeup smbdC in order to let it recheck the smbXcli_client.tdb record in order to handle the case where smbdA died or deleted its record. Now smbdC rechecks the smbXcli_client.tdb record, but it was not woken because of a problem with smbdA. It meant that smbdC sends a MSG_SMBXSRV_CONNECTION_PASS message including the socket fd again. As a result smbdA got the socket fd from smbdC twice (or even more), and creates two (or more) smbXsrv_connection structures for the same low level tcp connection. And it also sends more than one SMB2 negprot response. Depending on the tevent logic, it will use different smbXsrv_connection structures to process incoming requests. And this will almost immediately result in errors. The typicall error is: smb2_validate_sequence_number: smb2_validate_sequence_number: bad message_id 2 (sequence id 2) (granted = 1, low = 1, range = 1) But other errors would also be possible. The detail that leads to the long delays on the client side is that our smbd_server_connection_terminate_ex() code will close only the fd of a single smbXsrv_connection, but the refcount on the socket fd in the kernel is still not 0, so the tcp connection is still alive... Now we remember the server_id of the process that we send the MSG_SMBXSRV_CONNECTION_PASS message to. And just keep watching the smbXcli_client.tdb record if the server_id don't change. As we just need more patience to wait for the MSG_SMBXSRV_CONNECTION_PASSED message. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15346 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Aug 8 13:59:58 UTC 2023 on atb-devel-224 (cherry picked from commit f348b84f) Autobuild-User(v4-17-test): Jule Anger <janger@samba.org> Autobuild-Date(v4-17-test): Tue Aug 15 09:00:14 UTC 2023 on sn-devel-184
8738efc4 -
Jones Syue authored
Environment setup: When macOS Finder connect to a samba server with 'spotlight = yes', macOS would issue mdssvc open (mdssvc.opnum == 0) to samba and it goes through api _mdssvc_open(). After applied 578e434a, (this is reported by jaywei@qnap.com) this line 'talloc_free(path);' is deleted if _mdssvc_open() normal exit, so memory is lazy de-allocate: delayed to smbd_tevent_trace_callback() @ smb2_process.c. [1] Supposed to explicitly free 'path' in _mdssvc_open() @ srv_mdssvc_nt.c[2] just like abnormal exit, do not wait for main loop to free 'path' which is no longer used, this is more consistent while reading source code. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15449 [1] gdb tracing 'path' address 0x56204ccc67e0 to know how it is freed. Breakpoint 2, _tc_free_children_internal (tc=0x56204ccc6780, ptr=0x56204ccc67e0, location=0x7ff430d96410 "../../lib/talloc/talloc.c:1714") at ../../lib/talloc/talloc.c:1656 1656 while (tc->child) { (gdb) bt 0 _tc_free_children_internal (tc=0x56204ccc6780, ptr=0x56204ccc67e0, location=0x7ff430d96410 "../../lib/talloc/talloc.c:1714") at ../../lib/talloc/talloc.c:1656 1 0x00007ff430d92b14 in _tc_free_internal (tc=0x56204ccc6780, location=0x7ff430d96410 "../../lib/talloc/talloc.c:1714") at ../../lib/talloc/talloc.c:1183 2 0x00007ff430d93b71 in _tc_free_children_internal (tc=0x56204ccc6720, ptr=0x56204ccc6780, location=0x7ff430d96410 "../../lib/talloc/talloc.c:1714") at ../../lib/talloc/talloc.c:1668 3 0x00007ff430d93d66 in talloc_free_children (ptr=0x56204ccc6780) at ../../lib/talloc/talloc.c:1714 4 0x00007ff432235aca in talloc_pop (frame=0x56204ccc6780) at ../../lib/util/talloc_stack.c:125 5 0x00007ff430d92959 in _tc_free_internal (tc=0x56204ccc6720, location=0x7ff431f358d0 "../../source3/smbd/process.c:3726") at ../../lib/talloc/talloc.c:1157 6 0x00007ff430d92cd5 in _talloc_free_internal (ptr=0x56204ccc6780, location=0x7ff431f358d0 "../../source3/smbd/process.c:3726") at ../../lib/talloc/talloc.c:1247 7 0x00007ff430d93f96 in _talloc_free (ptr=0x56204ccc6780, location=0x7ff431f358d0 "../../source3/smbd/process.c:3726") at ../../lib/talloc/talloc.c:1791 8 0x00007ff431d81292 in smbd_tevent_trace_callback (point=TEVENT_TRACE_AFTER_LOOP_ONCE, private_data=0x7ffe46591e30) at ../../source3/smbd/process.c:3726 <...cut...> [2] gdb tracing 'path' address 0x55a6d66deed0 to know how it is freed. Breakpoint 2, _tc_free_children_internal (tc=0x55a6d66deed0, ptr=0x55a6d66def30, location=0x7fc4cca84040 "../../source3/rpc_server/mdssvc/srv_mdssvc_nt.c:189") at ../../lib/talloc/talloc.c:1656 1656 while (tc->child) { (gdb) bt 0 _tc_free_children_internal (tc=0x55a6d66deed0, ptr=0x55a6d66def30, location=0x7fc4cca84040 "../../source3/rpc_server/mdssvc/srv_mdssvc_nt.c:189") at ../../lib/talloc/talloc.c:1656 1 0x00007fc4cb892b14 in _tc_free_internal (tc=0x55a6d66deed0, location=0x7fc4cca84040 "../../source3/rpc_server/mdssvc/srv_mdssvc_nt.c:189") at ../../lib/talloc/talloc.c:1183 2 0x00007fc4cb892cd5 in _talloc_free_internal (ptr=0x55a6d66def30, location=0x7fc4cca84040 "../../source3/rpc_server/mdssvc/srv_mdssvc_nt.c:189") at ../../lib/talloc/talloc.c:1247 3 0x00007fc4cb893f96 in _talloc_free (ptr=0x55a6d66def30, location=0x7fc4cca84040 "../../source3/rpc_server/mdssvc/srv_mdssvc_nt.c:189") at ../../lib/talloc/talloc.c:1791 4 0x00007fc4cc9396e4 in _mdssvc_open (p=0x55a6d66d5600, r=0x55a6d66edc60) at ../../source3/rpc_server/mdssvc/srv_mdssvc_nt.c:189 <...cut...> Signed-off-by: Jones Syue <jonessyue@qnap.com> Reviewed-by: Noel Power <npower@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Noel Power <npower@samba.org> Autobuild-Date(master): Mon Aug 14 18:11:37 UTC 2023 on atb-devel-224 (cherry picked from commit 044cb8f9)
741cc348 -
Jeremy Allison authored
We will need this to show smbd crashing in the test code. This will be removed once we're passing the test. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15420 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit e7bf94b4)
bce87c64 -
Jeremy Allison authored
Shows that we indirect through an uninitialized pointer and the client crashes it's own smbd. Add knownfail. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15420 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (back-ported from commit 963fd8aa)
ec8887be -
Jeremy Allison authored
Robert Morris <rtm@lcs.mit.edu> noticed that in the case where srvstr_pull_req_talloc() is being called with buffer remaining == 0, we don't NULL out the destination pointed which is *always* done in the codepaths inside pull_string_talloc(). This prevents a crash in the caller. Remove knownfail. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15420 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit 9220c45c)
3a123fbb -
Jeremy Allison authored
Rather than restore to uninitialized, set to NULL as per modern coding practices. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15420 Reviewed-by: Volker Lendecke <vl@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit 5bc50d2e)
b958e82d -
Jeremy Allison authored
Now we've fixed srvstr_pull_req_talloc() this isn't strictly needed, but ensuring pointers are initialized is best practice to avoid future bugs. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15420 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Aug 14 15:55:43 UTC 2023 on atb-devel-224 (cherry picked from commit 5379b8d5)
0dbba5f6 -
Jeremy Allison authored
Robert Morris <rtm@lcs.mit.edu> noticed a missing return in reply_exit_done(). Adds knownfail. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15430 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Noel Power <npower@samba.org> (Back-ported from commit 63895e03)
7da254ff -
Jeremy Allison authored
Remove knownfail. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15430 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Noel Power <npower@samba.org> Autobuild-User(master): Noel Power <npower@samba.org> Autobuild-Date(master): Mon Aug 14 19:52:49 UTC 2023 on atb-devel-224 (cherry picked from commit d79d0508) Autobuild-User(v4-17-test): Jule Anger <janger@samba.org> Autobuild-Date(v4-17-test): Wed Aug 16 09:48:00 UTC 2023 on sn-devel-184
eb95b15b -
Jeremy Allison authored
If a client does a SMB1 NEGPROT followed by SMB1 TCON then req->session is left uninitialized. Show this causes a crash by deliberately initializing req->session to an invalid pointer. This will be removed once the test shows the crash, and the fix is added to cause init_smb1_request() to zero the memory passed in. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15432 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Noel Power <npower@samba.org> (Back-ported from commit f02f74e9)
098e5f24 -
Jeremy Allison authored
s3: torture: Add SMB1-NEGOTIATE-TCON that shows the SMB1 server crashes on the uninitialized req->session. Found by Robert Morris <rtm@lcs.mit.edu>. Adds knownfail. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15432 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Noel Power <nopower@samba.org> (Back-ported from commit c32df3bb)
4f3d61dc -
Jeremy Allison authored
Remove the now unneeded req->xxx = NULL assignments (and the deliberately bogus req->session = (void *)0xDEADBEEF one used to demonstrate the bug). Remove knownfail. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15432 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Noel Power <npower@samba.org> Autobuild-User(master): Noel Power <npower@samba.org> Autobuild-Date(master): Tue Aug 15 12:06:36 UTC 2023 on atb-devel-224 (Back-ported from commit 4145bfb1) Autobuild-User(v4-17-test): Jule Anger <janger@samba.org> Autobuild-Date(v4-17-test): Thu Aug 17 12:23:05 UTC 2023 on sn-devel-184
fca63c10 -
Andrew Bartlett authored
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15401 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 0d9ea6c5)
133ff9c2 -
Andrew Bartlett authored
This is still unreachable, so but improve the logging to give more detail in this area anyway. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15401 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit d0c1ce53)
89dfbd8c -
Andrew Bartlett authored
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15401 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit a12bcce8)
f7b1325b -
Andrew Bartlett authored
At this layer we can make a reasonable assumption about being able to read ldb_errstring() to print that for extra useful debugging. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15401 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 63843a22)
957c7948 -
Andrew Bartlett authored
This check was valuable before aee2039e but now only checks things we know to be true, as the value has come from Samba via drs_ObjectIdentifier_to_dn_and_nc_root() either on this or a previous call. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15401 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 0550e469)
5bddbe2c -
Andrew Bartlett authored
This object is used to hold one of many possible connections and it is helpful for debugging and uniqueness to know which DC is being connected to. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15401 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit c30bb876)
aa155ccb -
Andrew Bartlett authored
It is always better to keep the testing OUs unique if possible. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15401 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 628eab11)
6442c8c3 -
Andrew Bartlett authored
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15401 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 40f831e6)
fc282cbd -
Andrew Bartlett authored
Azure AD Connect will send a GUID but no DummyDN. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15401 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit db16366b)
1f5b6ef9 -
Andrew Bartlett authored
s4-torture/drs: Add test demonstrating that a GetNCChanges REPL_OBJ will not reset the replication cookie This demonstrates the behaviour used by the "Azure AD Connect" cloud sync tool. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15401 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit b323169d)
6452398e -
Andrew Bartlett authored
s4-torture/drs: Add test showing that if present in the set the NC root leads and tmp_highest_usn moves The NC root, on any replication when it appears, is the first object to be replicated, including for all subsequent chunks in the replication. However the tmp_highest_usn is not updated by that USN, it must only be updated for the non-NC changes (to match Windows exactly), or at least only updated with the non-NC changes until it would naturally appear. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15401 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 87414955)
d4927a5d -
Andrew Bartlett authored
This changes the GetNCChanges server to use a per-call state for extended operations like RID_ALLOC or REPL_OBJ and only maintain and (more importantly) invalidate the state during normal replication. This allows REPL_OBJ to be called during a normal replication cycle that continues using after that call, continuing with the same highwatermark cookie. Azure AD will do a sequence of (roughly) * Normal replication (objects 1..100) * REPL_OBJ (of 1 object) * Normal replication (objects 101..200) However, if there are more than 100 (in this example) objects in the domain, and the second replication is required, the objects 1..100 are sent, as the replication state was invalidated by the REPL_OBJ call. RN: Improve GetNChanges to address some (but not all "Azure AD Connect") syncronisation tool looping during the initial user sync phase. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15401 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 99579e70)
35cdcef4 -
Andrew Bartlett authored
This avoids the indentation correction being in the previous patch. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15401 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit fe7418e1)
c72b5f25 -
Andrew Bartlett authored
This tries to avoid it appearing that ncRoot is a value that can be trusted and used internally by not updating it and instead leaving it just as an input/echo-back value. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15401 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 548f141f)
7c63aa69 -
Andrew Bartlett authored
Because of the requirement to echo back the original string, we can not force this to be a trustworthy value. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15401 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 2ed9815e)
0a269490 -
Andrew Bartlett authored
This is closer to our READDME.Coding style BUG: https://bugzilla.samba.org/show_bug.cgi?id=15401 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 2aba9e23)
ee8dafa1 -
Andrew Bartlett authored
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15407 BUG: https://bugzilla.samba.org/show_bug.cgi?id=15401 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 17359afa)
4ae4d2ac -
Andrew Bartlett authored
s4-rpc_server/drsupai: Avoid looping with Azure AD Connect by not incrementing temp_highest_usn for the NC root We send the NC root first, as a special case for every chunk that we send until the natural point where it belongs. We do not bump the tmp_highest_usn in the highwatermark that the client and server use (it is meant to be an opauqe cookie) until the 'natural' point where the object appears, similar to the cache for GET_ANC. The issue is that without this, because the NC root was sorted first in whatever chunk it appeared in but could have a 'high' highwatermark, Azure AD Connect will send back the same new_highwatermark->tmp_highest_usn, and due to a bug, a zero reserved_usn, which makes Samba discard it. The reserved_usn is now much less likely to ever be set because the tmp_higest_usn is now always advancing. RN: Avoid infinite loop in initial user sync with Azure AD Connect when synchronising a large Samba AD domain. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15401 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 79ca6ef2) Autobuild-User(v4-17-test): Jule Anger <janger@samba.org> Autobuild-Date(v4-17-test): Mon Aug 21 08:42:32 UTC 2023 on sn-devel-184
89231620 -
Martin Schwenke authored
The build currently fails on AIX, which can't find the pcap headers because they're installed in a non-standard place. However, there is a pcap-config script available. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> (cherry picked from commit a83e9ca6)
f25b506a -
Martin Schwenke authored
This forces the use pcap for packet capture on Linux. It appears that using a raw socket for capture does not work with infiniband - pcap support for that to come. Don't (yet?) change the default capture method to pcap. On some platforms (e.g. my personal Intel NUC, running Debian testing), pcap is much less reliable than the raw socket. However, pcap seems fine on most other platforms. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> (cherry picked from commit d1543d5c)
188e949f -
Martin Schwenke authored
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> (cherry picked from commit c522f4f6)
027c9ef1 -
Martin Schwenke authored
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> (cherry picked from commit ad445abe)
197f86f9 -
Martin Schwenke authored
[173/416] Compiling ctdb/common/system_socket.c ../../common/system_socket.c: In function ‘ctdb_sys_read_tcp_packet’: ../../common/system_socket.c:1016:15: error: cast discards ‘const’ qualifier from pointer target type [-Werror=cast-qual] 1016 | eth = (struct ether_header *)buffer; | ^ Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> (cherry picked from commit 8b54587b)
98ee0c12 -
Martin Schwenke authored
errbuf can't be NULL. Might as well use it. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> (cherry picked from commit 40380a80)
8c1314aa -
Martin Schwenke authored
This is preferred because it will fail for devices that do not support epoll_wait() and similar. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> (cherry picked from commit 075414dc)
0adfd0cc -
Martin Schwenke authored
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> (cherry picked from commit 33a80c1d)
d37c3d14 -
Martin Schwenke authored
In particular, knowing the reason fetching the packet fails can help with debugging unsupported protocols in the pcap code. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> (cherry picked from commit 5dd964aa)
f01d53d8 -
Martin Schwenke authored
The current code will almost certainly generate ENOMSG for non-ethernet packets, even for ethernet packets when the "any" interface is used. pcap_datalink(3PCAP) says: Do NOT assume that the packets for a given capture or ``savefile`` will have any given link-layer header type, such as DLT_EN10MB for Ethernet. For example, the "any" device on Linux will have a link-layer header type of DLT_LINUX_SLL or DLT_LINUX_SLL2 even if all devices on the sys‐ tem at the time the "any" device is opened have some other data link type, such as DLT_EN10MB for Ethernet. So, pcap_datalink() must be used. Detect pcap packet types that are supported (currently only ethernet) in the open code. There is no use continuing if the read code can't parse packets. The pattern of using switch statements supports future addition of other packet types. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> (cherry picked from commit 3bf20300)
0f3864d7 -
Martin Schwenke authored
This uses Linux cooked capture link-layer headers. See: https://www.tcpdump.org/linktypes/LINKTYPE_LINUX_SLL.html https://www.tcpdump.org/linktypes/LINKTYPE_LINUX_SLL2.html The header type needs to be checked to ensure the protocol type (i.e. ether type, for the protocols we might be interested in) is meaningful. The size of the header needs to be known so it can be skipped, allowing the IP header to be found and parsed. It would be possible to define support for DLT_LINUX_SLL2 if it is missing. However, if a platform is missing support in the header file then it is almost certainly missing in the run-time library too. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> (cherry picked from commit e5541a7e)
6417651b -
Martin Schwenke authored
Add simple support for IPoIB via DLT_LINUX_SLL and DLT_LINUX_SLL2. This seems to work, even when an IB interface is specified. If this is later found to be insufficient, support for DLT_IPOIB can be implemented. See https://www.tcpdump.org/linktypes.html for a starting point. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> (cherry picked from commit 9f7d69a0)
c5bd0b20 -
Martin Schwenke authored
To debug ctdb_killtcp failures, add CTDB_KILLTCP_DEBUGLEVEL=DEBUG to script.options. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Tue Sep 20 11:42:16 UTC 2022 on sn-devel-184 (cherry picked from commit d9dda4b7)
ef212b02 -
Martin Schwenke authored
Factor out a failure label, which will get more use in subsequent commits, and only set private_data when success is certain. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15451 Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com> (cherry picked from commit d87041d8)
74d43dd3 -
Martin Schwenke authored
A subsequent commit will insert an additional call before pcap_activate(). This sequence of calls is taken from the source for pcap_open_live(), so there should be no change in behaviour. Given the defaults set by pcap_create_common(), it would be possible to omit the calls to pcap_set_promisc() and pcap_set_timeout(). However, those defaults don't seem to be well documented, so continue to explicitly set everything that was set before. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15451 Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com> (cherry picked from commit ffc2ae61)
bb905f04 -
Martin Schwenke authored
Fix a problem where ctdb_killtcp (almost always) fails to capture packets with --enable-pcap and libpcap ≥ 1.9.1. The problem is due to a gradual change in libpcap semantics when using pcap_get_selectable_fd(3PCAP) to get a file descriptor and then using that file descriptor in non-blocking mode. pcap_set_immediate_mode(3PCAP) says: pcap_set_immediate_mode() sets whether immediate mode should be set on a capture handle when the handle is activated. In immediate mode, packets are always delivered as soon as they arrive, with no buffering. and On Linux, with previous releases of libpcap, capture devices are always in immediate mode; however, in 1.5.0 and later, they are, by default, not in immediate mode, so if pcap_set_immediate_mode() is available, it should be used. However, it wasn't until libpcap commit 2ade7676101366983bd4f86bc039ffd25da8c126 (before libpcap 1.9.1) that it became a requirement to use pcap_set_immediate_mode(), even with a timeout of 0. More explanation in this libpcap issue comment: https://github.com/the-tcpdump-group/libpcap/issues/860#issuecomment-541204548 Do a configure check for pcap_set_immediate_mode() even though it has existed for 10 years. It is easy enough. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15451 Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Tue Aug 15 10:53:52 UTC 2023 on atb-devel-224 (cherry picked from commit dc7b48c4) Autobuild-User(v4-17-test): Jule Anger <janger@samba.org> Autobuild-Date(v4-17-test): Tue Aug 29 10:29:56 UTC 2023 on sn-devel-184
8d1e4f1d -
MikeLiu authored
1. Set 'aio_allow_open' to false if fsp->fsp_flags.is_pathref 2. Move !(how->flags & O_CREAT) and !(how->flags & O_EXCL) up and set 'aio_allow_open' to false 3. Use SMB_VFS_NEXT_OPENAT() instead of openat() for disable async opens case. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15453 Signed-off-by: MikeLiu <mikeliu@qnap.com> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Aug 22 17:44:00 UTC 2023 on atb-devel-224 Autobuild-User(v4-17-test): Jule Anger <janger@samba.org> Autobuild-Date(v4-17-test): Mon Sep 4 09:35:04 UTC 2023 on sn-devel-184
1361e545 -
Ralph Boehme authored
When searching Samba via Spotlight from a Mac with mdfind, only 50 results are returned. It seems the changes for bug #15342 where one step in the right direction. There, a status indicator meaning "search is still being processed" was implemented, returning a special status indicator (0x23) in a response, when the query was still running in the backend, eg Elasticsearch, and we haven't got any result when when the Mac already comes along asking for results of a query. Turns out, we should also return 0x23, ie "search is still being processed" when we have some initial search results from the backend. Otherwise mdfind will stop querying for more results. It works in Finder, as the Finder by default employs a "live" search where it just keeps polling for more results even after the server returned an empty result set. The Finder just keeps on querying in some interval, typically 4 seconds, and a Mac server Spotlight server might return new results if new files where created that match the query, hence "live" search. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15463 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Noel Power <noel.power@suse.com> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Wed Aug 30 10:51:40 UTC 2023 on atb-devel-224 (cherry picked from commit 3afa27a0) Autobuild-User(v4-17-test): Jule Anger <janger@samba.org> Autobuild-Date(v4-17-test): Tue Sep 5 10:01:13 UTC 2023 on sn-devel-184
f8197d65 -
Jule Anger authored
Signed-off-by: Jule Anger <janger@samba.org>
5046314c -
Jule Anger authored
Signed-off-by: Jule Anger <janger@samba.org>
f3e7be14 -
Michael Tokarev authoredfb6e5ddd
Showing
- VERSION 1 addition, 1 deletionVERSION
- WHATSNEW.txt 90 additions, 2 deletionsWHATSNEW.txt
- ctdb/common/system_socket.c 151 additions, 30 deletionsctdb/common/system_socket.c
- ctdb/config/functions 7 additions, 1 deletionctdb/config/functions
- ctdb/tools/ctdb_killtcp.c 7 additions, 6 deletionsctdb/tools/ctdb_killtcp.c
- ctdb/wscript 13 additions, 1 deletionctdb/wscript
- libcli/smb/smbXcli_base.c 66 additions, 14 deletionslibcli/smb/smbXcli_base.c
- libcli/smb/smbXcli_base.h 7 additions, 2 deletionslibcli/smb/smbXcli_base.h
- librpc/idl/dcerpc.idl 0 additions, 2 deletionslibrpc/idl/dcerpc.idl
- librpc/rpc/dcerpc_util.c 7 additions, 2 deletionslibrpc/rpc/dcerpc_util.c
- python/samba/tests/blackbox/mdsearch.py 1 addition, 1 deletionpython/samba/tests/blackbox/mdsearch.py
- python/samba/tests/dcerpc/mdssvc.py 3 additions, 3 deletionspython/samba/tests/dcerpc/mdssvc.py
- selftest/knownfail.d/getncchanges 2 additions, 0 deletionsselftest/knownfail.d/getncchanges
- selftest/target/Samba3.pm 5 additions, 0 deletionsselftest/target/Samba3.pm
- source3/libsmb/cliconnect.c 10 additions, 6 deletionssource3/libsmb/cliconnect.c
- source3/modules/vfs_aio_pthread.c 23 additions, 15 deletionssource3/modules/vfs_aio_pthread.c
- source3/modules/vfs_widelinks.c 27 additions, 3 deletionssource3/modules/vfs_widelinks.c
- source3/passdb/pdb_samba_dsdb.c 8 additions, 4 deletionssource3/passdb/pdb_samba_dsdb.c
- source3/rpc_server/mdssvc/marshalling.c 23 additions, 6 deletionssource3/rpc_server/mdssvc/marshalling.c
- source3/rpc_server/mdssvc/mdssvc.c 17 additions, 4 deletionssource3/rpc_server/mdssvc/mdssvc.c