| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
and disable GIT_SNAPSHOT for the 4.11.0 release.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
|
|
|
|
| |
Signed-off-by: Karolin Seeger <kseeger@samba.org>
|
|
|
|
|
|
| |
and re-enable GIT_SNAPSHOT.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
|
|
|
|
| |
Signed-off-by: Karolin Seeger <kseeger@samba.org>
|
|
|
|
| |
Signed-off-by: Karolin Seeger <kseeger@samba.org>
|
|
|
|
| |
Signed-off-by: Karolin Seeger <kseeger@samba.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This ensures we preserve btime, itime and File-ID.
As the Durable Handles code calls vfs_stat_fsp() in the DH disconnect function,
previously the btime was lost and NOT stored in the cookie. With this change the
cookie will store the correct btime (and iflags), which requires us to call
dos_mode() in the reconnect function to ensure we pass
vfs_default_durable_reconnect_check_stat().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14121
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Sep 10 20:22:21 UTC 2019 on sn-devel-184
(cherry picked from commit 95655fe683d499d93f3844ed72ad332ef64adb96)
Autobuild-User(v4-11-test): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(v4-11-test): Tue Sep 10 22:29:08 UTC 2019 on sn-devel-184
|
|
|
|
|
|
|
|
| |
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14121
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit e00e78cfeda99bd5374eff8fb4ba84873e4e46b7)
|
|
|
|
|
|
|
|
|
|
| |
Both functions do the same, they differ just in the type of the returned result.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14121
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit ab03394969f8a4c748aea7d0d8ed37f9ced6cc30)
|
|
|
|
|
|
|
|
| |
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14121
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit ac18730f10ce96a607a3a07e1360b522ebf72f38)
|
|
|
|
|
|
|
|
| |
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14121
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 4e49999c97f53acc7006f1dc6b6812bb0e156db5)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Initialize the File-ID in fsp->fsp_name->st, any subsequent metadata fetch on
this file-handle needs this, eg QFID SMB2 Create-Context or GETINFO SMB
requests.
It would be nice if SMB_VFS_SET_DOS_ATTRIBUTE() would do this, unfortunately it
gets a const struct smb_filename.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14121
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 3483b75fed8985bd2968bbf8c85985107115fba8)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The rounding is needed because when a file is created via eg an SMB2 CREATE
request, we need to calculate the correct File-ID for the QFID Create-Context or
for a subsequent GETINFO SMB request on the same file-handle.
Any later metadata request that received the File-ID will do so by going through
dos_mode() -> ... -> parse_dos_attribute_blob(), where the File-ID will be
calculated from the on-disk itime which has NTTIME resolution.
As long as that is the only available itime backend, I'm rounding itime inside
make_file_id_from_itime(), not in the callers.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14121
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 84abeaa60ffced276da2b28b8add6efaa6da5ca6)
|
|
|
|
|
|
|
|
| |
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14121
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 5403bb22e6cb39baf6dc1b91558744d41e9f6f64)
|
|
|
|
|
|
|
|
|
|
|
| |
Note I'm using the share vfs_fruit_xattr because I need a share with both a
streams and a acl_* VFS object.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14121
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 2ecab3c60abf9baa16a6a5e3eba0fc4720def840)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add check for requested replies of existing machine object during join
machine to domain. This solves regression fail during join with error:
"None of the information to be translated has been translated."
https://bugzilla.samba.org/show_bug.cgi?id=14007
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Sep 4 17:02:37 UTC 2019 on sn-devel-184
(cherry picked from commit ad4ef1657e9b2a088a3bfadcce196cfcceead1dc)
Autobuild-User(v4-11-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-11-test): Tue Sep 10 09:13:15 UTC 2019 on sn-devel-184
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
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): Mon Sep 9 15:42:45 UTC 2019 on sn-devel-184
(cherry picked from commit 2b43ce6704ecf035e6734337a2dea3458153a4b2)
Autobuild-User(v4-11-test): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(v4-11-test): Mon Sep 9 17:19:11 UTC 2019 on sn-devel-184
|
|
|
|
|
|
|
|
|
|
|
|
| |
This demonstrates the two ways to handle the retry:
- smb layer retry => plock->context.smblctx = UINT64_MAX
- vfs backend retry => plock->context.smblctx = 0
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit c2503a5c68e967054ab84ca0d8ce693200c2e002)
|
|
|
|
|
|
|
|
|
|
|
| |
This allows the vfs backend to detect a retry and keep state between
the retries.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 66d92f37c3a643d97489a59bb6d1e75e91528c20)
|
|
|
|
|
|
|
|
|
|
|
| |
This allows the VFS backends to implement async byte
range locking.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 7471b0f63276e707784c98b832992ff08b1898ef)
|
|
|
|
|
|
|
|
|
|
|
| |
This allows the VFS backends to implement async byte
range locking.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 7d1cd6f22e7e3d95aba04c45776057945c2a5e30)
|
|
|
|
|
|
|
|
|
|
|
| |
We only need the logic to call smbd_smb1_do_locks_check() and a possible
retry once in smbd_smb1_do_locks_try().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 8975673e3c3f9f7dbdb7ba7562bb81a62cd24e2e)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
smbd_smb1_do_locks_try()
This is a noop if smbd_smb1_do_locks_setup_timeout() was called before.
But it allows us to use smbd_smb1_do_locks_try() in
smbd_smb1_do_locks_send() in a following commit.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 6e30a89b3f00ad55391454fbaa1272074e1962f0)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A new request is first checks against all pending
requests before checking the already granted locks.
Before we retried the lock array of another request
(the first in the list), but then finished current request,
which is wrong.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 312327106271abafeb53e62dfb71a38bf93e2d41)
|
|
|
|
|
|
|
|
|
|
|
|
| |
dbwrap_watched_watch_send()
This makes the next commits easier to understand.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 997548a5f1a14d82f1e80cce6d9ee55e85b5107c)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function can be called multiple times, but only
the first time will setup the endtime. And the
endtime is relative to the request time and not
the current time.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 8da7c10a58292022ee57406db9a365de9ffaf5cf)
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is less racy than timeval_elapsed() > 0
as the current time is already expired and timeout = 0
will always work correct.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 5a841a43f9c4f862e2d7235429363b3066cf5850)
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is similar to multilock3, but uses a read-only
(LOCKING_ANDX_SHARED_LOCK) locks for the 2nd lock
request.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit d3bc0199697fd7d6e04479321ca644a227bc4ede)
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is similar to multilock3, but uses a read-only
(LOCKING_ANDX_SHARED_LOCK) locks for the first lock
request.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 6d4296aca0c9a9287c0c78c8f8847a560bd2ea24)
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is similar to multilock3, but uses read-only
(LOCKING_ANDX_SHARED_LOCK) locks for the blocked
requests.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit d3e65ceb1ec25c7b62a7e908506126269011f30d)
|
|
|
|
|
|
|
|
|
|
|
|
| |
This demonstrates that unrelated lock ranges
are not blocked by other blocked requests on the same
fsp.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 297763c6b618c07148d788b46218a0798225bf79)
|
|
|
|
|
|
|
|
| |
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 8a7039be530adcdda9e7e7621bdcf902f5ca1721)
|
|
|
|
|
|
|
|
| |
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 8decf41bbb8be2b4ac463eb6ace16a8628276ab5)
|
|
|
|
|
|
|
|
|
|
|
| |
This demonstrates that the SMB2 code path doesn't do
any retry for local posix locks.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 7155d3a2c5d7237f00cccb1802c1341cf295864e)
|
|
|
|
|
|
|
|
|
|
| |
We only need the logic to call smbd_do_locks_try() and a possible
retry once in smbd_smb2_lock_try().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 359e9992be713bbecfdb19998d69e1d3f020c5e9)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes it possible to reuse _try() in the _send() function in the
next commit.
We should not retry forever on a hard error.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 7f77e0b4e9878f1f3515206d052adc012e26aafb)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We no longer expect NT_STATUS_FILE_LOCK_CONFLICT from
the VFS layer and assert that in a future version.
This makes it easier to port the same logic to smbd_smb2_lock_try().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 39d514cdc358f175d0968f4a78f8f2f05a6c1707)
|
|
|
|
|
|
|
|
|
|
|
| |
This makes it possible to reuse _try() in the _send() function in the
next commits.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit d096742da1a045357f52ccd5b28d499c30e96152)
|
|
|
|
|
|
|
|
|
|
| |
This will simplify the next commits.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit f13d13ae9da3072862a781bc926e7a06e8384337)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Returning NT_STATUS_FILE_LOCK_CONFLICT is a SMB1 only detail
for delayed brlock requests, which is handled in
smbd_smb1_do_locks*().
The brlock layer should be consistent even for posix locks.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit ad98eec6090430ba5296a5111dde2e53b9cd217a)
|
|
|
|
|
|
|
|
|
|
|
| |
For Windows locks we start with LOCK_NOT_GRANTED and use
FILE_LOCK_CONFLICT if we retried after a timeout.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit aba0ee46258f3dd910421facb742fce3318a6946)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
torture_samba3_posixtimedlock()
There should not be a different if the blocker is a posix process
instead of another smbd.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 2a77025a1e16d897281e5840192c93fa03328681)
|
|
|
|
|
|
|
|
|
|
|
|
| |
We want to start with a short timeout (200ms) and
slow down to larger timeouts up to 2s for the default
value of "lock spin time".
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 15765644d2590d6549f8fcc01c39c56387eed654)
|
|
|
|
|
|
|
|
|
|
|
| |
The problem is fixed, now we can revert the change that made it
easier to trigger.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 62ec58b06c38ee82bb3147c4d325413fd3a76499)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We should evaluate the timeout condition after the very last
retry and not before.
Otherwise we'd fail to retry when waiting for posix locks.
The problem happens if the client provided timeout is smaller
than the 1 sec (for testing temporary 15 secs) retry.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit e8d719d31f885d7b6d5b317165f90ec40df169c9)
|
|
|
|
|
|
|
|
|
|
|
| |
This will make it possible to just use smbd_smb1_do_locks_try()
in a later commit.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 8fe708acb43ea36d0cbf398713b125daba180a2d)
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will make it possible to have just one caller to
smbd_do_locks_try() later and use smbd_smb1_do_locks_try()
from within smbd_smb1_do_locks_send().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Reviewed-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit e79fcfaaf2ecfca6c3747f6fe4be51f332ebf10d)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is just a temporary commit that shows the bug and its
fix. It will be reverted once the problem is fixed.
The posix lock retry fails if the client specified timeout
is smaller than the hardcoded 1 second retry.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 2ec9e93a7aac2706b4a5931495d56a7b64f8d894)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LOCK9A is the original test (with a timeout of -1)
and LOCK9B is the same but with timeout of 10 seconds.
LOCK9B is needed to demonstrate a server bug in the next
commits.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit ac28eec3e4af710feab3be3d4b25bfbe38294431)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
smbXcli_conn_disconnect(alarm_cli->conn, NT_STATUS_OK)
means existing requests are not finished with an error,
but instead just keep dangling arround.
Pass NT_STATUS_LOCAL_DISCONNECT in order to fail the
cli_lock32() call after getting SIGALARM.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit e18c8ced8e7a872deb118191595425ef6b826bfa)
|