]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: also check for NT_STATUS_NOT_SUPPORTED
authorRalph Boehme <slow@samba.org>
Fri, 17 Dec 2021 14:02:06 +0000 (15:02 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 28 Feb 2022 20:01:36 +0000 (20:01 +0000)
If a VFS module fails SMB_VFS_GETXATTRAT_SEND/RECV with ENOSYS like currently
vfs_shadow_copy2 or any other module that uses
vfs_not_implemented_getxattrat_send() the ENOSYS error that
vfs_not_implemented_getxattrat_send() sets gets mapped to
NT_STATUS_NOT_SUPPORTED by map_nt_error_from_unix().

Unfortunately when checking whether the async SMB_VFS_GETXATTRAT_SEND() failed
and to determine if the sync fallback should be triggered, we currently only
check for NT_STATUS_NOT_IMPLEMENTED which is the error we get when "store dos
attributes" is disabled.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
selftest/knownfail.d/samba3.smb2.async_dosmode.async_dosmode [deleted file]
source3/smbd/dosmode.c

diff --git a/selftest/knownfail.d/samba3.smb2.async_dosmode.async_dosmode b/selftest/knownfail.d/samba3.smb2.async_dosmode.async_dosmode
deleted file mode 100644 (file)
index a283371..0000000
+++ /dev/null
@@ -1 +0,0 @@
-^samba3.smb2.async_dosmode.async_dosmode\(simpleserver\)
index a8b2a98b413f7013a0a7131bf90969f86b4d3429..68764b46ac817e0eadaf8fa5c4238a0d9ab3adcd 100644 (file)
@@ -854,10 +854,13 @@ static void dos_mode_at_vfs_get_dosmode_done(struct tevent_req *subreq)
                 * dos_mode_post() which also does the mapping of a last resort
                 * from S_IFMT(st_mode).
                 *
-                * Only if we get NT_STATUS_NOT_IMPLEMENTED from a stacked VFS
-                * module we must fallback to sync processing.
+                * Only if we get NT_STATUS_NOT_IMPLEMENTED or
+                * NT_STATUS_NOT_SUPPORTED from a stacked VFS module we must
+                * fallback to sync processing.
                 */
-               if (!NT_STATUS_EQUAL(status, NT_STATUS_NOT_IMPLEMENTED)) {
+               if (!NT_STATUS_EQUAL(status, NT_STATUS_NOT_IMPLEMENTED) &&
+                   !NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED))
+               {
                        /*
                         * state->dosmode should still be 0, but reset
                         * it to be sure.