httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: Bug 31126: Reiser4
Date Thu, 09 Sep 2004 17:48:29 GMT
At 11:12 AM 9/9/2004, Rici Lake wrote:

>>EACCES is just the wrong error, because it has different semantics.
>
>I tend to agree, but it's not totally clear. Reiser4's files can also function as directories,
so ENOTDIR is incorrect. ENOENT seems like a reasonable choice, but POSIX also mandates the
return of EACCES instead of ENOENT if search permissions are not present. I don't know enough
about the Reiser filesystem to know how one specifies search permissions on a file which can
also be a directory.
>
>>>It is worth noting that in the particular circumstances which give rise
>>>to this error, ap_directory_walk could tell if the path refers to a
>>>directory or a file; it should be possible to avoid walking too far,
>>>although there may well be edge cases I haven't thought of.
>
>>-> Race condition.
>
>What about just changing line 930 of server/request.c from
>
>           if (r->finfo.filetype
>to
>
>           if (r->finfo.filetype && *r->path_info
>
>All that will do is not optimise on the last segment; I don't see how not performing the
optimization could create a race condition that didn't already exist.

You miss a case with this patch...

Consider a request for /content/foo/index.php/extra-path-info

The path doesn't end where you think it does, and directory walk
would usually handle this case.  Perhaps a patch to perform an
extra sanity check on EACCES results is a better fix, at least
introduced by a compile-time flag?

Bill



Mime
View raw message