get_posix_access: Fix computation of effective user permissions

* sec_acl.cc (get_posix_access): Fix computation of effective user
	permissions to handle current user, not only the file owner.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2015-11-10 09:57:53 +01:00
parent 6459131096
commit a5d81afc71
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2015-11-18 Corinna Vinschen <corinna@vinschen.de>
* sec_acl.cc (get_posix_access): Fix computation of effective user
permissions to handle current user, not only the file owner.
2015-11-18 Corinna Vinschen <corinna@vinschen.de> 2015-11-18 Corinna Vinschen <corinna@vinschen.de>
* fhandler_tty.cc (fhandler_pty_slave::open): Add S_IFCHR flag * fhandler_tty.cc (fhandler_pty_slave::open): Add S_IFCHR flag

View File

@ -1023,8 +1023,8 @@ get_posix_access (PSECURITY_DESCRIPTOR psd,
user permissions are correctly reflecting the Windows user permissions are correctly reflecting the Windows
permissions. */ permissions. */
if (cygheap->pg.nss_pwd_db () if (cygheap->pg.nss_pwd_db ()
&& authz_get_user_attribute (&perm, psd, owner_sid)) && authz_get_user_attribute (&perm, psd, aclsid[idx]))
lacl[0].a_perm = perm; lacl[idx].a_perm = perm;
/* Otherwise we only check the current user. If the user entry /* Otherwise we only check the current user. If the user entry
has a deny ACE, don't check. */ has a deny ACE, don't check. */
else if (lacl[idx].a_id == myself->uid else if (lacl[idx].a_id == myself->uid