From: corinna Date: Sun, 24 Nov 2002 18:07:30 +0000 (+0000) Subject: * setfacl.c (getperm): Set only `other' permission bits. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=c588c4bff70b860196ae88c455b7e4e5272921ff;p=pf3gnuchains%2Fpf3gnuchains3x.git * setfacl.c (getperm): Set only `other' permission bits. (getaclentry): Set a_id to -1 by default. --- diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index ab41be3918..545ecd7b61 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,5 +1,10 @@ 2002-11-24 Corinna Vinschen + * setfacl.c (getperm): Set only `other' permission bits. + (getaclentry): Set a_id to -1 by default. + +2002-11-24 Corinna Vinschen + * getfacl.c (permstr): Use `other' permission bits for requesting ace permissions. diff --git a/winsup/utils/setfacl.c b/winsup/utils/setfacl.c index 6ce9abd4cc..c497bf9eee 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)