Hi.
SquidGuard 1.2.0 displays an error when reconstructing the configuration
(squidGuard -C all).
It warns that it cannot log to /var/log/squidGuard/log/squidGuard.log
(non existant directory on my site) although there is the appropriate
logdir directive int its squidGuard.conf file (logdir /var/log/squid).
I've looked in the sources and made some tests.
Looks like it tries to stat the log file before having read the conf
file, and then defined any custom logdir directive.
I'm suggesting the following patch be applied to the code, so that it
first sets the log files locations, and after that only, tries to write
to the log file.
This seemed to work for me, but I'm not sure why it was written that
way, and I may miss some important point...
Anyway, if no logdir directive was set, maybe it would be wiser to write
on stdout/stderr than to some compile-time defined location ?
Any comments ?
Best regards,
--
Olivier BERGER <[EMAIL PROTECTED]>
Ing�nieur Recherche - Dept INF
INT Evry (http://www.int-evry.fr)
OpenPGP-Id: 1024D/6B829EEC
--- /inf/sysrep/olberger/squidGuard-1.2.0-4mdk/squidGuard-1.2.0/src/main.c Thu
Jun 14 08:56:54 2001
+++ src/main.c Fri Apr 5 12:46:38 2002
@@ -131,7 +131,6 @@
}
globalArgv = argv;
globalEnvp = envp;
- sgSetGlobalErrorLogFile();
sgReadConfig(configFile);
sgSetGlobalErrorLogFile();
sgLogError("squidGuard %s started (%d.%03d)",