[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-995-g12864ff

Michael Adam obnox at samba.org
Fri Aug 14 15:30:13 MDT 2009


The branch, master has been updated
       via  12864ffd51011e38ad56f129de684dbcdf9271de (commit)
      from  19553e1552a57d5b0a9f3514bf64d2580b76a377 (commit)

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


- Log -----------------------------------------------------------------
commit 12864ffd51011e38ad56f129de684dbcdf9271de
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:
 source3/modules/nfs4_acls.c |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c
index 748f17d..e8ba1fa 100644
--- a/source3/modules/nfs4_acls.c
+++ b/source3/modules/nfs4_acls.c
@@ -226,6 +226,7 @@ static bool smbacl4_nfs42win(TALLOC_CTX *mem_ctx, SMB4ACL_T *theacl, /* in */
 		uint32_t 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,
@@ -262,10 +263,23 @@ static bool smbacl4_nfs42win(TALLOC_CTX *mem_ctx, SMB4ACL_T *theacl, /* in */
 			ace->aceMask |= SMB_ACE4_DELETE_CHILD;
 		}
 
+		mapped_ace_flags = ace->aceFlags & 0xf;
+		if (!is_directory && (mapped_ace_flags & 0x3)) {
+			/*
+			 * 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 &= ~0x3;
+		}
+		DEBUG(10, ("mapped ace flags: 0x%x => 0x%x\n",
+		      ace->aceFlags, mapped_ace_flags));
+
 		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 Shared Repository


More information about the samba-cvs mailing list