Is there a way to change the default location of the tclhttpd.default
file without modifying the code in auth.tcl?
I tried doing something like the following in tclhttd.rc:
Config AuthDefaultFile [file normalize [file join ~ tmp tclhttpd.default]]
The problem is that the global Config array is not updated with
parameters from tclhttpd.rc via config::init, only config::config seems
to be updated.
Setting any of AuthUserFile, AuthGroupFile or AuthDefaultFile has no
effect on the following tests in auth.tcl:
# set default user/group files
if {![info exists Config(AuthUserFile)]} {
set Config(AuthUserFile) default
}
if {![info exists Config(AuthGroupFile)]} {
set Config(AuthGroupFile) default
}
if {![info exists Config(AuthDefaultFile)]} {
set Config(AuthDefaultFile) /tmp/tclhttpd.default
}
I was able to get this to work by adding the following line to
config::init:
array set TheirConfig [interp eval $i {array get Config}]
This updates ::Config which causes auth.tcl to use the values I've set
in tclhttpd.rc. Is this a bug/feature or is there something else I've
missed which causes this not to work as expected?
Thanks,
Wayne
|