From: Ralph Boehme Date: Tue, 17 Nov 2020 06:54:42 +0000 (+0100) Subject: smbd: use pathref fsp in call_trans2qfilepathinfo() X-Git-Tag: samba-4.14.0rc1~308 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2bcb268b1837371c9b8a384ca310ac6e54a812d6;p=thirdparty%2Fsamba.git smbd: use pathref fsp in call_trans2qfilepathinfo() Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 41ed5e8a0b7..7dbcf922aa9 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -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)) {