1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

smbd: ignore symlinks in file_set_dosmode()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Ralph Boehme 2023-10-31 10:06:38 +01:00 committed by Jeremy Allison
parent 9b3c085409
commit 7c7786a121

View File

@ -903,6 +903,11 @@ int file_set_dosmode(connection_struct *conn,
return -1;
}
if (S_ISLNK(smb_fname->st.st_ex_mode)) {
/* A symlink in POSIX context, ignore */
return 0;
}
if ((S_ISDIR(smb_fname->st.st_ex_mode)) &&
(dosmode & FILE_ATTRIBUTE_TEMPORARY))
{