Use defined names rather than numeric constants to make code clearer. Jeremy.
authorJeremy Allison <jra@samba.org>
Fri, 14 Aug 2009 22:06:11 +0000 (15:06 -0700)
committerMichael Adam <obnox@samba.org>
Wed, 10 Mar 2010 12:22:03 +0000 (13:22 +0100)
source3/modules/nfs4_acls.c

index 4d4f8256f921dfa2f4644284036835b2e5fafa1d..ddb7a75411113f6098f59e97d89f40b55da44467 100644 (file)
@@ -269,14 +269,14 @@ static bool smbacl4_nfs42win(TALLOC_CTX *mem_ctx, SMB4ACL_T *theacl, /* in */
                }
 
                mapped_ace_flags = ace->aceFlags & 0xf;
-               if (!is_directory && (mapped_ace_flags & 0x3)) {
+               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 &= ~0x3;
+                       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));