httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Terbush <ra...@zyzzyva.com>
Subject Re: Removing AccessConfig and ResourceConfig dependency
Date Mon, 09 Dec 1996 22:01:32 GMT
> Randy Terbush wrote:
> > 
> > Testing the waters with this one....
> > 
> > Seems rather silly that we *require* these directives in the
> > config file. A simple patch below removes the dependency.
> 
> Eh? We don't require them, surely? I've certainly got config files that don't
> have them.

More correctly, if we don't have these default files in our config
directory, we _require_ that the directives are present to point
them in a safe direction. (ie /dev/null)

> This patch would appear to break any site with an srm.conf or access.conf that
> doesn't explicitly name them.
> 
> -1 (unless further explanation persuades me otherwise).

You are correct veto breath. :)

I've included below a revision/replacement. The problem I have with
this is that if someone decides to stop using these relics, but neglects
to remove them from their config directory, Apache will continue to
read them into the configuration soup. I personally prefer my original
solution, but some people may not. :) This change is made to
process_resource_config() and simply returns if the file does not
exist for these to _optional_ files.

*** ../../../official/apache-1.2/apache/src/http_config.c	Thu Dec  5 06:00:56 1996
--- http_config.c	Mon Dec  9 15:46:20 1996
***************
*** 720,727 ****
--- 720,734 ----
      FILE *cfg;
      const char *errmsg;
      cmd_parms parms;
+     struct stat finfo;
      
      fname = server_root_relative (p, fname);
+ 
+     if (!(strcmp(fname, server_root_relative(p, RESOURCE_CONFIG_FILE))) ||
+ 	!(strcmp(fname, server_root_relative(p, ACCESS_CONFIG_FILE)))) {
+ 	if (stat(fname, &finfo) == -1)
+ 	    return;
+     }
      
      /* GCC's initialization extensions are soooo nice here... */
      






Mime
View raw message