Browse code

Bug 347

git-svn: trunk@2853

Nigel Horne authored on 2007/02/24 06:19:11
Showing 2 changed files
... ...
@@ -1,3 +1,8 @@
1
+Fri Feb 23 19:22:43 GMT 2007 (njh)
2
+----------------------------------
3
+  * clamav-milter/clamav-milter.c:	Fix compilation error on Solaris
4
+			(bug 347)
5
+
1 6
 Fri Feb 23 18:19:43 CET 2007 (tk)
2 7
 ---------------------------------
3 8
   * clamd/scanner.c: fix compilation error on Solaris (bb#341)
... ...
@@ -32,7 +37,7 @@ Thu Feb 22 16:51:33 CET 2007 (tk)
32 32
 Thu Feb 22 15:32:33 GMT 2007 (njh)
33 33
 ----------------------------------
34 34
   * libclamav:	s/sanitiseFilename/cli_sanitise_filename/, patch from trog
35
-  		Changed some strdup to cli_strdup
35
+		Changed some strdup to cli_strdup
36 36
 
37 37
 Thu Feb 22 15:43:33 CET 2007 (acab)
38 38
 -----------------------------------
... ...
@@ -33,7 +33,7 @@
33 33
  */
34 34
 static	char	const	rcsid[] = "$Id: clamav-milter.c,v 1.312 2007/02/12 22:24:21 njh Exp $";
35 35
 
36
-#define	CM_VERSION	"devel-220207"
36
+#define	CM_VERSION	"devel-230207"
37 37
 
38 38
 #if HAVE_CONFIG_H
39 39
 #include "clamav-config.h"
... ...
@@ -124,19 +124,19 @@ static	char	const	rcsid[] = "$Id: clamav-milter.c,v 1.312 2007/02/12 22:24:21 nj
124 124
 
125 125
 #endif
126 126
 
127
+#ifdef	USE_SYSLOG
128
+#include <syslog.h>
129
+#endif
130
+
127 131
 #ifdef	WITH_TCPWRAP
128 132
 #if	HAVE_TCPD_H
129 133
 #include <tcpd.h>
130 134
 #endif
131 135
 
132
-#ifdef	USE_SYSLOG
133
-#include <syslog.h>
134 136
 int	allow_severity = LOG_DEBUG;
135 137
 int	deny_severity = LOG_NOTICE;
136 138
 #endif
137 139
 
138
-#endif
139
-
140 140
 #ifndef	CL_DEBUG
141 141
 static	const	char	*logFile;
142 142
 static	char	console[] = "/dev/console";
... ...
@@ -1261,7 +1261,9 @@ main(int argc, char **argv)
1261 1261
 	}
1262 1262
 
1263 1263
 	if(((cpt = cfgopt(copt, "LogSyslog")) != NULL) && cpt->enabled) {
1264
+#if defined(USE_SYSLOG) && !defined(C_AIX)
1264 1265
 		int fac = LOG_LOCAL6;
1266
+#endif
1265 1267
 
1266 1268
 		if(cfgopt(copt, "LogVerbose")->enabled) {
1267 1269
 			logg_verbose = 1;
... ...
@@ -1274,7 +1276,6 @@ main(int argc, char **argv)
1274 1274
 		}
1275 1275
 #if defined(USE_SYSLOG) && !defined(C_AIX)
1276 1276
 		logg_syslog = 1;
1277
-#endif
1278 1277
 
1279 1278
 		if(((cpt = cfgopt(copt, "LogFacility")) != NULL) && cpt->enabled)
1280 1279
 			if((fac = logg_facility(cpt->strarg)) == -1) {
... ...
@@ -1283,6 +1284,7 @@ main(int argc, char **argv)
1283 1283
 				return EX_CONFIG;
1284 1284
 			}
1285 1285
 		openlog(progname, LOG_CONS|LOG_PID, fac);
1286
+#endif
1286 1287
 	} else {
1287 1288
 		if(qflag)
1288 1289
 			fprintf(stderr, _("%s: (-q && !LogSyslog): warning - all interception message methods are off\n"),
... ...
@@ -1536,9 +1538,7 @@ main(int argc, char **argv)
1536 1536
 			cli_errmsg(_("Check your entry for TCPSocket in %s\n"),
1537 1537
 				cfgfile);
1538 1538
 			logg(_("!Can't find any clamd server"));
1539
-#ifdef USE_SYSLOG
1540
-			closelog();
1541
-#endif
1539
+			logg_close();
1542 1540
 			return EX_CONFIG;
1543 1541
 		}
1544 1542
 #endif