git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@682 77e5149b-7576-45b1-b177-96237e5ba77b
Nigel Horne authored on 2004/07/22 02:47:47... | ... |
@@ -1,3 +1,9 @@ |
1 |
+Wed Jul 21 18:46:36 BST 2004 (njh) |
|
2 |
+---------------------------------- |
|
3 |
+ * clamav-milter: Add a note about using sendmail -d0 to see if |
|
4 |
+ sendmail has been built with MILTER support |
|
5 |
+ Add sanity check to clamfi_connect() |
|
6 |
+ |
|
1 | 7 |
Wed Jul 21 16:47:06 BST 2004 (trog) |
2 | 8 |
----------------------------------- |
3 | 9 |
* libclamav/chmunpack.c: use fclose() to flush data |
... | ... |
@@ -64,6 +64,17 @@ INSTALLATION |
64 | 64 |
|
65 | 65 |
Install into /usr/local/sbin/clamav-milter. |
66 | 66 |
|
67 |
+Ensure that your sendmail supports milters by running |
|
68 |
+ /usr/lib/sendmail -d0 < /dev/null | fgrep MILTER |
|
69 |
+or |
|
70 |
+ /usr/sbin/sendmail -d0 < /dev/null | fgrep MILTER |
|
71 |
+ |
|
72 |
+You should see something like: |
|
73 |
+ MATCHGECOS MILTER MIME7TO8 MIME8TO7 NAMED_BIND NETINET NETINET6 |
|
74 |
+It doesn't matter exactly what you see, as long as the word MILTER is printed. |
|
75 |
+ |
|
76 |
+If you see no output you MUST upgrade your sendmail. |
|
77 |
+ |
|
67 | 78 |
See http://www.nmt.edu/~wcolburn/sendmail-8.12.5/libmilter/docs/sample.html |
68 | 79 |
|
69 | 80 |
Installations for RedHat Linux and it's derivatives such as YellowDog: |
... | ... |
@@ -423,6 +434,7 @@ Changes |
423 | 423 |
0.74b 8/7/04 Validate the arguments to inet_ntop |
424 | 424 |
0.74c 14/7/04 Added --dont-wait |
425 | 425 |
Added --advisory |
426 |
+0.74d 18/7/04 Added sanity check in clamfi_connect |
|
426 | 427 |
|
427 | 428 |
BUG REPORTS |
428 | 429 |
|
... | ... |
@@ -26,6 +26,9 @@ |
26 | 26 |
* |
27 | 27 |
* Change History: |
28 | 28 |
* $Log: clamav-milter.c,v $ |
29 |
+ * Revision 1.105 2004/07/21 17:46:06 nigelhorne |
|
30 |
+ * Added note about needing MILTER support in sendmail |
|
31 |
+ * |
|
29 | 32 |
* Revision 1.104 2004/07/14 10:17:05 nigelhorne |
30 | 33 |
* Added dont-wait and advisory options |
31 | 34 |
* |
... | ... |
@@ -323,9 +326,9 @@ |
323 | 323 |
* Revision 1.6 2003/09/28 16:37:23 nigelhorne |
324 | 324 |
* Added -f flag use MaxThreads if --max-children not set |
325 | 325 |
*/ |
326 |
-static char const rcsid[] = "$Id: clamav-milter.c,v 1.104 2004/07/14 10:17:05 nigelhorne Exp $"; |
|
326 |
+static char const rcsid[] = "$Id: clamav-milter.c,v 1.105 2004/07/21 17:46:06 nigelhorne Exp $"; |
|
327 | 327 |
|
328 |
-#define CM_VERSION "0.74c" |
|
328 |
+#define CM_VERSION "0.74d" |
|
329 | 329 |
|
330 | 330 |
/*#define CONFDIR "/usr/local/etc"*/ |
331 | 331 |
|
... | ... |
@@ -1449,6 +1452,11 @@ clamfi_connect(SMFICTX *ctx, char *hostname, _SOCK_ADDR *hostaddr) |
1449 | 1449 |
#endif |
1450 | 1450 |
char *remoteIP; |
1451 | 1451 |
|
1452 |
+ if(ctx == NULL) { |
|
1453 |
+ if(use_syslog) |
|
1454 |
+ syslog(LOG_ERR, "clamfi_connect: ctx is null"); |
|
1455 |
+ return cl_error; |
|
1456 |
+ } |
|
1452 | 1457 |
if(hostname == NULL) { |
1453 | 1458 |
if(use_syslog) |
1454 | 1459 |
syslog(LOG_ERR, "clamfi_connect: hostname is null"); |
... | ... |
@@ -1458,7 +1466,7 @@ clamfi_connect(SMFICTX *ctx, char *hostname, _SOCK_ADDR *hostaddr) |
1458 | 1458 |
/* |
1459 | 1459 |
* According to the sendmail API hostaddr is NULL if |
1460 | 1460 |
* "the type is not supported in the current version". What |
1461 |
- * the documentation doesn't say is the type of what? |
|
1461 |
+ * the documentation doesn't say is the type of what. |
|
1462 | 1462 |
* |
1463 | 1463 |
* Possibly the input is not a TCP/IP socket e.g. stdin? |
1464 | 1464 |
*/ |
... | ... |
@@ -1520,7 +1528,7 @@ clamfi_connect(SMFICTX *ctx, char *hostname, _SOCK_ADDR *hostaddr) |
1520 | 1520 |
return cl_error; |
1521 | 1521 |
} |
1522 | 1522 |
#else |
1523 |
- strncpy(ip, (char *)inet_ntoa(*(struct in_addr *)hp->h_addr), sizeof(ip) - 1); |
|
1523 |
+ strncpy(ip, (char *)inet_ntoa(*(struct in_addr *)hp->h_addr), sizeof(ip)); |
|
1524 | 1524 |
#endif |
1525 | 1525 |
|
1526 | 1526 |
/* |