]> granicus.if.org Git - apache/commitdiff
A bug affecting any platform that had pre-lstat'ed the file or directory
authorWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 24 Apr 2002 04:20:10 +0000 (04:20 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 24 Apr 2002 04:20:10 +0000 (04:20 +0000)
  in question.  We neglected to clear the FINFO_LINK bit that told us this
  was lstat()ed, but also causes stat() to follow an lstat() approach.
  This is part 2 of 2 to correct the NTFS Junction (symlink) bug.

  Bugz report 8014, identified by Sam Morris <sam@netcity.co.uk>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94778 13f79535-47bb-0310-9956-ffa450edef68

server/request.c

index f39bcb9f43572b38347a065ecf0286cb9c71a072..271b6d57aad8f8b3634bc16c80ba93b0bc3646fd 100644 (file)
@@ -405,8 +405,9 @@ static int resolve_symlink(char *d, apr_finfo_t *lfi, int opts, apr_pool_t *p)
     savename = (lfi->valid & APR_FINFO_NAME) ? lfi->name : NULL;
 
     if (opts & OPT_SYM_LINKS) {
-        if ((res = apr_stat(&fi, d, lfi->valid & ~(APR_FINFO_NAME),
-                            p)) != APR_SUCCESS) {
+        if ((res = apr_stat(&fi, d, lfi->valid & ~(APR_FINFO_NAME 
+                                                 | APR_FINFO_LINK), p)) 
+                 != APR_SUCCESS) {
             return HTTP_FORBIDDEN;
         }