diff options
author | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2006-07-26 04:57:34 +0000 |
---|---|---|
committer | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2006-07-26 04:57:34 +0000 |
commit | ab6ae88dbcf42e6d6d8fe8696fa37b82abb23b2a (patch) | |
tree | 6e5446f43f586229a2b44611295c66eb86b9003c | |
parent | 0ac5d1333d07371d6d59681f1d3b1de27f786769 (diff) | |
download | libapr-ab6ae88dbcf42e6d6d8fe8696fa37b82abb23b2a.tar.gz |
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: <dqt4a6$b6n$1@sea.gmane.org>
Reviewed by: wrowe, D.J. Heap <djheap gmail.com>
Backports: 425620
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.2.x@425621 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | file_io/win32/filestat.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/file_io/win32/filestat.c b/file_io/win32/filestat.c index 8419bb89f..d5618da21 100644 --- a/file_io/win32/filestat.c +++ b/file_io/win32/filestat.c @@ -242,8 +242,8 @@ apr_status_t more_finfo(apr_finfo_t *finfo, const void *ufile, } 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 @@ apr_status_t more_finfo(apr_finfo_t *finfo, const void *ufile, 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 |