From 8b0358876abea2cf78bdcbc3582f1bb5f5d94c91 Mon Sep 17 00:00:00 2001 From: jpandre Date: Fri, 5 Sep 2008 14:06:43 +0000 Subject: [PATCH] Reverted wrong fix for parent directory having a default Posix ACL - feed back from fuse needed --- libntfs-3g/acls.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/libntfs-3g/acls.c b/libntfs-3g/acls.c index a995f6b7..621a727b 100644 --- a/libntfs-3g/acls.c +++ b/libntfs-3g/acls.c @@ -1065,9 +1065,7 @@ struct POSIX_SECURITY *ntfs_build_inherited_posix( sizeof(struct POSIX_SECURITY) + count*sizeof(struct POSIX_ACE)); if (pydesc) { /* - * Copy inherited tags - * and, for a plain file, remove execution right - * from owner, other and mask + * Copy inherited tags and adapt perms */ tagsset = 0; defcnt = (pxdesc ? pxdesc->defcnt : 0); @@ -1076,10 +1074,17 @@ struct POSIX_SECURITY *ntfs_build_inherited_posix( *pyace = pxdesc->acl.ace[pxdesc->firstdef + i]; switch (pyace->tag) { case POSIX_ACL_USER_OBJ : + pyace->perms &= (mode >> 6) & 7; + break; + case POSIX_ACL_GROUP_OBJ : + if (!(tagsset & POSIX_ACL_MASK)) + pyace->perms &= (mode >> 3) & 7; + break; case POSIX_ACL_OTHER : + pyace->perms &= mode & 7; + break; case POSIX_ACL_MASK : - if (!isdir) - pyace->perms &= 6; + pyace->perms &= (mode >> 3) & 7; break; default : break;