From 16be7d70450b234daebdfd2dc4813655d73e547c Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Mon, 24 Jan 2022 16:45:11 +0100 Subject: [PATCH] smbd: check "store dos attributes" settings in the async dosmode code BUG: https://bugzilla.samba.org/show_bug.cgi?id=14957 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison (cherry picked from commit ecf56c1d9b6b898ed4060e3bba341392ddcc9b5a) --- source3/modules/vfs_default.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index c52d29dc2fe..5977122a512 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -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,