Allow cleaning up of pam_mktemp-based temporary directories.

This was blacklisted before, so the .private directories never had their
content cleaned up, even if WIPE_TMP was set to yes.
This commit is contained in:
Diego Elio Pettenò 2010-10-31 19:39:41 +01:00 committed by Jory A. Pratt
parent 060b19e3e3
commit 09bed967bf

View File

@ -35,6 +35,12 @@ cleanup_tmp_dir()
# Faster than find # Faster than find
rm -rf -- [^ajlq\.]* rm -rf -- [^ajlq\.]*
# pam_mktemp creates a .private directory within which
# each user gets a private directory with immutable
# bit set; remove the immutable bit before trying to
# remove it.
[ -d /tmp/.private ] && chattr -R -a /tmp/.private
find $startopts ! -name . \ find $startopts ! -name . \
! -path "./lost+found" \ ! -path "./lost+found" \
! -path "./lost+found/*" \ ! -path "./lost+found/*" \
@ -48,8 +54,6 @@ cleanup_tmp_dir()
! -path "./aquota.group/*" \ ! -path "./aquota.group/*" \
! -path "./journal" \ ! -path "./journal" \
! -path "./journal/*" \ ! -path "./journal/*" \
! -path "./.private" \
! -path "./.private/*" \
-exec rm -rf {} \; -exec rm -rf {} \;
eend 0 eend 0
else else