From 556ceaeb58fc032b78f0a00ba8bd088ea0b90c63 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 10 Mar 2003 16:25:48 +0000 Subject: [PATCH] * sec_acl.cc (setacl): Don't handle DELETE flag specially. * security.cc (alloc_sd): Ditto. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/sec_acl.cc | 10 ++-------- winsup/cygwin/security.cc | 4 ++-- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 60880a9e5..587c46c17 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2003-03-10 Corinna Vinschen + + * sec_acl.cc (setacl): Don't handle DELETE flag specially. + * security.cc (alloc_sd): Ditto. + 2003-03-09 Corinna Vinschen * winver.rc: Change Copyright hint to include 2003. diff --git a/winsup/cygwin/sec_acl.cc b/winsup/cygwin/sec_acl.cc index b92936588..c8f326627 100644 --- a/winsup/cygwin/sec_acl.cc +++ b/winsup/cygwin/sec_acl.cc @@ -119,19 +119,13 @@ setacl (const char *file, int nentries, __aclent32_t *aclbufp) DWORD allow; /* Owner has more standard rights set. */ if ((aclbufp[i].a_type & ~ACL_DEFAULT) == USER_OBJ) - allow = (STANDARD_RIGHTS_ALL & ~DELETE) - | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA; + allow = STANDARD_RIGHTS_ALL | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA; else allow = STANDARD_RIGHTS_READ | FILE_READ_ATTRIBUTES | FILE_READ_EA; if (aclbufp[i].a_perm & S_IROTH) allow |= FILE_GENERIC_READ; if (aclbufp[i].a_perm & S_IWOTH) - { - allow |= STANDARD_RIGHTS_WRITE | FILE_GENERIC_WRITE; - /* Owner gets DELETE right, too. */ - if ((aclbufp[i].a_type & ~ACL_DEFAULT) == USER_OBJ) - allow |= DELETE; - } + allow |= STANDARD_RIGHTS_WRITE | FILE_GENERIC_WRITE; if (aclbufp[i].a_perm & S_IXOTH) allow |= FILE_GENERIC_EXECUTE; if ((aclbufp[i].a_perm & (S_IWOTH | S_IXOTH)) == (S_IWOTH | S_IXOTH)) diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc index ae6d5ddbb..a4fdf8426 100644 --- a/winsup/cygwin/security.cc +++ b/winsup/cygwin/security.cc @@ -1644,12 +1644,12 @@ alloc_sd (__uid32_t uid, __gid32_t gid, int attribute, int ace_off = 0; /* Construct allow attribute for owner. */ - DWORD owner_allow = (STANDARD_RIGHTS_ALL & ~DELETE) + DWORD owner_allow = STANDARD_RIGHTS_ALL | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA; if (attribute & S_IRUSR) owner_allow |= FILE_GENERIC_READ; if (attribute & S_IWUSR) - owner_allow |= FILE_GENERIC_WRITE | DELETE; + owner_allow |= FILE_GENERIC_WRITE; if (attribute & S_IXUSR) owner_allow |= FILE_GENERIC_EXECUTE; if ((attribute & (S_IFDIR | S_IWUSR | S_IXUSR))