In clamdscan/client.c this was changed in 0.75:
@@ -129,6 +131,15 @@ server.sin_family = AF_INET; server.sin_port = htons(port);
+ peer_size = sizeof(peer);
+ if(getpeername(sockd, (struct sockaddr *) &peer, &peer_size) < 0) {
+ perror("getpeername()");
+ mprintf("@Can't get socket peer name.\n");
+ return -1;
+ }
+
+ server.sin_addr.s_addr = peer.sin_addr.s_addr;
+
if(connect(wsockd, (struct sockaddr *) &server, sizeof(struct sockaddr_in)) < 0) {
close(wsockd);
perror("connect()");
If I do an strace, this happens here:
$ strace clamdscan - < filetotest
...
write(3, "STREAM", 6) = 6
read(3, "PORT 10005\n", 4096) = 11
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 4
getpeername(3, {sin_family=AF_UNIX, path="/tmp/clamd"}, [13]) = 0
connect(4, {sin_family=AF_INET, sin_port=htons(10005), sin_addr=inet_addr("109.112.47.99")}}, 16)
The program tries to getpeername() to get the ip-number of the remote site, but this happens to be a AF_UNIX socket, not a AF_INET socket! Result: garbage in the s_addr field...
Symptoms, clamdscan just waits until timeout on the (hopefully) not answering host.
-- Paul Bijnens, Xplanation Tel +32 16 397.511 Technologielaan 21 bus 2, B-3001 Leuven, BELGIUM Fax +32 16 397.512 http://www.xplanation.com/ email: [EMAIL PROTECTED] *********************************************************************** * I think I've got the hang of it now: exit, ^D, ^C, ^\, ^Z, ^Q, F6, * * quit, ZZ, :q, :q!, M-Z, ^X^C, logoff, logout, close, bye, /bye, * * stop, end, F3, ~., ^]c, +++ ATH, disconnect, halt, abort, hangup, * * PF4, F20, ^X^X, :D::D, KJOB, F14-f-e, F8-e, kill -1 $$, shutdown, * * kill -9 1, Alt-F4, Ctrl-Alt-Del, AltGr-NumLock, Stop-A, ... * * ... "Are you sure?" ... YES ... Phew ... I'm out * ***********************************************************************
------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ Clamav-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/clamav-users