You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rodent of Unusual Size <co...@decus.org> on 1997/01/10 19:36:28 UTC
Patch for bug #16
In the interest of closing up some open bugs before 1.2 goes final,
here's a patch to fix bug #16 ("mod_dir does not log reason when
access FORBIDDEN") from Oct 1996. I probably can't make any
contribution yet to the serious Apache internals, but I can at least
do this and save someone else some time.. ;-> I don't see a fix for
this in last night's repository dump, so I'm assuming it's still
open.
I'll see if there are any other minor bugs like this with which I
can help.
#ken :-)}
Index: mod_dir.c
===================================================================
RCS file: /usr/users/coar/myApache/repository/apache/src/mod_dir.c,v
retrieving revision 1.18
diff -c -r1.18 mod_dir.c
*** 1.18 1997/01/01 18:10:31
--- mod_dir.c 1997/01/10 18:34:39
***************
*** 693,699 ****
char *tmp;
int dir_opts = find_opts(dir_conf, r);
! if(!(d=opendir(name))) return FORBIDDEN;
r->content_type = "text/html";
--- 693,702 ----
char *tmp;
int dir_opts = find_opts(dir_conf, r);
! if(!(d=opendir(name))) {
! log_reason ("Can't open directory for index", r->filename, r);
! return FORBIDDEN;
! }
r->content_type = "text/html";
***************
*** 833,840 ****
if (allow_opts & OPT_INDEXES)
return index_directory (r, d);
! else
return FORBIDDEN;
}
--- 836,845 ----
if (allow_opts & OPT_INDEXES)
return index_directory (r, d);
! else {
! log_reason ("Directory index forbidden by rule", r->filename, r);
return FORBIDDEN;
+ }
}
Re: Patch for bug #16
Posted by Rob Hartill <ro...@imdb.com>.
+1
On Fri, 10 Jan 1997, Rodent of Unusual Size wrote:
> In the interest of closing up some open bugs before 1.2 goes final,
> here's a patch to fix bug #16 ("mod_dir does not log reason when
> access FORBIDDEN") from Oct 1996. I probably can't make any
> contribution yet to the serious Apache internals, but I can at least
> do this and save someone else some time.. ;-> I don't see a fix for
> this in last night's repository dump, so I'm assuming it's still
> open.
>
> I'll see if there are any other minor bugs like this with which I
> can help.
>
> #ken :-)}
>
> Index: mod_dir.c
> ===================================================================
> RCS file: /usr/users/coar/myApache/repository/apache/src/mod_dir.c,v
> retrieving revision 1.18
> diff -c -r1.18 mod_dir.c
> *** 1.18 1997/01/01 18:10:31
> --- mod_dir.c 1997/01/10 18:34:39
> ***************
> *** 693,699 ****
> char *tmp;
> int dir_opts = find_opts(dir_conf, r);
>
> ! if(!(d=opendir(name))) return FORBIDDEN;
>
> r->content_type = "text/html";
>
> --- 693,702 ----
> char *tmp;
> int dir_opts = find_opts(dir_conf, r);
>
> ! if(!(d=opendir(name))) {
> ! log_reason ("Can't open directory for index", r->filename, r);
> ! return FORBIDDEN;
> ! }
>
> r->content_type = "text/html";
>
> ***************
> *** 833,840 ****
>
> if (allow_opts & OPT_INDEXES)
> return index_directory (r, d);
> ! else
> return FORBIDDEN;
> }
>
>
> --- 836,845 ----
>
> if (allow_opts & OPT_INDEXES)
> return index_directory (r, d);
> ! else {
> ! log_reason ("Directory index forbidden by rule", r->filename, r);
> return FORBIDDEN;
> + }
> }
>
>
>