summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim McDonough <jmcd@samba.org>2007-01-12 21:56:25 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:04 -0500
commit700c3ab1c94fcd0ff422afa0e0e3faf419b3c5af (patch)
treed00fbc40e691239dc2268889fc65fb8876ea7a61
parentdbea3a2b6fa317b6854eb2ba4a5ef5e1253c3180 (diff)
downloadsamba-700c3ab1c94fcd0ff422afa0e0e3faf419b3c5af.tar.gz
samba-700c3ab1c94fcd0ff422afa0e0e3faf419b3c5af.tar.bz2
samba-700c3ab1c94fcd0ff422afa0e0e3faf419b3c5af.zip
r20717: Merge sharemode patch from Mathias Dietz <MDIETZ@de.ibm.com>.
The patch fixes the behaviour of GPFS sharemodes when the access mask is no_access. (This used to be commit 799967c66879b4d6e28f1af6ba27c67f0b1deaeb)
-rw-r--r--source3/modules/gpfs.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source3/modules/gpfs.c b/source3/modules/gpfs.c
index f63a85294b..3fec7a479d 100644
--- a/source3/modules/gpfs.c
+++ b/source3/modules/gpfs.c
@@ -52,11 +52,16 @@ BOOL set_gpfs_sharemode(files_struct *fsp, uint32 access_mask,
DELETE_ACCESS)) ? GPFS_SHARE_WRITE : 0;
allow |= (access_mask & (FILE_READ_DATA|FILE_EXECUTE)) ?
GPFS_SHARE_READ : 0;
- deny |= (share_access & (FILE_SHARE_WRITE|FILE_SHARE_DELETE)) ?
- 0 : GPFS_DENY_WRITE;
- deny |= (share_access & (FILE_SHARE_READ)) ?
- 0 : GPFS_DENY_READ;
+ if (allow == GPFS_SHARE_NONE) {
+ DEBUG(10, ("special case am=no_access:%x\n",access_mask));
+ }
+ else {
+ deny |= (share_access & (FILE_SHARE_WRITE|FILE_SHARE_DELETE)) ?
+ 0 : GPFS_DENY_WRITE;
+ deny |= (share_access & (FILE_SHARE_READ)) ?
+ 0 : GPFS_DENY_READ;
+ }
DEBUG(10, ("am=%x, allow=%d, sa=%x, deny=%d\n",
access_mask, allow, share_access, deny));