From cfa24f05639d2c65c8b7e045cbdeaabcbcf16861 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 22 Jul 2024 19:53:40 +0200 Subject: [PATCH] smbd: Fix a comment and an error message Tested manually, but OBJECT_NAME_NOT_FOUND makes much more sense given the new semantics of filename_convert_dirfsp. Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/smbd/smb1_reply.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source3/smbd/smb1_reply.c b/source3/smbd/smb1_reply.c index 392de41940e..3b71f5fb8ba 100644 --- a/source3/smbd/smb1_reply.c +++ b/source3/smbd/smb1_reply.c @@ -956,8 +956,11 @@ void reply_setatr(struct smb_request *req) } if (smb_fname->fsp == NULL) { - /* Can't set access rights on a symlink. */ - reply_nterror(req, NT_STATUS_ACCESS_DENIED); + /* + * filename_convert_dirfsp only returns a NULL fsp for + * new files. + */ + reply_nterror(req, NT_STATUS_OBJECT_NAME_NOT_FOUND); goto out; }