From: Ralph Boehme Date: Fri, 17 Dec 2021 14:02:06 +0000 (+0100) Subject: smbd: also check for NT_STATUS_NOT_SUPPORTED X-Git-Tag: tevent-0.12.0~628 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97caec07ffd18f247134d21c3ba07c31591863bc;p=thirdparty%2Fsamba.git smbd: also check for NT_STATUS_NOT_SUPPORTED 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 Reviewed-by: Jeremy Allison --- 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 index a28337150c8..00000000000 --- a/selftest/knownfail.d/samba3.smb2.async_dosmode.async_dosmode +++ /dev/null @@ -1 +0,0 @@ -^samba3.smb2.async_dosmode.async_dosmode\(simpleserver\) diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index a8b2a98b413..68764b46ac8 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -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.