Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2002-11-24 21:07:30 +0300
committerCorinna Vinschen <corinna@vinschen.de>2002-11-24 21:07:30 +0300
commit2d06bd11092a16584dcdfe7c8022daf28bccf62a (patch)
tree2f1c4bf7d805b7539b2f07efde15c6add29b2930
parentad2bc53e8fa572ba7ff061b9e75f1314438e58d4 (diff)
* setfacl.c (getperm): Set only `other' permission bits.
(getaclentry): Set a_id to -1 by default.
-rw-r--r--winsup/utils/ChangeLog5
-rw-r--r--winsup/utils/setfacl.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog
index ab41be391..545ecd7b6 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 6ce9abd4c..c497bf9ee 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)