[SCM] Samba Shared Repository - branch master updated

Ralph Böhme slow at samba.org
Mon Sep 4 12:09:02 UTC 2017


The branch, master has been updated
       via  139bbf3 vfs_gpfs: Request DENY_DELETE sharemode when possible
       via  1900411 vfs_gpfs: Do not map DELETE sharemode access to WRITE
      from  dccd963 ctdb-client: Use sock_client abstraction for eventd client

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 139bbf327e28e68d10ec65f40ae1fc5b822e15c7
Author: Christof Schmitt <cs at samba.org>
Date:   Wed Aug 23 12:37:08 2017 -0700

    vfs_gpfs: Request DENY_DELETE sharemode when possible
    
    Signed-off-by: Christof Schmitt <cs at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    
    Autobuild-User(master): Ralph Böhme <slow at samba.org>
    Autobuild-Date(master): Mon Sep  4 14:08:45 CEST 2017 on sn-devel-144

commit 19004113f3c1a16dc7bfda60402623efd115265a
Author: Christof Schmitt <cs at samba.org>
Date:   Wed Aug 23 10:33:42 2017 -0700

    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 at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 source3/modules/vfs_gpfs.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index b2c9244..e94c9cc 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -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;
 
@@ -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));


-- 
Samba Shared Repository



More information about the samba-cvs mailing list