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
(cherry picked from commit 535a08dfc4
)
Autobuild-User(v4-16-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-16-test): Mon Dec 5 11:03:30 UTC 2022 on sn-devel-184
This commit is contained in:
parent
8c2f27d442
commit
885e3fc12d
@ -1 +0,0 @@
|
||||
^samba3.smb2.create.dosattr_tmp_dir\(.*\)
|
@ -940,6 +940,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",
|
||||
|
Loading…
Reference in New Issue
Block a user