]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Fix a comment and an error message
authorVolker Lendecke <vl@samba.org>
Mon, 22 Jul 2024 17:53:40 +0000 (19:53 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 6 Aug 2024 16:29:33 +0000 (16:29 +0000)
Tested manually, but OBJECT_NAME_NOT_FOUND makes much more sense given
the new semantics of filename_convert_dirfsp.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/smb1_reply.c

index 392de41940e3f6cfcc92dfbf755551eb6eb67288..3b71f5fb8ba17c28659a899037ea949fbb567a76 100644 (file)
@@ -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;
        }