apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r425621 - /apr/apr/branches/1.2.x/file_io/win32/filestat.c
Date Wed, 26 Jul 2006 04:57:35 GMT
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:   <dqt4a6$b6n$1@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



Mime
View raw message