smbd: Return ISLNK from non_widelink_open() in smb_fname
authorVolker Lendecke <vl@samba.org>
Sat, 8 Jan 2022 09:08:16 +0000 (10:08 +0100)
committerRalph Boehme <slow@samba.org>
Fri, 11 Mar 2022 18:22:28 +0000 (18:22 +0000)
commitde439cd0304773c59ebd33ddeddf675dd611944c
tree79f39397e747f2f74cde5f2e82587346570548f8
parente7b933100ee487ae19cd2b3938f58056dca2115a
smbd: Return ISLNK from non_widelink_open() in smb_fname

Soon we want to not require stat() calls before entering
openat_pathref_fsp() anymore but rely on the fstat on the O_PATH file
handle (alternatively the call to fstatat(AT_SYMLINK_NOFOLLOW)) done
properly from within fd_openat(). The callers of non_widelink_open()
expect the stat information to be correct in "smb_fname". Copy it in
case of not opening a symlink in the posix case.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/open.c