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>2022-01-25 21:53:40 +0300
committerCorinna Vinschen <corinna@vinschen.de>2022-01-25 22:04:15 +0300
commit7d1e87cd76a920824507ff62164e8dbf3dcb8232 (patch)
tree31ed0ee23dc2d920b36a993c045302ba12682bba
parentc30c3026afe300666201a1edf7dd083311484675 (diff)
Cygwin: ACLs: don't set indicator for default ACEs prematurely
Commit a2bfe7cae61a introduced a change ignoring default ACEs on files to come up with a valid POSIX ACL, reflecting the Windows ACEs actually making sense on files. However, if CREATOR OWNER or CREATOR GROUP ACEs - both only making sense as default ACEs - are found in the ACL, a value indicating the presence of default ACEs gets set, even on files. This in turn breaks a subsequent integrity check and get_posix_access returns EINVAL. The code path handling default ACEs on directories sets this indicator anyway, so don't set it just because one of the above SIDs are found. Fixes: a2bfe7cae61a ("Cygwin: ACLs: ignore *_INHERIT flags in file ACLs") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r--winsup/cygwin/sec_acl.cc2
1 files changed, 0 insertions, 2 deletions
diff --git a/winsup/cygwin/sec_acl.cc b/winsup/cygwin/sec_acl.cc
index 98d2391b1..32edf0d32 100644
--- a/winsup/cygwin/sec_acl.cc
+++ b/winsup/cygwin/sec_acl.cc
@@ -850,14 +850,12 @@ get_posix_access (PSECURITY_DESCRIPTOR psd,
else if (ace_sid == well_known_creator_owner_sid)
{
type = DEF_USER_OBJ;
- types_def |= type;
id = ACL_UNDEFINED_ID;
saw_def_user_obj = true;
}
else if (ace_sid == well_known_creator_group_sid)
{
type = DEF_GROUP_OBJ;
- types_def |= type;
id = ACL_UNDEFINED_ID;
saw_def_group_obj = true;
}