Tomasz Kojm
6a4dd9dc6b
clamd, clamscan, libclamav: drop support for MailFollowURLs (bb#1677)
2009-08-06 22:29:13 +02:00
Tomasz Kojm
68dbfcd9e7
clamd: honour value of 0 in Max* options
2009-07-15 19:37:30 +02:00
Tomasz Kojm
cd0d6a0bf2
clamd, clamav-milter: make pid files globally readable (bb#1642)
2009-07-15 12:34:52 +02:00
Török Edvin
7660b7cb35
Fix 60 byte/STREAM command memory leak on FreeBSD. (bb #1567 ,
...
thanks to Jay Deiman <jay*splitstreams.com> and Chris Mikkelson <cmikk*qwest.net> for tracking down the leak!).
git-svn: trunk@5061
2009-05-06 07:56:28 +00:00
Török Edvin
47d403f899
Fix clamd INSTREAM handling inside IDSESSION (bb #1564 ).
...
git-svn: trunk@5049
2009-04-20 14:26:48 +00:00
Török Edvin
da3e0e4036
fix documentation, fix warnings.
...
git-svn: trunk@5025
2009-04-06 10:26:15 +00:00
Török Edvin
b6de553d58
set timeout to readtimeout after receiving a chunk (bb #1540 ).
...
better checks and documentation for MaxQueue (bb #1521 ).
git-svn: trunk@5023
2009-04-06 09:26:11 +00:00
Török Edvin
9390411bf0
Automatically fix MaxQueue settings (bb #1521 ).
...
Also use rlim_cur instead of rlim_max, because that is what the kernel enforces.
git-svn: trunk@5000
2009-04-01 17:19:06 +00:00
Tomasz Kojm
2accc66fef
libclamav, clamd, clamscan: replace cl_engine_(set|get) with cl_engine_set_(num|str) and cl_engine_get_(num|str)
...
git-svn: trunk@4933
2009-03-12 15:21:36 +00:00
Török Edvin
f8e8ab4fd9
wake recvloopth after SelfCheck (if set), to avoid reloading the DB
...
just before next scan request.
git-svn: trunk@4904
2009-03-06 12:21:58 +00:00
Tomasz Kojm
99f817e731
libclamav: introduce cl_engine_settings_* API calls for copying settings between engines
...
clamd/server-th.c: respect original engine settings after db reload (bb#1380)
git-svn: trunk@4885
2009-03-02 18:56:03 +00:00
Török Edvin
1c3895a69f
downgrade warning message (bb #1433 ).
...
git-svn: trunk@4878
2009-03-01 10:33:48 +00:00
Török Edvin
a1c9ad2cf3
fix distcheck.
...
git-svn: trunk@4836
2009-02-19 08:50:04 +00:00
Török Edvin
5d34634e5d
move the command parsing, and stream handling code into their own functions.
...
No functionality change.
git-svn: trunk@4834
2009-02-18 21:34:44 +00:00
Török Edvin
f36d8f928d
fix NetBSD build
...
git-svn: trunk@4832
2009-02-18 21:34:34 +00:00
Török Edvin
a414efbf5e
revert previous commit, it is the wrong fix.
...
git-svn: trunk@4828
2009-02-18 19:11:21 +00:00
Török Edvin
a1f0c01189
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 )
git-svn: trunk@4827
2009-02-18 19:08:15 +00:00
Török Edvin
4d26118b95
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 )
git-svn: trunk@4826
2009-02-18 18:37:57 +00:00
Török Edvin
b82eea8de0
signals may not wake a poll(), so make sure thread wakes up (BB #1400 ).
...
git-svn: trunk@4816
2009-02-17 20:05:35 +00:00
Török Edvin
537292a773
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.
git-svn: trunk@4811
2009-02-17 18:04:48 +00:00
Török Edvin
fb6fe4f5d1
Introduce '$' in logg, it is active when logg_verbose=2, i.e. when Debug yes.
...
Fix leak reported by valgrind.
git-svn: trunk@4806
2009-02-17 15:59:36 +00:00
Török Edvin
c5355aedbd
make sending ancillary data at wrong time a protocol error.
...
change testcase accordingly.
git-svn: trunk@4805
2009-02-17 15:59:31 +00:00
Török Edvin
5f6edb222c
ReadTimeout handling, and introduce CommandReadTimeout.
...
git-svn: trunk@4803
2009-02-17 15:59:21 +00:00
Török Edvin
456e31a3cb
fix typo.
...
add another stress test.
Don't leak file descriptors.
Fix IDSESSION delimiter handling.
git-svn: trunk@4800
2009-02-16 21:27:22 +00:00
Török Edvin
0378a9ab77
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.
git-svn: trunk@4798
2009-02-16 18:27:08 +00:00
Török Edvin
4e24a36173
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.
git-svn: trunk@4796
2009-02-16 18:26:58 +00:00
Török Edvin
80681b50c7
Initialize mutex.
...
Fix poll_fd to properly lock/unlock mutex.
This fixes the STREAM command.
git-svn: trunk@4787
2009-02-14 09:14:04 +00:00
Török Edvin
36784cad4b
fix nFILDES command
...
git-svn: trunk@4783
2009-02-13 14:18:54 +00:00
Tomasz Kojm
086eab5c26
update old copyright headers
...
git-svn: trunk@4775
2009-02-13 10:55:45 +00:00
Török Edvin
6e3256f492
Unify error paths.
...
Remove unix socket we created if startup fails due to invalid config.
git-svn: trunk@4768
2009-02-12 21:14:45 +00:00
Török Edvin
949c6fe54f
merge from clamd-proto branch:
...
handle multiple %v parameters
introduce poll_fds that also does the read into a buffer
introduce thrmgr_group* commands for keeping track of groups of commands
(multiscan, IDSESSION)
introduce 2 queues in thrmgr, multiscan queues get lower priority. Commands
are processed from both queues in a 4:1 ratio to avoid starvation.
unify reply code: conn_reply*
unify scanner code into scan_callback that is called from cli_ftw
multiscan doesn't need stat() now if readdir() provides dt_type
redesign clamd main loop: there is now an accept thread, and a
recv()/dispatch thread, +MaxThreads worker (scanner) threads.
introduce limiting on commands when worker threads are contended.
introduce IDSESSION, a replacement for the old SESSION command, that allows
asyncronous (scan) commands and scan replies
introduce INSTREAM that allows sending the data to scan on same connection
(vs STREAM that requires another port)
introduce zCOMMANDS
git-svn: trunk@4755
2009-02-12 16:51:09 +00:00
Tomasz Kojm
064b4a0c99
initial version of the unified option parser (bb#1215)
...
git-svn: trunk@4565
2008-12-17 21:42:54 +00:00
Tomasz Kojm
b8fe70b3a3
libclamav: drop options parameter in cl_engine_new(); replace cl_engine_dup() with cl_engine_addref()
...
git-svn: trunk@4398
2008-11-13 15:55:35 +00:00
Tomasz Kojm
395fb661e3
fix some possible memleaks
...
git-svn: trunk@4391
2008-11-12 19:39:31 +00:00
Tomasz Kojm
370892d044
clamscan, clamd: use the new API; drop the hardcoded default limits and use the ones set in cl_engine_new()
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/newapi@4384 77e5149b-7576-45b1-b177-96237e5ba77b
2008-11-12 16:19:43 +00:00
Török Edvin
deb3031222
mempool statistics support
...
git-svn: trunk@4344
2008-11-06 14:27:27 +00:00
Tomasz Kojm
edc677c179
clamd/server-th.c: fix handling of pthread_attr_init/pthread_create in ClamukoScanOnAccess (bb#1169)
...
git-svn: trunk@4169
2008-09-08 14:08:05 +00:00
Török Edvin
e357da7b90
more leak fixes (bb #1141 )
...
git-svn: trunk@4127
2008-08-21 15:58:02 +00:00
Tomasz Kojm
3eba9d8363
clamd/server-th.c: add missing proto for cli_initengine() (bb#1136)
...
git-svn: trunk@4116
2008-08-17 17:39:21 +00:00
Tomasz Kojm
b023c36d4b
libclamav: add support for loading specific PUA categories (bb#939)
...
clamd: new options ExcludePUA and IncludePUA
clamscan: new switches --exclude-pua and --include-pua
git-svn: trunk@4046
2008-07-31 16:26:50 +00:00
Török Edvin
7f0d1148d6
clamd, clamscan, libclamav: new option HeuristicScanPrecedence (bb #649 )
...
docs/: update docs for HeuristicScanPrecedence and ScanPartialMessages
unit_tests/: add test for HeuristicScanPrecedence
git-svn: trunk@4037
2008-07-31 10:51:46 +00:00
Tomasz Kojm
9a03413e9b
clamscan, clamav-milter: catch and ignore SIGXFSZ; display warning if system limits are too restrictive (bb#994)
...
git-svn: trunk@4033
2008-07-30 15:20:30 +00:00
Török Edvin
4270f93bcc
(bb #913 , #916 )
...
* fix scan of partial messages
* allow for tempfiles to be cleaned up based on age
* new clamd.conf option ScanPartialMessages
* sample cleanup script
* clamd/thrmgr.c: fix item_count
git-svn: trunk@4031
2008-07-30 13:54:34 +00:00
Tomasz Kojm
5a66732fdc
clamd: revert patch from bb#1028 (bb#1113)
...
git-svn: trunk@4029
2008-07-29 21:35:58 +00:00
aCaB
5dcb8a7a81
bb#384
...
git-svn: trunk@4006
2008-07-28 10:05:08 +00:00
aCaB
cc4232a3b1
add some missing checks for pthread api calls - bb#384
...
git-svn: trunk@4004
2008-07-27 21:38:35 +00:00
Tomasz Kojm
29676a327f
improve handling of memory errors
...
git-svn: trunk@3964
2008-07-16 14:55:53 +00:00
Tomasz Kojm
6f2f04916d
libclamav, clamd: prune old lockdb code
...
git-svn: trunk@3955
2008-07-15 15:55:47 +00:00
Tomasz Kojm
04ba76d2cb
minimize memory fragmentation after db reload (bb#1028)
...
git-svn: trunk@3873
2008-06-02 12:00:37 +00:00
Tomasz Kojm
a9d3aa14cd
libclamunrar_iface, clamd, freshclam: merge win32 patches from NJH (bb#802)
...
git-svn: trunk@3872
2008-05-30 10:27:24 +00:00