This is the mail archive of the cygwin-cvs@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[newlib-cygwin/cygwin-acl] get_posix_access: Fix testing owner in every merge loop only


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=0fbc4d7589fe197af1fc8d625e7ea4b9b15444af

commit 0fbc4d7589fe197af1fc8d625e7ea4b9b15444af
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Tue Nov 10 09:57:53 2015 +0100

    get_posix_access: Fix testing owner in every merge loop only
    
            * sec_acl.cc (get_posix_access): Call authz_get_user_attribute on
            current users, not on owner.
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/ChangeLog  | 5 +++++
 winsup/cygwin/sec_acl.cc | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 24a795c..2f09ad4 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2015-11-10  Corinna Vinschen  <corinna@vinschen.de>
+
+	* sec_acl.cc (get_posix_access): Call authz_get_user_attribute on
+	current users, not on owner.
+
 2015-11-05  Corinna Vinschen  <corinna@vinschen.de>
 
 	* mount.cc (fs_info::update): Fake a serial number on filesystems not
diff --git a/winsup/cygwin/sec_acl.cc b/winsup/cygwin/sec_acl.cc
index ec6aa7f..a9e1dea 100644
--- a/winsup/cygwin/sec_acl.cc
+++ b/winsup/cygwin/sec_acl.cc
@@ -1023,8 +1023,8 @@ get_posix_access (PSECURITY_DESCRIPTOR psd,
 	       user permissions are correctly reflecting the Windows
 	       permissions. */
 	    if (cygheap->pg.nss_pwd_db ()
-		&& authz_get_user_attribute (&perm, psd, owner_sid))
-	      lacl[0].a_perm = perm;
+		&& authz_get_user_attribute (&perm, psd, aclsid[idx]))
+	      lacl[idx].a_perm = perm;
 	    /* Otherwise we only check the current user.  If the user entry
 	       has a deny ACE, don't check. */
 	    else if (lacl[idx].a_id == myself->uid


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]