diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2009-11-29 14:28:29 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2009-11-29 14:28:29 +0000 |
commit | 19ac72547f60c7e7bdc3fe37563adcef0d567a7c (patch) | |
tree | 945551d481a03369b63571b29eb1d3d0a32a8bc9 /winsup | |
parent | ff928075e96816424f9217655ac79cb4355b74d7 (diff) | |
download | newlib-19ac72547f60c7e7bdc3fe37563adcef0d567a7c.zip newlib-19ac72547f60c7e7bdc3fe37563adcef0d567a7c.tar.gz newlib-19ac72547f60c7e7bdc3fe37563adcef0d567a7c.tar.bz2 |
* setfacl.c (getaclentry): Allow to delete default entries for the
owner and owner group.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/utils/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/utils/setfacl.c | 15 |
2 files changed, 17 insertions, 3 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index 927a664..7590509 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,8 @@ +2009-11-29 Corinna Vinschen <corinna@vinschen.de> + + * setfacl.c (getaclentry): Allow to delete default entries for the + owner and owner group. + 2009-11-27 Corinna Vinschen <corinna@vinschen.de> * cygcheck.cc (dump_sysinfo): Fix typo in products. diff --git a/winsup/utils/setfacl.c b/winsup/utils/setfacl.c index 5e77c63..0dcf95c 100644 --- a/winsup/utils/setfacl.c +++ b/winsup/utils/setfacl.c @@ -120,9 +120,18 @@ getaclentry (action_t action, char *c, aclent_t *ace) return FALSE; *c2 = '\0'; } - else if (action != Delete) + else if (action == Delete) + { + /* Only default ugo entries are allowed to be removed, not the + standard ugo entries. */ + if (!(ace->a_type & ACL_DEFAULT)) + return FALSE; + } + else return FALSE; - if (c2 == c) + if (!c2 && !*c) /* Deleting a default ug entry is allowed. */ + ; + else if (c2 == c) { if (action == Delete) return FALSE; @@ -149,7 +158,7 @@ getaclentry (action_t action, char *c, aclent_t *ace) return FALSE; ace->a_id = gr->gr_gid; } - if (c2 != c) + if (c2 && c2 != c) { if (ace->a_type & USER_OBJ) { |