diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2002-11-24 18:07:30 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2002-11-24 18:07:30 +0000 |
commit | 2d06bd11092a16584dcdfe7c8022daf28bccf62a (patch) | |
tree | 2f1c4bf7d805b7539b2f07efde15c6add29b2930 | |
parent | ad2bc53e8fa572ba7ff061b9e75f1314438e58d4 (diff) | |
download | newlib-2d06bd11092a16584dcdfe7c8022daf28bccf62a.zip newlib-2d06bd11092a16584dcdfe7c8022daf28bccf62a.tar.gz newlib-2d06bd11092a16584dcdfe7c8022daf28bccf62a.tar.bz2 |
* setfacl.c (getperm): Set only `other' permission bits.
(getaclentry): Set a_id to -1 by default.
-rw-r--r-- | winsup/utils/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/utils/setfacl.c | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index ab41be3..545ecd7 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,5 +1,10 @@ 2002-11-24 Corinna Vinschen <corinna@vinschen.de> + * setfacl.c (getperm): Set only `other' permission bits. + (getaclentry): Set a_id to -1 by default. + +2002-11-24 Corinna Vinschen <corinna@vinschen.de> + * getfacl.c (permstr): Use `other' permission bits for requesting ace permissions. diff --git a/winsup/utils/setfacl.c b/winsup/utils/setfacl.c index 6ce9abd..c497bf9 100644 --- a/winsup/utils/setfacl.c +++ b/winsup/utils/setfacl.c @@ -66,9 +66,9 @@ mode_t getperm (char *in) || !strchr ("w-", in[1]) || !strchr ("x-", in[2])) return ILLEGAL_MODE; - return (in[0] == 'r' ? S_IRUSR | S_IRGRP | S_IROTH : 0) - | (in[1] == 'w' ? S_IWUSR | S_IWGRP | S_IWOTH : 0) - | (in[2] == 'x' ? S_IXUSR | S_IXGRP | S_IXOTH : 0); + return (in[0] == 'r' ? S_IROTH : 0) + | (in[1] == 'w' ? S_IWOTH : 0) + | (in[2] == 'x' ? S_IXOTH : 0); } BOOL @@ -77,7 +77,7 @@ getaclentry (action_t action, char *c, aclent_t *ace) char *c2; ace->a_type = 0; - ace->a_id = 0; + ace->a_id = -1; ace->a_perm = 0; if (!strncmp (c, "default:", 8) |