From: William A. Rowe Jr Date: Wed, 24 Apr 2002 04:20:10 +0000 (+0000) Subject: A bug affecting any platform that had pre-lstat'ed the file or directory X-Git-Tag: 2.0.36~104 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e9f0ec41ac0fd2307709ffc8885fb9422e9eb4ac;p=apache A bug affecting any platform that had pre-lstat'ed the file or directory 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 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94778 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/request.c b/server/request.c index f39bcb9f43..271b6d57aa 100644 --- a/server/request.c +++ b/server/request.c @@ -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; }