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>2016-01-15 17:13:11 +0300
committerCorinna Vinschen <corinna@vinschen.de>2016-01-15 17:13:11 +0300
commitd2216272f5a9ff2b9abcff31348ea28cc5805dbf (patch)
tree9bc5c60d4acc160ae57f78c8e472216fda95af00
parentfc449e1c1f9bca82588da69caa230db27bdbdb2c (diff)
get_posix_access: Fix group deny bits leaking into file type attribute bitscygwin-2_4_0-release
* sec_acl.cc (get_posix_access): Fix bracketing in expression constructing POSIX group permissions so as not leaking deny bits into POSIX file type bits. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r--winsup/cygwin/sec_acl.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/sec_acl.cc b/winsup/cygwin/sec_acl.cc
index 666506f2b..51003c4d0 100644
--- a/winsup/cygwin/sec_acl.cc
+++ b/winsup/cygwin/sec_acl.cc
@@ -1080,7 +1080,7 @@ get_posix_access (PSECURITY_DESCRIPTOR psd,
to fetch the affecting bits from, at least as long as the array
hasn't been sorted. */
attr |= (lacl[0].a_perm & S_IRWXO) << 6;
- attr |= (has_class_perm ? class_perm : (lacl[1].a_perm & S_IRWXO)) << 3;
+ attr |= ((has_class_perm ? class_perm : lacl[1].a_perm) & S_IRWXO) << 3;
attr |= (lacl[2].a_perm & S_IRWXO);
out: