February 19, 2009
View a1c9ad2

fix distcheck.

Török Edvin authored on 2009/02/19 17:50:04
View 5d34634

move the command parsing, and stream handling code into their own functions. No functionality change.

Török Edvin authored on 2009/02/19 06:34:44
View f36d8f9

fix NetBSD build

Török Edvin authored on 2009/02/19 06:34:34
View a414efb

revert previous commit, it is the wrong fix.

Török Edvin authored on 2009/02/19 04:11:21
View a1f0c01

Fix wrong use of strerror_r: it doesn't have to use/fill the buffer, it can return a pointer to a static location, as described in the manpage. This can happen on a Linux system with a foreign locale, where the LANG=C messages are returned this way. (BB #1403)

Török Edvin authored on 2009/02/19 04:08:15
View 4d26118

In single INSTREAM mode, remove FD from polled set (BB #1410) Fix testcase, INSTREAM should say UNKNOWN COMMAND in old mode and close conn, sending anything after it will likely result in a broken pipe.(BB #1407)

Török Edvin authored on 2009/02/19 03:37:57
February 18, 2009
View b82eea8

signals may not wake a poll(), so make sure thread wakes up (BB #1400).

Török Edvin authored on 2009/02/18 05:05:35
View 537292a

Reject new commands sent as new-style commands to avoid confusion. This means that IDSESSION/INSTREAM must be sent as nIDSESSION\n or zIDSESSION\0, ditto for INSTREAM. Adjust testcases accordingly. Old commands are still accepted when sent without delimiter.

Török Edvin authored on 2009/02/18 03:04:48
View fb6fe4f

Introduce '$' in logg, it is active when logg_verbose=2, i.e. when Debug yes. Fix leak reported by valgrind.

Török Edvin authored on 2009/02/18 00:59:36
View c5355ae

make sending ancillary data at wrong time a protocol error. change testcase accordingly.

Török Edvin authored on 2009/02/18 00:59:31
View 5f6edb2

ReadTimeout handling, and introduce CommandReadTimeout.

Török Edvin authored on 2009/02/18 00:59:21
February 17, 2009
View 456e31a

fix typo. add another stress test. Don't leak file descriptors. Fix IDSESSION delimiter handling.

Török Edvin authored on 2009/02/17 06:27:22
View 0378a9a

introduce timeouts for send(), this is needed for IDSESSION to work reliably, since a buggy client implementation may get stuck in send(), and then clamd gets stuck in send() -> deadlock. To avoid this we need nonblocking sockets, and (low) timeouts on send. Add more tests for clamd protocol, including a stress test for IDSESSION.

Török Edvin authored on 2009/02/17 03:27:08
View 4e24a36

add more unit tests. Make handling of old-style commands compatible with old clamd: if they have a \n that will delimit the command. If multiscan of a single file encounters errors, don't reply OK too.

Török Edvin authored on 2009/02/17 03:26:58
February 14, 2009
View 80681b5

Initialize mutex. Fix poll_fd to properly lock/unlock mutex. This fixes the STREAM command.

Török Edvin authored on 2009/02/14 18:14:04