Fix resolve_symlink() target inode number overflow failure. For LFS builds it can happen that sizeof(ino_t) > sizeof(apr_ino_t). In this case apr_stat() will set APR_FINFO_INODE if and only if the actual inode number fits into an apr_ino_t. If the link's inode number fits but the target's does not, resolve_symlink() was erroneously denying access. We solve this by removing APR_FINFO_INODE from the "wanted" bitmask. --- a/server/request.c +++ b/server/request.c @@ -465,7 +465,7 @@ } } - if (apr_stat(&fi, d, lfi->valid & ~(APR_FINFO_NAME), p) != APR_SUCCESS) { + if (apr_stat(&fi, d, lfi->valid & ~(APR_FINFO_INODE | APR_FINFO_NAME), p) != APR_SUCCESS) { return HTTP_FORBIDDEN; } --- a/modules/generators/mod_autoindex.c +++ b/modules/generators/mod_autoindex.c @@ -2226,7 +2226,8 @@ apr_cpystrn(fullpath + dirpathlen, dirent.name, APR_PATH_MAX - dirpathlen); status = apr_stat(&fi, fullpath, - dirent.valid & ~(APR_FINFO_NAME), r->pool); + dirent.valid & ~(APR_FINFO_INODE | APR_FINFO_NAME), + r->pool); if (status != APR_SUCCESS) { /* Something bad happened, skip this file. */ continue;