Package: tiger
Version: 1:3.2.3-3
Severity: normal
Tags: patch
Justification: Policy 9.3.2
User: [email protected]
Usertags: origin-ubuntu maverick ubuntu-patch
Hello,
In ubuntu we applied the following changes:
- scripts/check_rootdir: Check for inode 2 on ext4 as well as ext2/3.
- debian/postrm: Clean directories correctly when purging.
- config:
+ Auto-create the work directory if it's in /var/run, /tmp,
or /var/tmp
+ Use temporary file instead of hardcoded rcfile for temporary work
And we think you might be interested too. Attaching a patch with these
changes.
diff -u tiger-3.2.3/debian/postrm tiger-3.2.3/debian/postrm
--- tiger-3.2.3/debian/postrm
+++ tiger-3.2.3/debian/postrm
@@ -9,11 +9,11 @@
case "$1" in
purge)
- for dir in /var/log/tiger/ /var/lib/tiger/work /var/run/tiger/work/ /var/run/tiger/
+ for dir in /var/log/tiger/ /var/lib/tiger/work /var/lib/tiger/ /var/run/tiger/
do
[ -d "$dir" ] && {
- find "$dir" -type f -exec rm -f {} \;
- rmdir "$dir"
+ find $dir -type d -o -exec rm -f {} \;
+ find $dir -type d -depth -exec rmdir {} \;
}
done
# Do we have any tigerXX files under /var/log/? if so we should remove
only in patch2:
unchanged:
--- tiger-3.2.3.orig/config
+++ tiger-3.2.3/config
@@ -287,10 +287,15 @@
# TODO: WORKDIR should be removed on exit if it is located in a temporary
# directory
if [ ! -d "$WORKDIR" ] ; then
- echo "Configured working directory $WORKDIR does not exist" >&2
- if [ "$QUIET" != "Y" ] ; then
- echo "Creating working directory $WORKDIR"
- echo
+ case "$WORKDIR" in
+ /var/run/* | /tmp* | /var/tmp/* )
+ mkdir -p "$WORKDIR"
+ ;;
+ *)
+ echo "Configured working directory $WORKDIR does not exist" >&2
+ exit 1
+ esac
+
fi
# TODO: -p switch is not portable
if ! mkdir -p "$WORKDIR" >/dev/null 2>&1; then
@@ -395,11 +400,11 @@
#
[ -n "$RCFILE" -a -r $RCFILE ] && {
- tempfile=`tempfile -d $WORKDIR` || tempfile=$WORKDIR/rcfile.$$
+ tmpf=$(tempfile)
$GREP -v '^#' $RCFILE |
- $SED -e 's/^\(.*\)=/export \1; \1=/' > $tempfile
- . $tempfile
- $RM -f $tempfile
+ $SED -e 's/^\(.*\)=/export \1; \1=/' > $tmpf
+ . $tmpf
+ $RM -f $tmpf
}
HOSTNAME=`$GETHOSTNAME`
only in patch2:
unchanged:
--- tiger-3.2.3.orig/scripts/check_rootdir
+++ tiger-3.2.3/scripts/check_rootdir
@@ -90,7 +90,7 @@
# Checking to see if the root directory is on the correct INODE number
inode=`$LS -di / | $AWK '{print $1}'`
fstype=`$GETFS | $GREP " / " | $AWK -F " " '{ print $5;}'`
-[ $inode != 2 ] && [ "$fstype" = "ext2" -o "$fstype" = "ext3" ] &&
+[ $inode != 2 ] && [ "$fstype" = "ext2" -o "$fstype" = "ext3" -o "$fstype" = "ext4" ] &&
message FAIL rootdir001f "" "Root directory on incorrect inode"