summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2016-05-19 10:59:42 +0200
committerAndreas Gruenbacher <agruenba@redhat.com>2016-05-19 11:01:26 +0200
commit37ce8f5a79a0c7c86875d7fd2e3c21f5aaeaf6ad (patch)
treefbe25cda8c179c7b53bd59104407273e1552043a
parentc6772a958800de064482634f77c20a0faafc5af6 (diff)
downloadacl-37ce8f5a79a0c7c86875d7fd2e3c21f5aaeaf6ad.tar.gz
setfacl: Allow more than four characters in the perms field
Allow setfacl commands like "setfacl -m u::rwx- file" to succeed.
-rw-r--r--tools/parse.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/parse.c b/tools/parse.c
index 413eb1c..9ddbafb 100644
--- a/tools/parse.c
+++ b/tools/parse.c
@@ -306,7 +306,7 @@ user_entry:
return cmd;
}
- for (perm_chars=0; perm_chars<3; perm_chars++, (*text_p)++) {
+ for (perm_chars=0;; perm_chars++, (*text_p)++) {
switch(**text_p) {
case 'r': /* read */
if (cmd->c_perm & CMD_PERM_READ)
@@ -344,8 +344,6 @@ user_entry:
return cmd;
}
}
- if (perm_chars != 3)
- goto fail;
return cmd;
fail: