You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Cliff Skolnick <cl...@organic.com> on 1996/05/17 21:04:17 UTC
WWW Form Bug Report: "autmounter complains about /home/.htaccess" on Solaris 2.x (fwd)
no ack sent
--
Cliff Skolnick cliff@organic.com
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." -- Benjamin Franklin, 1759
---------- Forwarded message ----------
Date: Wed May 15 8:38:23 1996
From: appro@fy.chalmers.se
To: cliff@organic.com
Subject: WWW Form Bug Report: "autmounter complains about /home/.htaccess" on Solaris 2.x
Submitter: appro@fy.chalmers.se
Operating system: Solaris 2.x, version: 5.5
Version of Apache Used: 1.1b2
Extra Modules used:
URL exhibiting problem:
Symptoms:
--
Hi! Me again...
Bug old as NCSA server... Server checks for
.htaccess files starting from / thus performing
a lot of redundant lstat() calls, hitting non
existing automounter mount points, refusing to
follow symbolic links below document root.
Below is a patch that fixes the problem.
*** http_request.c.orig Wed Apr 10 03:00:17 1996
--- http_request.c Thu May 9 11:09:28 1996
***************
*** 262,270 ****
num_dirs = count_dirs(test_filename);
get_path_info (r);
! if (S_ISDIR (r->finfo.st_mode)) ++num_dirs;
! for (i = 1; i <= num_dirs; ++i) {
core_dir_config *core_dir =
(core_dir_config *)get_module_config(per_dir_defaults, &core_module);
int allowed_here = core_dir->opts;
--- 262,286 ----
num_dirs = count_dirs(test_filename);
get_path_info (r);
! if (S_ISDIR (r->finfo.st_mode)
! && test_filename [strlen(test_filename)-1] != '/')
! ++num_dirs;
! { char *uri_end,*filename_end,c;
! uri_end = r->uri + strlen(r->uri);
! filename_end = test_filename + strlen(test_filename);
! while (*filename_end == *uri_end
! && filename_end != test_filename
! && uri_end != r->uri)
! filename_end--, uri_end--;
! while (*filename_end && *filename_end != '/') filename_end++;
! c = *filename_end;
! *filename_end = '\0';
! i = count_dirs(test_filename)+1;
! *filename_end = c;
! }
!
! for (; i <= num_dirs; ++i) {
core_dir_config *core_dir =
(core_dir_config *)get_module_config(per_dir_defaults, &core_module);
int allowed_here = core_dir->opts;
Idea is to match tails of uri and filename and
strip matching part off filename in order to obtain
document root for given uri.
Andy.
--
Backtrace:
--
--