summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorChristof Schmitt <cs@samba.org>2017-08-23 12:37:08 -0700
committerRalph Boehme <slow@samba.org>2017-09-04 14:08:45 +0200
commit139bbf327e28e68d10ec65f40ae1fc5b822e15c7 (patch)
treec4cbef3dbd2d24b582a72324e9ade56224a3779e /source3
parent19004113f3c1a16dc7bfda60402623efd115265a (diff)
downloadsamba-139bbf327e28e68d10ec65f40ae1fc5b822e15c7.tar.gz
vfs_gpfs: Request DENY_DELETE sharemode when possible
Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Mon Sep 4 14:08:45 CEST 2017 on sn-devel-144
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/vfs_gpfs.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index 012b9331701..e94c9cc4f1d 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -99,6 +99,15 @@ static bool set_gpfs_sharemode(files_struct *fsp, uint32_t access_mask,
0 : GPFS_DENY_WRITE;
deny |= (share_access & (FILE_SHARE_READ)) ?
0 : GPFS_DENY_READ;
+
+ /*
+ * GPFS_DENY_DELETE can only be set together with either
+ * GPFS_DENY_WRITE or GPFS_DENY_READ.
+ */
+ if (deny & (GPFS_DENY_WRITE|GPFS_DENY_READ)) {
+ deny |= (share_access & (FILE_SHARE_DELETE)) ?
+ 0 : GPFS_DENY_DELETE;
+ }
}
DEBUG(10, ("am=%x, allow=%d, sa=%x, deny=%d\n",
access_mask, allow, share_access, deny));