You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Mladen Turk <mt...@apache.org> on 2004/08/27 21:37:16 UTC
[PATCH] WIN32 Fix apr_stat obtaing protection info
Hi,
apr_stat fails obtaining protection cause APR_READCONTROL flag set
on apr_file_open inside apr_stat is never used.
The READ_CONTROL is needed cause GetSecurityInfo returns
Access is denied otherwise.
Tested both on files and dirs, and... one break less in testall :)
Index: open.c
===================================================================
RCS file: /home/cvspublic/apr/file_io/win32/open.c,v
retrieving revision 1.121
diff -u -r1.121 open.c
--- open.c 13 Feb 2004 09:38:27 -0000 1.121
+++ open.c 27 Aug 2004 19:25:47 -0000
@@ -324,6 +324,8 @@
else {
return APR_EACCES;
}
+ if (flag & APR_READCONTROL)
+ oflags |= READ_CONTROL;
}
if (flag & APR_XTHREAD) {
Regards,
MT.
Re: [PATCH] WIN32 Fix apr_stat obtaing protection info
Posted by Mladen Turk <mt...@apache.org>.
Bill Stoddard wrote:
>> apr_stat fails obtaining protection cause APR_READCONTROL flag set
>
> Just out of curiosity, does this change affect performance serving
> static files in any measureable way?
>
I think it doesn't, cause as currently implemented the GetSecurityInfo
is called, but fails on any file, and then another function is called
(guess_protection_bits) to simulate the request.
So actually it should be faster, cause you have one function call less.
Regards,
MT.
Re: [PATCH] WIN32 Fix apr_stat obtaing protection info
Posted by Bill Stoddard <bi...@wstoddard.com>.
Mladen Turk wrote:
> Hi,
>
> apr_stat fails obtaining protection cause APR_READCONTROL flag set
> on apr_file_open inside apr_stat is never used.
> The READ_CONTROL is needed cause GetSecurityInfo returns
> Access is denied otherwise.
>
> Tested both on files and dirs, and... one break less in testall :)
>
>
> Index: open.c
> ===================================================================
> RCS file: /home/cvspublic/apr/file_io/win32/open.c,v
> retrieving revision 1.121
> diff -u -r1.121 open.c
> --- open.c 13 Feb 2004 09:38:27 -0000 1.121
> +++ open.c 27 Aug 2004 19:25:47 -0000
> @@ -324,6 +324,8 @@
> else {
> return APR_EACCES;
> }
> + if (flag & APR_READCONTROL)
> + oflags |= READ_CONTROL;
> }
>
> if (flag & APR_XTHREAD) {
>
>
> Regards,
> MT.
>
Just out of curiosity, does this change affect performance serving static files in any measureable way?
Bill