Török Edvin
bfd89d7c84
fix Solaris build
...
git-svn: trunk@4776
17 years ago
Tomasz Kojm
086eab5c26
update old copyright headers
...
git-svn: trunk@4775
17 years ago
Török Edvin
034994bd9c
fdpassing is now in others.c instead of session.c, move
...
the defines.
git-svn: trunk@4774
17 years ago
Török Edvin
4cc952e322
add check for msg.controllen, apparently Mac OS X sets it to 0,
...
but CMSG_FIRSTHDR is not NULL!
git-svn: trunk@4761
17 years ago
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
17 years ago
Török Edvin
004f8386ce
output "stream" instead of "fd[]" for INSTREAM.
...
Add INSTREAM command test.
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4753 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
9ef7e0bdae
fix memory leaks
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4743 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
d0f6ecae1c
Never close a file descriptor that is monitored using
...
poll()/select() from another thread.
It introduces subtle bugs.
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4742 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
f243f00fc5
fix some races reported by valgrind
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4737 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
ae083d79ff
downgrade message
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4736 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Tomasz Kojm
00eab4092f
clamd/others.c: handle multiple %v parameters
...
clamd/server-th.c: fix dbstat memleak
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4724 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
4cc08c8c1c
init chunksize
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4709 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
4ca3fc953f
close FD when we refuse to process command.
...
Print errno in clamdscan.
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4706 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
33019f0a18
properly initalize fd_buf slot, even when reusing slot.
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4695 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
8f74b8e4ee
handle multiple commands and ancillary data in one packet
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4692 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
060c6715bb
introduce MODE_WAITREPLY.
...
MULTISCAN now quits if client quits
(TODO: CONTSCAN/SCAN should have a group too!)
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4685 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
2ea8946280
don't execute commands if client disconnected.
...
fix MULTISCAN
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4682 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
ef4ed2e180
preliminary INSTREAM support.
...
TODO: the code starts to look ugly, clean up the code.
INSTREAM shouldn't reply fd[]
make jobgroup own the resources (sockets, tempfiles)
allow to notify jobgroup to terminate when remote disconnects
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4681 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
ac30aff8ea
properly close disconnected sockets
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4674 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
937c8ec187
preliminary ID support, only on engine messages, not clamd messages
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4672 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
79b43cf868
preliminary IDSESSION support, no IDs yet
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4671 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
ed2b37c685
another temp commit
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4667 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
3de54fe471
WIP switch to new multiscan code.
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4655 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
e66fd86ac0
fix FILDES
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4644 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
ada9248441
fix poll_fd
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4643 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
58b5cb19a6
fix poll, we add a new fd so we need to iterate on old nfds.
...
Various other work on recursion, unified scan, etc.
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4635 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
dc3a1def55
acceptloop/recvloop as in bb #1339
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4624 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
cb95779e9c
remove fd from poll list, before closing it, handle EBADF in select.
...
If select/poll fails for reason other than EINTR, make that error fatal.
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4623 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
bfde2577ee
typo -> segfault -> fix
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4619 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
d100458f04
if FD got reused, clear stale buffered data for old FD
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4615 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
aCaB
1b9fa47d33
poll set management and poll logic
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4612 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
aCaB
03f214fb72
sgetz - fix logic
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4611 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
aCaB
3ec259a602
preliminary zCMD sport
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4609 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
03aefc7c37
fix build errors
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4605 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
89028fc309
drop some unused code
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4603 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
218296c255
fix STREAM
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4602 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
6eea8d4f3a
fix progexit handling. Now clamd should be able to handle most commands.
...
Except SESSION is probably broken now
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4601 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
4f5a740806
fix accept logic
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4600 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
0dc9d54110
implement common accept+recv loop
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4599 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
d2417fbf93
recvloop. This doesn't compile yet.
...
But perhaps it is more portable to use a single select for accept/recv, then
do accept on listen sockets, and recv on open sockets.
This should be more portable than select on a pipe.
We can also do the operation with one mutex less.
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4598 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
b080923b5a
new poll implementation start
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4596 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Török Edvin
fe4e3f8cad
first version of poll_recv_fds
...
git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4595 77e5149b-7576-45b1-b177-96237e5ba77b
17 years ago
Tomasz Kojm
064b4a0c99
initial version of the unified option parser (bb#1215)
...
git-svn: trunk@4565
17 years ago
Török Edvin
1642ffba29
fix some races in check_clamd.sh
...
add more valgrind suppressions
better log parsing for valgrind
add mutex to prevent multiple simultaneous forks (bb #1187 )
git-svn: trunk@4182
17 years ago
Török Edvin
7959343dc7
allow make distcheck to succeed (bb #1142 )
...
fix some more warnings
filter -Werror in clamav-milter.c
git-svn: trunk@4141
17 years ago
Török Edvin
e357da7b90
more leak fixes (bb #1141 )
...
git-svn: trunk@4127
17 years ago
Török Edvin
751f84706b
avoid calling non-async-signal-safe functions between fork()
...
and exec() (bb #889 )
unit_tests: add unit-test for virusaction
git-svn: trunk@4034
17 years ago
Tomasz Kojm
29676a327f
improve handling of memory errors
...
git-svn: trunk@3964
17 years ago
Tomasz Kojm
17f74f9f5c
sync with 0.93.3
...
git-svn: trunk@3922
17 years ago
Tomasz Kojm
72ce4b70eb
improve handling of PDF, CAB, RTF, OLE2 and HTML files (sync with branch/0.93)
...
git-svn: trunk@3862
17 years ago