cron.daily/aide does not consider whitespace in aide.conf

Bug #302669 reported by Adam Bolte
4
Affects Status Importance Assigned to Milestone
aide (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: aide

This report relates to aide 0.13.1-8ubuntu1, from a Ubuntu 8.04.1 installation.

By default, the aide.conf file included in the package looks as follows:

bolad03@workspace:~/tmp/aide-0.13.1/debian$ cat aide.conf
# AIDE conf

database=file:/var/lib/aide/aide.db
database_out=file:/var/lib/aide/aide.db.new

Checksums = md5+sha1+rmd160+haval+gost+crc32+tiger+whirlpool
OwnerMode = p+u+g
Size = s+b
InodeData = OwnerMode+n+i+Size
...

According to the aide.conf man page, "these lines have the format parameter=value". It seemed clear that whitespace was allowed before and after the "=" character however since the package wasn't broken out of the box.

Eventually, I decided that the database[_out]=file:/... lines looked messy, and added the whitespace to them as well to make everything consistent. Whops! I got notifications like:

/etc/cron.daily/aide:
cp: cannot stat `': No such file or directory
run-parts: /etc/cron.daily/aide exited with return code 1

I tracked the problem down, and have included the patch so that the changes to my aide.conf are parsed correctly.

Related branches

Revision history for this message
Adam Bolte (boltronics) wrote :
Revision history for this message
Adam Bolte (boltronics) wrote :

Correction - exit *before* the copy is attempted, if the file we intend to copy does not exist. Sorry.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package aide - 0.15.1-1ubuntu1

---------------
aide (0.15.1-1ubuntu1) natty; urgency=low

  * Merge with Debian unstable; remaining Ubuntu changes:
    - debian/aide.conf.d/70_aide_dev: escape another special character in
      filenames. (LP #456710)

aide (0.15.1-1) unstable; urgency=low

  * new upstream version, changes include:
    - fixed bug with DB_CHECKINODE (closes: #596230)
  * 31_aide_rkhunter:
    - adjusted rule for rkhunter.dat and rkhunter.dat.old
  * 31_aide_munin:
    - handle exim_mailstats-<IPv4> in /var/lib/munin/plugin-state/
  * 31_aide_apt:
    - handle backups of APT's extended_states file

aide (0.15-2) unstable; urgency=low

  * Upload to unstable

aide (0.15-1) experimental; urgency=low

  * new upstream version
  * debian/aide.conf.in:
    - added grouped option (by default enabled)
  * debian/control:
    - aide-common: replaced Conflicts with Breaks/Replaces

aide (0.14.2.git20100726-1) experimental; urgency=low

  * new upstream git snapshot, changes include:
    - fit detailed output in 80 columns (closes: #146112)
    - added new attribute 'ftype' for file type change detection
    - added new attribute 'e2fsattrs' file attributes on a second extended
      file system
    - sort files in report by filename (see: #146113)
    - new grouped option
  * debian/control:
    - bumped to Standards-Version 3.9.1 (no changes necessary)
    - added e2fslibs-dev to build dependencies
  * cron.daily/aide:
    - fixed spelling error
  * debian/rules:
    - enabled e2fsattrs support
  * debian/aide.conf.in:
    - removed whirlpool from Checksums
    - added ftype to OwnerMode
    - added e2fsattrs to InodeData, VarFile, VarDir, VarDirInode and Log
  * debian/copyright:
    - updated upstream copyright
    - added myself as co-maintainer
  * cron.daily/aide:
    - adjusted script to work with new upstream git snapshot
    - replaced "New" with "Added" in "End of AIDE output" message
    - don't fail when aide.conf contains white spaces, thanks to Adam Bolte
      for the patch (LP: #302669)
    - update configuration file before parsing it
    - exit with code 1 if database doesn't exist
    - include database name in error message if database doesn't exist
    - exit with fatal error if new database does not exist
    - reworked FILTERINSTALLATIONS and FILTERUPDATES
  * 31_aide_smartmontools:
    - handle files in /var/lib/smartmontools/
  * 31_aide_dhcp3-client:
    - /var/lib/dhcp3/ has been moved to /var/lib/dhcp/
  * 31_aide_pm-utils: new
    - handle files in /var/run/pm-utils/
  * 31_aide_apt:
    - fixed handling of comments in sources.list, thanks to Harvey Muller for
      the patch (LP: #112242)
  * 31_aide_kerberos:
    - handle principal and principal.ok
 -- Martin Pitt <email address hidden> Tue, 12 Oct 2010 16:10:31 +0200

Changed in aide (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.