1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

vfs_default: return stat info for symlinks in POSIX context

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Ralph Boehme 2020-10-16 15:47:50 +02:00
parent dd36847928
commit 36d72d8a81

View File

@ -619,10 +619,13 @@ static struct dirent *vfswrap_readdir(vfs_handle_struct *handle,
/*
* As this is an optimization, ignore it if we stat'ed a
* symlink. Make the caller do it again as we don't know if
* they wanted the link info, or its target info.
* symlink for non-POSIX context. Make the caller do it again
* as we don't know if they wanted the link info, or its
* target info.
*/
if (S_ISLNK(st.st_mode)) {
if (S_ISLNK(st.st_mode) &&
!(dirfsp->fsp_name->flags & SMB_FILENAME_POSIX_PATH))
{
return result;
}
init_stat_ex_from_stat(sbuf, &st, fake_ctime);