Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ClamAV: devel

.cld file status

 

 

ClamAV devel RSS feed   Index | Next | Previous | View Threaded


clam at fiddaman

Dec 31, 2007, 12:45 PM

Post #1 of 5 (1906 views)
Permalink
.cld file status

Does anyone know the status of the new support for .cld files in the SVN
code?

I've been playing with the latest SVN code on a development box and I'm
having problems with the new .cld container files. Everything's fine until
an incremental update occurs then a .cld file appears and clamd exits due
to a corrupt database.

If this new code isn't finished yet I'll leave it for now, but if it's
supposed to be working then I'll work out what's going wrong and open a
bug.

Thanks,

Andy

Wed Dec 19 22:11:17 CET 2007 (tk)
---------------------------------
* freshclam, libclamav: drop support for .inc directories and instead
use
local containers with .cvd-like structure but
uncompressed by default


Dec 30 21:31:00 lime freshclam[22823]: [ID 702911 mail.info] ClamAV
update process started at Sun Dec 30 21:31:00 2007
Dec 30 21:31:00 lime freshclam[22823]: [ID 702911 mail.info] main.cvd is
up to date (version: 45, sigs: 169676, f-level: 21, builder: sven)
Dec 30 21:31:00 lime freshclam[22823]: [ID 702911 mail.info] Downloading
daily-5299.cdiff [100%]
Dec 30 21:31:00 lime freshclam[22823]: [ID 702911 mail.info] daily.cld
updated (version: 5299, sigs: 14318, f-level: 21, builder: ccordes)
Dec 30 21:31:00 lime freshclam[22823]: [ID 702911 mail.info] Database
updated (183994 signatures) from db.uk.clamav.net (IP: 217.135.32.99)
Dec 30 21:31:00 lime freshclam[22823]: [ID 702911 mail.info] Clamd
successfully notified about the update.
Dec 30 21:31:42 lime clamd[22314]: [ID 702911 mail.info] Reading databases
from /opt/clamav/share/clamav
Dec 30 21:31:43 lime clamd[22314]: [ID 702911 mail.error] reload db
failed: Malformed database
Dec 30 21:31:43 lime clamd[22314]: [ID 702911 mail.info] Terminating
because of a fatal error.

_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net


njh at bandsman

Jan 1, 2008, 3:31 AM

Post #2 of 5 (1807 views)
Permalink
Re: .cld file status [In reply to]

Andy Fiddaman wrote:
> Does anyone know the status of the new support for .cld files in the SVN
> code?
>
> I've been playing with the latest SVN code on a development box and I'm
> having problems with the new .cld container files. Everything's fine until
> an incremental update occurs then a .cld file appears and clamd exits due
> to a corrupt database.
>
> If this new code isn't finished yet I'll leave it for now, but if it's
> supposed to be working then I'll work out what's going wrong and open a
> bug.

The work around is to remove /usr/local/share/clamav/daily*,
rerun freshclam, and restart clamd. Please open a bug report and mark it
as CVS only (there's no SVN flag), even though it's known about, by opening
a bug you'll keep a place holder there for progress.
>
> Thanks,
>
> Andy

Happy New Year!

-Nigel


tkojm at clamav

Jan 2, 2008, 3:03 PM

Post #3 of 5 (1786 views)
Permalink
Re: .cld file status [In reply to]

On Mon, 31 Dec 2007 20:45:48 +0000 (GMT)
Andy Fiddaman <clam [at] fiddaman> wrote:

> Does anyone know the status of the new support for .cld files in the SVN
> code?
>
> I've been playing with the latest SVN code on a development box and I'm
> having problems with the new .cld container files. Everything's fine until
> an incremental update occurs then a .cld file appears and clamd exits due
> to a corrupt database.

Hi Andy,

support for .cld files is still experimental and not fully finished, but
clamd shouldn't have such problems. I couldn't reproduce it on my local box;
does it fix the problem if you change this line in readdb.c:

ret = cli_cvdload(fs, engine, signo, warn, options | CL_DB_CVDNOTMP, 1);

to

ret = cli_cvdload(fs, engine, signo, warn, options, 1);

Thanks,

--
oo ..... Tomasz Kojm <tkojm [at] clamav>
(\/)\......... http://www.ClamAV.net/gpg/tkojm.gpg
\..........._ 0DCA5A08407D5288279DB43454822DC8985A444B
//\ /\ Thu Jan 3 00:01:07 CET 2008
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net


clam at fiddaman

Jan 3, 2008, 5:27 AM

Post #4 of 5 (1795 views)
Permalink
Re: .cld file status [In reply to]

On Thu, 3 Jan 2008, Tomasz Kojm wrote:

; On Mon, 31 Dec 2007 20:45:48 +0000 (GMT)
; Andy Fiddaman <clam [at] fiddaman> wrote:
;
; > Does anyone know the status of the new support for .cld files in the SVN
; > code?
; >
; > I've been playing with the latest SVN code on a development box and I'm
; > having problems with the new .cld container files. Everything's fine until
; > an incremental update occurs then a .cld file appears and clamd exits due
; > to a corrupt database.
;
; Hi Andy,
;
; support for .cld files is still experimental and not fully finished, but
; clamd shouldn't have such problems. I couldn't reproduce it on my local box;
; does it fix the problem if you change this line in readdb.c:
;
; ret = cli_cvdload(fs, engine, signo, warn, options | CL_DB_CVDNOTMP, 1);
;
; to
;
; ret = cli_cvdload(fs, engine, signo, warn, options, 1);

Yes, that does fix it which narrows down where the problem is.

I'll dig around and see if I can find out what's happening, I just didn't
want to spend the time if it was something you already knew about.

Thanks,

Andy


_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net


clam at fiddaman

Jan 3, 2008, 7:00 AM

Post #5 of 5 (1790 views)
Permalink
Re: .cld file status [In reply to]

On Thu, 3 Jan 2008, Tomasz Kojm wrote:
;
; support for .cld files is still experimental and not fully finished, but
; clamd shouldn't have such problems. I couldn't reproduce it on my local box;

It seems that the first gzseek() call in cli_tgzload() is somehow
rewinding the file pointer. cli_tgzload() correctly reads the file header
but then after
off = gzseek(infile, 0, SEEK_CUR);
off is set to 512 (instead of 1024). As a result, the file header is
included at the start of the data that's passed on to the function that
loads the database.

If I remove the gzseek call (for testing) the first database in the .cld
file loads correctly.

I'm using the stock Solaris 10 libz (fully patched) which is 1.2.3
according to the zlib.h file.

This patch fixes the problem for me - I think there's a confusion with
gzopening an already seeked fd. If there's a define somewhere for the size
of a CVD header, that would be better than hard coding 512, but I couldn't
see one.

Index: libclamav/cvd.c
===================================================================
--- libclamav/cvd.c (revision 3480)
+++ libclamav/cvd.c (working copy)
@@ -196,6 +196,8 @@
return CL_EIO;
}

+gzseek(infile, 512, SEEK_SET);
+
while(1) {

nread = gzread(infile, block, TAR_BLOCKSIZE);
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net

ClamAV devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.