diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2014-09-03 12:57:20 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2014-09-03 12:57:20 +0400 |
commit | 89d195a7d1f42c42c21dab188c0e93163d9848a0 (patch) | |
tree | cac53ba1e10f0e5b2048b964dad229e5dfd98396 /winsup/utils | |
parent | 7a1cf1a0031f591e26d8f46d5fc1c8ea834db13e (diff) |
* setfacl.c (getaclentry): Fix return value in case of a lone 'm' if
action is Delete. Drop requirement for a trailing colon if action is
Delete.
Diffstat (limited to 'winsup/utils')
-rw-r--r-- | winsup/utils/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/utils/setfacl.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index 741fdb362..97323d0bf 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,9 @@ +2014-09-03 Corinna Vinschen <corinna@vinschen.de> + + * setfacl.c (getaclentry): Fix return value in case of a lone 'm' if + action is Delete. Drop requirement for a trailing colon if action is + Delete. + 2014-08-31 Corinna Vinschen <corinna@vinschen.de> * setfacl.c (usage): Drop outdated note that default ACEs are not diff --git a/winsup/utils/setfacl.c b/winsup/utils/setfacl.c index 56c83fee7..a3b2226c3 100644 --- a/winsup/utils/setfacl.c +++ b/winsup/utils/setfacl.c @@ -108,8 +108,8 @@ getaclentry (action_t action, char *c, aclent_t *ace) return FALSE; /* Skip to next field. */ c = c2; - if (!*c && action != Delete) - return FALSE; + if (!*c) + return action == Delete && (ace->a_type & CLASS_OBJ); /* If this is a user or group entry, check if next char is a colon char. If so, skip it, otherwise it's the name of a user or group. */ if (!(ace->a_type & (USER_OBJ | GROUP_OBJ))) @@ -131,8 +131,6 @@ getaclentry (action_t action, char *c, aclent_t *ace) *c2++ = '\0'; else if (action != Delete) return FALSE; - else if (!(ace->a_type & ACL_DEFAULT)) - return FALSE; /* Fetch user/group id. */ if (isdigit ((unsigned char) *c)) { |