diff -u aide-0.13.1/debian/cron.daily/aide aide-0.13.1/debian/cron.daily/aide --- aide-0.13.1/debian/cron.daily/aide +++ aide-0.13.1/debian/cron.daily/aide @@ -120,6 +120,10 @@ LOGHEAD="$(printf "terminated because lock %s could not be obtaiend." "$LOCKFILE")" MAILHEAD="$(printf "The cron job was terminated because lock %s could not be obtained." "$LOCKFILE")" ;; + cantcreatebase) + LOGHEAD="$(printf "terminated: Cannot create base directory %s." "$TMPBASE")" + MAILHEAD="$(printf "The cron job was terminated: Cannot create base directory %s." "$TMPBASE")" + ;; cantmovetmp) LOGHEAD="$(printf "terminated: Cannot move away %s." "$TMPDIRIN")" MAILHEAD="$(printf "The cron job was terminated: Cannot move away %s." "$TMPDIRIN")" @@ -365,6 +369,11 @@ BEGINTIME="$(date +%s)" +if ! mkdir -p $TMPBASE; then + onexit cantcreatebase + exit 1 +fi + if command -v dotlockfile >/dev/null 2>&1; then if ! dotlockfile -p -l "$LOCKFILE"; then onexit nolock diff -u aide-0.13.1/debian/aide_fixperms aide-0.13.1/debian/aide_fixperms --- aide-0.13.1/debian/aide_fixperms +++ aide-0.13.1/debian/aide_fixperms @@ -1,11 +1,20 @@ #!/bin/bash -PACKAGES="aide aide-config-zg2" +EXTRAPACKAGES="aide-config-zg2" -for package in $PACKAGES; do +fixperm() { + file=$1 + if < $file head -n 1 | grep -q '^#!'; then + chmod 755 $file + fi +} + +for file in $(find debian/aide-common/usr/share/aide/config/aide -type f -print 2>/dev/null); do + fixperm $file +done + +for package in $EXTRAPACKAGES; do for file in $(find debian/$package/usr/share/$package/config/aide -type f -print 2>/dev/null); do - if < $file head -n 1 | grep -q '^#!'; then - chmod 755 $file - fi + fixperm $file done done diff -u aide-0.13.1/debian/changelog aide-0.13.1/debian/changelog --- aide-0.13.1/debian/changelog +++ aide-0.13.1/debian/changelog @@ -1,3 +1,14 @@ +aide (0.13.1-8ubuntu3) hardy-proposed; urgency=low + + [ Jean-Baptiste Lallement ] + * more fixes to aide_fixperms. Backported from intrepid (LP: #157858) + + [ Jamie Strandboge ] + * Create TMPBASE directory if it doesn't exists (LP: #144730). Thanks + to Jean-Baptiste Lallement. + + -- Jamie Strandboge Fri, 10 Oct 2008 17:10:22 -0500 + aide (0.13.1-8ubuntu1) hardy; urgency=low * add missing Replaces: aide (<< 0.13.1-7) to fix file diff -u aide-0.13.1/debian/aide-common.postinst aide-0.13.1/debian/aide-common.postinst --- aide-0.13.1/debian/aide-common.postinst +++ aide-0.13.1/debian/aide-common.postinst @@ -59,6 +59,14 @@ fi done +# sync permissions in /etc/aide/aide.conf.d (LP: #157858) +AIDECONFD="aide/aide.conf.d" +if [ -n "$2" ] && dpkg --compare-versions "$2" lt "0.13.1-8ubuntu2"; then + for file in $(find $SRCDIR/$AIDECONFD -type f -printf '%P\n' ); do + chmod --reference="$SRCDIR/$AIDECONFD/$file" "$TRGDIR/$AIDECONFD/$file" + done +fi + (umask 077 && mkdir -p /var/run/aide) db_get aide/newlibdir