You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2006/07/26 06:57:35 UTC
svn commit: r425621 - /apr/apr/branches/1.2.x/file_io/win32/filestat.c
Author: wrowe
Date: Tue Jul 25 21:57:34 2006
New Revision: 425621
URL: http://svn.apache.org/viewvc?rev=425621&view=rev
Log:
With this patch, the finfo.protection includes the rights for the current
user, and the rights for his/her primary group (plus world/Everyone), when
requested by the wanted bits of either user/group id, or user/group prot.
Submitted by: Andreas Magnusson <andreas.ch.magnusson home.se>
Message-ID: <dq...@sea.gmane.org>
Reviewed by: wrowe, D.J. Heap <djheap gmail.com>
Backports: 425620
Modified:
apr/apr/branches/1.2.x/file_io/win32/filestat.c
Modified: apr/apr/branches/1.2.x/file_io/win32/filestat.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/file_io/win32/filestat.c?rev=425621&r1=425620&r2=425621&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/file_io/win32/filestat.c (original)
+++ apr/apr/branches/1.2.x/file_io/win32/filestat.c Tue Jul 25 21:57:34 2006
@@ -242,8 +242,8 @@
}
rv = GetNamedSecurityInfoW(wfile + fix,
SE_FILE_OBJECT, sinf,
- ((wanted & APR_FINFO_USER) ? &user : NULL),
- ((wanted & APR_FINFO_GROUP) ? &grp : NULL),
+ ((wanted & (APR_FINFO_USER | APR_FINFO_UPROT)) ? &user : NULL),
+ ((wanted & (APR_FINFO_GROUP | APR_FINFO_GPROT)) ? &grp : NULL),
((wanted & APR_FINFO_PROT) ? &dacl : NULL),
NULL, &pdesc);
if (fix == 6)
@@ -252,15 +252,15 @@
else if (whatfile == MORE_OF_FSPEC)
rv = GetNamedSecurityInfoA((char*)ufile,
SE_FILE_OBJECT, sinf,
- ((wanted & APR_FINFO_USER) ? &user : NULL),
- ((wanted & APR_FINFO_GROUP) ? &grp : NULL),
+ ((wanted & (APR_FINFO_USER | APR_FINFO_UPROT)) ? &user : NULL),
+ ((wanted & (APR_FINFO_GROUP | APR_FINFO_GPROT)) ? &grp : NULL),
((wanted & APR_FINFO_PROT) ? &dacl : NULL),
NULL, &pdesc);
else if (whatfile == MORE_OF_HANDLE)
rv = GetSecurityInfo((HANDLE)ufile,
SE_FILE_OBJECT, sinf,
- ((wanted & APR_FINFO_USER) ? &user : NULL),
- ((wanted & APR_FINFO_GROUP) ? &grp : NULL),
+ ((wanted & (APR_FINFO_USER | APR_FINFO_UPROT)) ? &user : NULL),
+ ((wanted & (APR_FINFO_GROUP | APR_FINFO_GPROT)) ? &grp : NULL),
((wanted & APR_FINFO_PROT) ? &dacl : NULL),
NULL, &pdesc);
else