]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: filename_convert_dirfsp always gives an fsp
authorVolker Lendecke <vl@samba.org>
Mon, 22 Jul 2024 08:42:11 +0000 (10:42 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 6 Aug 2024 16:29:33 +0000 (16:29 +0000)
We're in setpathinfo, so if there's without an fsp it's
OBJECT_NAME_NOT_FOUND, the last component is missing.

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

index 8406e10d55739066b2e13fa42bacc378ef750c88..e41be9f4d71839a56da2aa5e9408e44fcd8db80b 100644 (file)
@@ -4581,6 +4581,10 @@ static void call_trans2setpathinfo(
         * below, it can still be NULL.
         */
        fsp = smb_fname->fsp;
+       if (fsp == NULL) {
+               status = NT_STATUS_OBJECT_NAME_NOT_FOUND;
+               goto done;
+       }
 
        status = smbd_do_setfilepathinfo(
                conn,