[newlib-cygwin] get_posix_access: Fix group deny bits leaking into file type attribute bits
Corinna Vinschen
corinna@sourceware.org
Fri Jan 15 14:13:00 GMT 2016
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=d2216272f5a9ff2b9abcff31348ea28cc5805dbf
commit d2216272f5a9ff2b9abcff31348ea28cc5805dbf
Author: Corinna Vinschen <corinna@vinschen.de>
Date: Fri Jan 15 15:13:11 2016 +0100
get_posix_access: Fix group deny bits leaking into file type attribute bits
* 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>
Diff:
---
winsup/cygwin/sec_acl.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/winsup/cygwin/sec_acl.cc b/winsup/cygwin/sec_acl.cc
index 666506f..51003c4 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:
More information about the Cygwin-cvs
mailing list