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>2008-10-13 20:01:50 +0400
committerCorinna Vinschen <corinna@vinschen.de>2008-10-13 20:01:50 +0400
commit5f9ca0d25add60f331f8a39ce308ffd99157f0b4 (patch)
treec1d177ee909a07cfd67a08089b7f45c4718c9d2d /winsup/cygwin/security.cc
parent423fd4f2f40540074f56cb8e6f24ac34ca82184c (diff)
* sec_acl.cc (setacl): Align standard owner and group permissions
with alloc_sd. Strip FILE_READ_ATTRIBUTES fromn setting FILE_GENERIC_EXECUTE permissions same as in alloc_sd. * security.cc (alloc_sd): Reformat expression. Strip EA permission bits from owner_deny and group_deny computation.
Diffstat (limited to 'winsup/cygwin/security.cc')
-rw-r--r--winsup/cygwin/security.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc
index 58c740e21..66dc93c98 100644
--- a/winsup/cygwin/security.cc
+++ b/winsup/cygwin/security.cc
@@ -479,8 +479,8 @@ alloc_sd (path_conv &pc, __uid32_t uid, __gid32_t gid, int attribute,
owner_allow |= FILE_DELETE_CHILD;
/* Construct allow attribute for group. */
- DWORD group_allow = STANDARD_RIGHTS_READ |
- (pc.fs_is_samba () ? 0 : FILE_READ_ATTRIBUTES);
+ DWORD group_allow = STANDARD_RIGHTS_READ
+ | (pc.fs_is_samba () ? 0 : FILE_READ_ATTRIBUTES);
if (attribute & S_IRGRP)
group_allow |= FILE_GENERIC_READ;
if (attribute & S_IWGRP)
@@ -526,12 +526,10 @@ alloc_sd (path_conv &pc, __uid32_t uid, __gid32_t gid, int attribute,
DWORD owner_deny = ~owner_allow & (group_allow | other_allow);
owner_deny &= ~(STANDARD_RIGHTS_READ
- | FILE_READ_ATTRIBUTES | FILE_READ_EA
- | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA);
+ | FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES);
DWORD group_deny = ~group_allow & other_allow;
- group_deny &= ~(STANDARD_RIGHTS_READ
- | FILE_READ_ATTRIBUTES | FILE_READ_EA);
+ group_deny &= ~(STANDARD_RIGHTS_READ | FILE_READ_ATTRIBUTES);
/* Set deny ACE for owner. */
if (owner_deny