From 09bed967bf610ee9e52a7eab772fa6f9c7b3e00b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= Date: Sun, 31 Oct 2010 19:39:41 +0100 Subject: 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. --- init.d/bootmisc.in | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/init.d/bootmisc.in b/init.d/bootmisc.in index 9708a24..9a3b1fa 100644 --- a/init.d/bootmisc.in +++ b/init.d/bootmisc.in @@ -35,6 +35,12 @@ cleanup_tmp_dir() # Faster than find 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 . \ ! -path "./lost+found" \ ! -path "./lost+found/*" \ @@ -48,8 +54,6 @@ cleanup_tmp_dir() ! -path "./aquota.group/*" \ ! -path "./journal" \ ! -path "./journal/*" \ - ! -path "./.private" \ - ! -path "./.private/*" \ -exec rm -rf {} \; eend 0 else -- cgit v1.2.3