[PATCH] Fix access("/proc/registry/HKEY_PERFORMANCE_DATA", R_OK)

Christian Franke Christian.Franke@t-online.de
Fri May 6 17:28:00 GMT 2011


Corinna Vinschen wrote:
> On May  5 23:08, Christian Franke wrote:
>    
>>
>> No check in rights, sorry :-)
>>      
> http://sourceware.org/cgi-bin/pdw/ps_form.cgi, project Cygwin, approver me.
>
>    

Done - Thanks!


> However, I just had another look into your patch and I have a problem
> here.  On what system and with what type of user account did you test?
>
> Here's what I get on Windows 2008 and W7:
>
> $ ~/tests/access /proc/registry/HKEY_PERFORMANCE_DATA
> access (/proc/registry/HKEY_PERFORMANCE_DATA, F_OK) = 0
> access (/proc/registry/HKEY_PERFORMANCE_DATA, R_OK) = -1<Permission denied>
> access (/proc/registry/HKEY_PERFORMANCE_DATA, W_OK) = -1<Read-only file system>
> access (/proc/registry/HKEY_PERFORMANCE_DATA, X_OK) = -1<Bad file descriptor>
>
>    

Hmm....

> The result is the same on W7 and 2008.  I tried with a normal user
> account, as well as with an admin account, with full rights as well as
> UAC-restricted.
>
>
>    

Couldn't test new code in Win7 yet.

Test results:

Current code on XP SP3 and cygwin-5.7.9-1 on WIn7:

access("/proc/registry/HKEY_PERFORMANCE_DATA", F_OK)=0
access("/proc/registry/HKEY_PERFORMANCE_DATA", R_OK)=-1 <Bad file 
descriptor>
access("/proc/registry/HKEY_PERFORMANCE_DATA", W_OK)=-1 <Read-only file 
system>
access("/proc/registry/HKEY_PERFORMANCE_DATA", X_OK)=-1 <Bad file 
descriptor>

Current code + patch on XP

access("/proc/registry/HKEY_PERFORMANCE_DATA", F_OK)=0
access("/proc/registry/HKEY_PERFORMANCE_DATA", R_OK)=0
access("/proc/registry/HKEY_PERFORMANCE_DATA", W_OK)=-1 <Read-only file 
system>
access("/proc/registry/HKEY_PERFORMANCE_DATA", X_OK)=0

Admin rights make no difference.

Christian



More information about the Cygwin-patches mailing list