Bug#373786: /etc/cron.daily/exim4-base should unset TMPDIR
Marc Haber
mh+debian-packages at zugschlus.de
Wed Oct 4 15:40:18 UTC 2006
On Mon, Oct 02, 2006 at 12:58:44PM +0200, Tollef Fog Heen wrote:
> You probably rather want to check if TMP and TMPDIR are writable, and if
> not reset them to /tmp or similar.
I have committed a fix to svn where the daily cron job first tries the
process with start-stop-daemon, and falls back to a plain su if the
invocation via start-stop-daemon fails for some reason.
Code:
if [ -x /usr/sbin/exim_tidydb ]; then
cd $SPOOLDIR/db || exit 1
if ! find $SPOOLDIR/db -maxdepth 1 -name '*.lockfile' -or -type f \
-printf '%f\0' | \
xargs -0r -n 1 \
start-stop-daemon --start --exec /usr/sbin/exim_tidydb \
--chuid Debian-exim:Debian-exim -- $SPOOLDIR > /dev/null; then
# if we reach this, invoking exim_tidydb from start-stop-daemon has
# failed, most probably because of libpam-tmpdir is in use
# (see #373786 and #376165)
find $SPOOLDIR/db -maxdepth 1 -name '*.lockfile' -or -type f \
-printf '%f\0' | \
su - --shell /bin/bash \
--command "xargs -0r -n 1 /usr/sbin/exim_tidydb $SPOOLDIR > /dev/null" \
Debian-exim
fi
fi
Link to svn:
http://svn.debian.org/wsvn/pkg-exim4/exim/trunk/debian/exim4-base.cron.daily?op=file&rev=0&sc=0
Piotr, can you please try if this works on your system with
libpam-tmpdir?
Greetings
Marc
--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature | How to make an American Quilt | Fax: *49 621 72739835
More information about the Pkg-exim4-maintainers
mailing list