git-svn: trunk@493
Nigel Horne authored on 2004/04/15 18:54:32... | ... |
@@ -1,3 +1,7 @@ |
1 |
+Thu Apr 15 10:54:02 BST 2004 (njh) |
|
2 |
+---------------------------------- |
|
3 |
+ * clamav-milter: Handle systems without inet_ntop() |
|
4 |
+ |
|
1 | 5 |
Thu Apr 15 00:51:29 CEST 2004 (tk) |
2 | 6 |
---------------------------------- |
3 | 7 |
* libclamav: cli_scanmail: fix a hole in recursion limit (patch by |
... | ... |
@@ -243,7 +243,7 @@ |
243 | 243 |
* 0.66n 13/2/04 Added TCPwrappers support |
244 | 244 |
* Removed duplication in version string |
245 | 245 |
* Handle machines that don't have in_port_t |
246 |
- * 0. |
|
246 |
+ * 0.67 16/2/04 Upissued to 0.67 |
|
247 | 247 |
* 0.67a 16/2/04 Added clamfi_free |
248 | 248 |
* 0.67b 17/2/04 Removed compilation warning - now compiles on FreeBSD5.2 |
249 | 249 |
* Don't allow --force to overwride TCPwrappers |
... | ... |
@@ -317,9 +317,13 @@ |
317 | 317 |
* 0.70h 8/4/04 Cleanup StreamMaxLength code |
318 | 318 |
* 0.70i 9/4/04 Handle clamd giving up on StreamMaxLength before |
319 | 319 |
* clamav-milter |
320 |
+ * 0.70j 15/4/04 Handle systems without inet_ntop |
|
320 | 321 |
* |
321 | 322 |
* Change History: |
322 | 323 |
* $Log: clamav-milter.c,v $ |
324 |
+ * Revision 1.73 2004/04/15 09:53:25 nigelhorne |
|
325 |
+ * Handle systems without inet_ntop |
|
326 |
+ * |
|
323 | 327 |
* Revision 1.72 2004/04/09 08:36:53 nigelhorne |
324 | 328 |
* Handle clamd giving up on StreamMaxLength before clamav-milter |
325 | 329 |
* |
... | ... |
@@ -521,9 +525,9 @@ |
521 | 521 |
* Revision 1.6 2003/09/28 16:37:23 nigelhorne |
522 | 522 |
* Added -f flag use MaxThreads if --max-children not set |
523 | 523 |
*/ |
524 |
-static char const rcsid[] = "$Id: clamav-milter.c,v 1.72 2004/04/09 08:36:53 nigelhorne Exp $"; |
|
524 |
+static char const rcsid[] = "$Id: clamav-milter.c,v 1.73 2004/04/15 09:53:25 nigelhorne Exp $"; |
|
525 | 525 |
|
526 |
-#define CM_VERSION "0.70i" |
|
526 |
+#define CM_VERSION "0.70j" |
|
527 | 527 |
|
528 | 528 |
/*#define CONFDIR "/usr/local/etc"*/ |
529 | 529 |
|
... | ... |
@@ -1504,7 +1508,9 @@ findServer(void) |
1504 | 1504 |
static sfsistat |
1505 | 1505 |
clamfi_connect(SMFICTX *ctx, char *hostname, _SOCK_ADDR *hostaddr) |
1506 | 1506 |
{ |
1507 |
+#if defined(HAVE_INET_NTOP) || defined(WITH_TCPWRAP) |
|
1507 | 1508 |
char ip[INET_ADDRSTRLEN]; /* IPv4 only */ |
1509 |
+#endif |
|
1508 | 1510 |
char *remoteIP; |
1509 | 1511 |
|
1510 | 1512 |
if(hostname == NULL) { |
... | ... |
@@ -1518,7 +1524,11 @@ clamfi_connect(SMFICTX *ctx, char *hostname, _SOCK_ADDR *hostaddr) |
1518 | 1518 |
return cl_error; |
1519 | 1519 |
} |
1520 | 1520 |
|
1521 |
+#ifdef HAVE_INET_NTOP |
|
1521 | 1522 |
remoteIP = (char *)inet_ntop(AF_INET, &((struct sockaddr_in *)(hostaddr))->sin_addr, ip, sizeof(ip)); |
1523 |
+#else |
|
1524 |
+ remoteIP = inet_ntoa(((struct sockaddr_in *)(hostaddr))->sin_addr); |
|
1525 |
+#endif |
|
1522 | 1526 |
|
1523 | 1527 |
if(remoteIP == NULL) { |
1524 | 1528 |
if(use_syslog) |
... | ... |
@@ -1557,6 +1567,7 @@ clamfi_connect(SMFICTX *ctx, char *hostname, _SOCK_ADDR *hostaddr) |
1557 | 1557 |
return SMFIS_TEMPFAIL; |
1558 | 1558 |
} |
1559 | 1559 |
|
1560 |
+ /* inet_ntop? */ |
|
1560 | 1561 |
strcpy(ip, (char *)inet_ntoa(*(struct in_addr *)hp->h_addr)); |
1561 | 1562 |
|
1562 | 1563 |
/* |