Browse Source

- fix logging of the path when using stat_cache debugging.

- always run symlink checks as it breaks otherwise

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.11-ssl-fixes@1326 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.12
Marcus Rückert 16 years ago
parent
commit
a57bb8202e
  1. 11
      src/stat_cache.c

11
src/stat_cache.c

@ -527,7 +527,15 @@ handler_t stat_cache_get_entry(server *srv, connection *con, buffer *name, stat_
* */
#ifdef HAVE_LSTAT
sce->is_symlink = 0;
if (!con->conf.follow_symlink) {
/*
* normally we want to only check for symlinks if we should block
* symlinks. for some weird reason it doesnt check for symlinks at all
* in some cases. so we disable it for now.
* this can have a little performance slow down.
*
* if (!con->conf.follow_symlink) {
*/
if (1) {
if (stat_cache_lstat(srv, name, &lst) == 0) {
#ifdef DEBUG_STAT_CACHE
log_error_write(srv, __FILE__, __LINE__, "sb",
@ -549,6 +557,7 @@ handler_t stat_cache_get_entry(server *srv, connection *con, buffer *name, stat_
while ((s_cur = strrchr(dname->ptr,'/'))) {
*s_cur = '\0';
dname->used = s_cur - dname->ptr + 1;
if (dname->ptr == s_cur) {
#ifdef DEBUG_STAT_CACHE
log_error_write(srv, __FILE__, __LINE__, "s", "reached /");

Loading…
Cancel
Save