smbd: check "store dos attributes" settings in the async dosmode code
authorRalph Boehme <slow@samba.org>
Mon, 24 Jan 2022 15:45:11 +0000 (16:45 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 28 Feb 2022 20:01:36 +0000 (20:01 +0000)
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>
source3/modules/vfs_default.c

index 49a73ab97f6f6220d6be2bdcc194ccb95bb71f7e..647608747921a8d57c04a64554fe28958956cc91 100644 (file)
@@ -1784,6 +1784,14 @@ static struct tevent_req *vfswrap_get_dos_attributes_send(
                .smb_fname = smb_fname,
        };
 
+       if (!lp_store_dos_attributes(SNUM(dir_fsp->conn))) {
+               DBG_ERR("%s: \"smbd async dosmode\" enabled, but "
+                       "\"store dos attributes\" is disabled\n",
+                       dir_fsp->conn->connectpath);
+               tevent_req_nterror(req, NT_STATUS_NOT_IMPLEMENTED);
+               return tevent_req_post(req, ev);
+       }
+
        subreq = SMB_VFS_GETXATTRAT_SEND(state,
                                         ev,
                                         dir_fsp,