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

vfs_gpfs: Do not map DELETE sharemode access to WRITE

A SMB client can deny the WRITE sharemode, but still grant the DELETE
sharemode. Mapping the requested DELETE access to WRITE access breaks
this case. Fix this by removing the incorrect mapping from DELETE access
to WRITE access.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Christof Schmitt 2017-08-23 10:33:42 -07:00 committed by Ralph Boehme
parent dccd9630fb
commit 19004113f3

View File

@ -86,8 +86,8 @@ static bool set_gpfs_sharemode(files_struct *fsp, uint32_t access_mask,
return True;
}
allow |= (access_mask & (FILE_WRITE_DATA|FILE_APPEND_DATA|
DELETE_ACCESS)) ? GPFS_SHARE_WRITE : 0;
allow |= (access_mask & (FILE_WRITE_DATA|FILE_APPEND_DATA)) ?
GPFS_SHARE_WRITE : 0;
allow |= (access_mask & (FILE_READ_DATA|FILE_EXECUTE)) ?
GPFS_SHARE_READ : 0;