[SCM] SAMBA-CTDB repository - branch v3-2-ctdb updated - build_3.2.11_ctdb_62-4-g99fbbc2

Michael Adam obnox at samba.org
Wed Aug 19 16:39:54 MDT 2009


The branch, v3-2-ctdb has been updated
       via  99fbbc24297edec3197ed3d80272ac526a058939 (commit)
       via  b5efabdccf8dcdaf576c6729c4aed39016bd1a6e (commit)
      from  1542d479c617349285fb4bbc875b62a1e7ae8d6f (commit)

http://gitweb.samba.org/?p=obnox/samba-ctdb.git;a=shortlog;h=v3-2-ctdb


- Log -----------------------------------------------------------------
commit 99fbbc24297edec3197ed3d80272ac526a058939
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 14 15:06:11 2009 -0700

    Use defined names rather than numeric constants to make code clearer. Jeremy.

commit b5efabdccf8dcdaf576c6729c4aed39016bd1a6e
Author: Michael Adam <obnox at samba.org>
Date:   Mon Aug 10 18:18:19 2009 +0200

    gpfs.so: map the file_inherit and dir_inherit flags away for files
    
    GPFS sets inherits dir_inhert and file_inherit flags
    to files, too, which confuses windows, and seems to
    be wrong anyways.
    
    So when mapping a nfs4 acl to a windows acl, we map these
    flags away for files.
    
    Michael

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

Summary of changes:
 source/modules/nfs4_acls.c |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/modules/nfs4_acls.c b/source/modules/nfs4_acls.c
index d19f2b9..515272c 100644
--- a/source/modules/nfs4_acls.c
+++ b/source/modules/nfs4_acls.c
@@ -230,6 +230,7 @@ static bool smbacl4_nfs42win(TALLOC_CTX *mem_ctx, SMB4ACL_T *acl, /* in */
 		SEC_ACCESS mask;
 		DOM_SID sid;
 		SMB_ACE4PROP_T	*ace = &aceint->prop;
+		uint32_t mapped_ace_flags;
 
 		DEBUG(10, ("magic: 0x%x, type: %d, iflags: %x, flags: %x, mask: %x, "
 			"who: %d\n", aceint->magic, ace->aceType, ace->flags,
@@ -265,10 +266,24 @@ static bool smbacl4_nfs42win(TALLOC_CTX *mem_ctx, SMB4ACL_T *acl, /* in */
 		if (is_directory && (ace->aceMask & SMB_ACE4_ADD_FILE)) {
 			ace->aceMask |= SMB_ACE4_DELETE_CHILD;
 		}
+
+		mapped_ace_flags = ace->aceFlags & 0xf;
+		if (!is_directory && (mapped_ace_flags & (SMB_ACE4_FILE_INHERIT_ACE|SMB_ACE4_DIRECTORY_INHERIT_ACE))) {
+			/*
+			 * GPFS sets inherits dir_inhert and file_inherit flags
+			 * to files, too, which confuses windows, and seems to
+			 * be wrong anyways. ==> Map these bits away for files.
+			 */
+			DEBUG(10, ("removing inherit flags from nfs4 ace\n"));
+			mapped_ace_flags &= ~(SMB_ACE4_FILE_INHERIT_ACE|SMB_ACE4_DIRECTORY_INHERIT_ACE);
+		}
+		DEBUG(10, ("mapped ace flags: 0x%x => 0x%x\n",
+		      ace->aceFlags, mapped_ace_flags));
+
 		init_sec_access(&mask, ace->aceMask);
 		init_sec_ace(&nt_ace_list[good_aces++], &sid,
 			ace->aceType, mask,
-			ace->aceFlags & 0xf);
+			mapped_ace_flags);
 	}
 
 	*ppnt_ace_list = nt_ace_list;


-- 
SAMBA-CTDB repository


More information about the samba-cvs mailing list