vfs_gpfs: Do not map DELETE sharemode access to WRITE
authorChristof Schmitt <cs@samba.org>
Wed, 23 Aug 2017 17:33:42 +0000 (10:33 -0700)
committerRalph Boehme <slow@samba.org>
Mon, 4 Sep 2017 08:09:23 +0000 (10:09 +0200)
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>
source3/modules/vfs_gpfs.c

index b2c92447f75f4389c9a1a432aeea57c88995408b..012b9331701840aa767fb954070eeef620e21a62 100644 (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;