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

smbd: reject FILE_ATTRIBUTE_TEMPORARY on directories

Cf MS-FSA 2.1.5.14.2

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15252

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Nov 28 10:14:12 UTC 2022 on sn-devel-184
This commit is contained in:
Ralph Boehme 2022-11-22 07:31:52 +01:00
parent fdb19ce8aa
commit 535a08dfc4
2 changed files with 7 additions and 1 deletions

View File

@ -1 +0,0 @@
^samba3.smb2.create.dosattr_tmp_dir\(.*\)

View File

@ -918,6 +918,13 @@ int file_set_dosmode(connection_struct *conn,
return -1;
}
if ((S_ISDIR(smb_fname->st.st_ex_mode)) &&
(dosmode & FILE_ATTRIBUTE_TEMPORARY))
{
errno = EINVAL;
return -1;
}
dosmode &= SAMBA_ATTRIBUTES_MASK;
DEBUG(10,("file_set_dosmode: setting dos mode 0x%x on file %s\n",