Commit ce826560 authored by Ruediger Pluem's avatar Ruediger Pluem
Browse files

* If APR_FINFO_NAME is added to the list of wanted information, apr_stat

  always returns APR_INCOMPLETE on Unix platforms in the case that the
  call to the native stat / lstat did not fail. So we can safely assume
  that the stat / lstat call has been successful in this case.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@491297 13f79535-47bb-0310-9956-ffa450edef68
parent 5c2a5862
Loading
Loading
Loading
Loading
+8 −1
Changes for server/request.c: 8 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -556,7 +556,14 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r)
                rv = apr_stat(&thisinfo, r->filename,
                              APR_FINFO_MIN | APR_FINFO_NAME | APR_FINFO_LINK,
                              r->pool);
                if (rv != APR_SUCCESS) {
                /*
                 * APR_INCOMPLETE is as fine as result as APR_SUCCESS as we
                 * have added APR_FINFO_NAME to the wanted parameter of
                 * apr_stat above. On Unix platforms this means that apr_stat
                 * is always going to return APR_INCOMPLETE in the case that
                 * the call to the native stat / lstat did not fail.
                 */
                if ((rv != APR_INCOMPLETE) && (rv != APR_SUCCESS)) {
                    /*
                     * This should never happen, because we did a stat on the
                     * same file, resolving a possible symlink several lines