[Aide] gzip_dbout processing broken in 0.13?

Richard van den Berg richard at vdberg.org
Wed Dec 13 18:17:32 EET 2006


Marc Haber wrote:
> while investigating a long-time outstanding bug regarding gzip_dbout,
> I tried it after a long time again. On my test system, aide keeps
> repeating the message "File database must have one db_spec
> specification" when comparing against a database generated with
> gzip_dbout=yes. It creates the gzipped database alright, but after
> aide.db.new was moved to aide.db, aide --check gives the cited error
> message.

I can reproduce the problem. For some reason the following code in
commandconf.c no longer works:

  *db_gzp=gzdopen(fileno(*db_filep),"rb");
  c=gzgetc(*db_gzp);

gzgetc returns -1 and sets Z_BUF_ERROR (buffer error). The reason why is
beyond me because this code has not changed at all. It looks like zlib
doesn't want to open aide.db for some reason. What did change is that we
now open the aide.db with open() instead of fopen() to allow file
locking. However, this happens all before the gzip header is detected
and gzdopen() is called. So I am not sure why zlib cares how we opened
the file and got the file handle.

I'll investigate further..

Sincerely,

Richard van den Berg


More information about the Aide mailing list