git-svn: trunk@4222
aCaB authored on 2008/10/03 22:36:54... | ... |
@@ -1,3 +1,10 @@ |
1 |
+Fri Oct 3 15:49:17 CEST 2008 (acab) |
|
2 |
+------------------------------------ |
|
3 |
+ * clamav-milter/clamav-milter.c: reopen log files on USR1 instead of HUP |
|
4 |
+ - bb#1194. Note that this is an interim solution, as the milter should not |
|
5 |
+ abuse other daemons' logfiles. This also doesn't need a fair amount of |
|
6 |
+ documentantion as this feature never worked before. |
|
7 |
+ |
|
1 | 8 |
Wed Oct 1 19:11:30 CEST 2008 (acab) |
2 | 9 |
------------------------------------ |
3 | 10 |
* clamav-milter/clamav-milter.c: fix error path segfault |
... | ... |
@@ -571,7 +571,7 @@ static pthread_mutex_t blacklist_mutex = PTHREAD_MUTEX_INITIALIZER; |
571 | 571 |
#endif |
572 | 572 |
|
573 | 573 |
static void sigsegv(int sig); |
574 |
-static void sighup(int sig); |
|
574 |
+static void sigusr1(int sig); |
|
575 | 575 |
static void sigusr2(int sig); |
576 | 576 |
|
577 | 577 |
#ifdef HAVE_BACKTRACE |
... | ... |
@@ -2188,7 +2188,7 @@ main(int argc, char **argv) |
2188 | 2188 |
|
2189 | 2189 |
(void)signal(SIGSEGV, sigsegv); |
2190 | 2190 |
if(!logg_foreground) |
2191 |
- (void)signal(SIGHUP, sighup); |
|
2191 |
+ (void)signal(SIGUSR1, sigusr1); |
|
2192 | 2192 |
if(!external) |
2193 | 2193 |
(void)signal(SIGUSR2, sigusr2); |
2194 | 2194 |
|
... | ... |
@@ -5976,15 +5976,15 @@ sigsegv(int sig) |
5976 | 5976 |
|
5977 | 5977 |
extern FILE *logg_fd; |
5978 | 5978 |
static void |
5979 |
-sighup(int sig) |
|
5979 |
+sigusr1(int sig) |
|
5980 | 5980 |
{ |
5981 | 5981 |
|
5982 |
- signal(SIGHUP, sighup); |
|
5982 |
+ signal(SIGUSR1, sigusr1); |
|
5983 | 5983 |
|
5984 | 5984 |
if(!(cfgopt(copt, "LogFile"))->enabled) |
5985 | 5985 |
return; |
5986 | 5986 |
|
5987 |
- logg("SIGHUP caught: re-opening log file\n"); |
|
5987 |
+ logg("SIGUSR1 caught: re-opening log file\n"); |
|
5988 | 5988 |
logg_close(); |
5989 | 5989 |
logg("*Log file re-opened\n"); |
5990 | 5990 |
dup2(fileno(logg_fd), 2); |