You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Dirk.vanGulik" <Di...@jrc.it> on 1996/06/12 18:01:16 UTC
command block distinction
When one allows the same command directove to appear in both the
access.conf file as well as in the srm.conf file, how do you
distingisish them:
i.e. I want to have
{ "Anonymous_LogFile", anon_set_anon_logfile,
NULL,OR_ALL, TAKE1,
"logfile for anonymous 'email/passwords'"
},
by using the
char *anon_set_anon_logfile_1 (cmd_parms *cmd,
anon_auth_config_rec *sec, char *arg)
cmd, sec and arg
in an intelligent way or whatever to work out if
I should store it in sec (for access.conf, or
that I have to work my way to the module config
from the cmd. Or is this a bug and should sec
already point to the module-config as it does
during the access.conf load; would make more
sence to me !
and not:
{ "Anonymous_LogFile_1", anon_set_anon_logfile,
NULL,OR_ALL, TAKE1,
"logfile for anonymous 'email/passwords'"
},
{ "Anonymous_LogFile", anon_set_anon_logfile,
NULL,OR_ALL, TAKE1,
"logfile for anonymous 'email/passwords'"
},
/* handling for access.conf */
char *anon_set_anon_logfile_1 (cmd_parms *cmd,
anon_auth_config_rec *sec, char *arg) {
sec->auth_anon_logfile=arg;
pec->auth_anon_logfile=arg;
return NULL;
}
/* handling for srm.conf */
char *anon_set_anon_logfile_2 (cmd_parms *cmd,
anon_auth_config_rec *sec, char *arg) {
anon_auth_config_rec *pec=
(anon_auth_config_rec *) get_module_config(cmd->server->module_config,&anon_auth_module);
pec->auth_anon_logfile=arg;
return NULL;
}
Thanks !
Dw.
Re: command block distinction
Posted by Alexei Kosut <ak...@organic.com>.
On Wed, 12 Jun 1996, Dirk.vanGulik wrote:
> When one allows the same command directove to appear in both the
> access.conf file as well as in the srm.conf file, how do you
> distingisish them:
[...]
> char *anon_set_anon_logfile_1 (cmd_parms *cmd,
> anon_auth_config_rec *sec, char *arg)
Look at cmd->path. If it's NULL, it's a server config directive. If
cmd->path contains a directory (or location, actually), it's a per-dir
config directive (this includes <Directory>, <Location> and .htaccess
files, if the command applies to them).
At least, I think that'd work.
-- Alexei Kosut <ak...@organic.com>
http://www.nueva.pvt.k12.ca.us/~akosut/