]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: use pathref fsp in call_trans2qfilepathinfo()
authorRalph Boehme <slow@samba.org>
Tue, 17 Nov 2020 06:54:42 +0000 (07:54 +0100)
committerRalph Boehme <slow@samba.org>
Wed, 16 Dec 2020 09:08:31 +0000 (09:08 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/trans2.c

index 41ed5e8a0b7b6a7031009c2370c24ddbd8921f68..7dbcf922aa9ae706f766db38f74909679bac8762 100644 (file)
@@ -6192,6 +6192,13 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
                        return;
                }
 
+               /*
+                * smb_fname->fsp may be NULL if smb_fname points at a symlink
+                * and we're in POSIX context, so be careful when using fsp
+                * below, it can still be NULL.
+                */
+               fsp = smb_fname->fsp;
+
                /* If this is a stream, check if there is a delete_pending. */
                if ((conn->fs_capabilities & FILE_NAMED_STREAMS)
                    && is_ntfs_stream_smb_fname(smb_fname)) {