[clamav-users] Manually applying cdiff files

Mark Allan markjallan at gmail.com
Tue May 31 06:03:08 EDT 2016


Hi all,

For a number of reasons (which I won't bore you with but can go into if necessary!) I'm trying to apply the cdiff update files manually to daily.cvd daily.cld but I can't seem to get it right.

The sigtool man page only got me half-way there, the mailing list archives got me a bit further but after repacking the db, I get a bunch of errors.  Here's what I've done so far.

	mkdir /tmp/cvd
	cd /tmp/cvd
	sigtool --unpack-current=daily
	sigtool --run-cdiff=../daily-21643.cdiff
	sigtool -b daily.cld --unsigned --flevel 63
		WARNING: build: Signatures in daily db files: 202849, loaded by libclamav: 203452
		Total sigs: 203452
		New sigs: 5746
		Builder name: Mark Allan
		Created daily.cld

That all *appears* to work OK (i.e. no errors), but I'm unable to verify the resulting cld file with sigtool:

	sigtool -i daily.cld 
		File: daily.cld
		Build time: 31 May 2016 10:49 +0100
		Version: 21638
		Signatures: 203452
		Functionality level: 63
		Builder: Mark
		LibClamAV Error: cli_loadinfo: Digital signature not found
		LibClamAV Error: Can't load daily.info: Malformed database
		LibClamAV Error: cli_tgzload: Can't load daily.info
		ERROR: cvdinfo: Verification: Malformed database

I understand that it can't find the digital signature because I asked for --unsigned, but surely the rest ought to work regardless?

If I let 'freshclam' do the update, it verifies OK
	sigtool -i daily.cld
		Build time: 31 May 2016 01:20 -0400
		Version: 21643
		Signatures: 203452
		Functionality level: 63
		Builder: neo
		Verification OK.

I guess I'm missing something, but I can't see it.

On a related note, how is freshclam able to create the cld file with a digital signature from cdiffs, and can I do the same?

Many thanks
Mark




More information about the clamav-users mailing list