From 54b694c3406cbb2ca30713f6c3b2b4b0587d4323 Mon Sep 17 00:00:00 2001 From: corinna Date: Sat, 10 Apr 2004 20:18:11 +0000 Subject: [PATCH] * sec_acl.cc (setacl): Use correct offset when trying to combine standard and default entry of same type. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/sec_acl.cc | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 2af2567259..ba99bbf18b 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2004-04-10 Corinna Vinschen + + * sec_acl.cc (setacl): Use correct offset when trying to combine + standard and default entry of same type. + 2004-04-10 Pierre Humblet * fhandler.cc (rootdir): Add and use second argument. diff --git a/winsup/cygwin/sec_acl.cc b/winsup/cygwin/sec_acl.cc index 7bcf36cb40..dc2473e9e6 100644 --- a/winsup/cygwin/sec_acl.cc +++ b/winsup/cygwin/sec_acl.cc @@ -142,11 +142,11 @@ setacl (const char *file, int nentries, __aclent32_t *aclbufp) aclbufp[i].a_type | ACL_DEFAULT, (aclbufp[i].a_type & (USER|GROUP)) ? aclbufp[i].a_id : ILLEGAL_UID)) >= 0 - && aclbufp[i].a_perm == aclbufp[pos].a_perm) + && aclbufp[i].a_perm == aclbufp[i + 1 + pos].a_perm) { inheritance = SUB_CONTAINERS_AND_OBJECTS_INHERIT; /* This invalidates the corresponding default entry. */ - aclbufp[pos].a_type = USER|GROUP|ACL_DEFAULT; + aclbufp[i + 1 + pos].a_type = USER|GROUP|ACL_DEFAULT; } switch (aclbufp[i].a_type) { -- 2.11.0