Package: tmpreaper
Version: 1.6.13+nmu1
Severity: wishlist
Tags: patch

Hi,

I'd like to use tmpreaper to clean other directories then /tmp.  Currently,
this would need editing both /etc/cron.daily/tmpreaper and /etc/tmpreaper.conf.
Applying this patch in the package would mean the user would have to edit only
one file and, furthermore, would point the user to a way not to suffer from
tmpreapers security issues.

Hope this is useful.

Thanks for making tmpreaper available for Debian!

Bye,

Joost


diff --git a/stribor/etc/cron.daily/tmpreaper b/stribor/etc/cron.daily/tmpreaper
index 8790e30..aabfe11 100755
--- a/stribor/etc/cron.daily/tmpreaper
+++ b/stribor/etc/cron.daily/tmpreaper
@@ -88,6 +88,10 @@ if [ "$SHOWWARNING" = true ]; then
     exit 0
 fi
 
+if [ "$RUNFROMCRON" != true ]; then
+    exit 0
+fi
+
 # Verify that these variables are set, and if not, set them to default values
 # This will work even if the required lines are not specified in the included
 # file above, but the file itself does exist.
diff --git a/stribor/etc/tmpreaper.conf b/stribor/etc/tmpreaper.conf
index 14ccc79..a2d89c8 100644
--- a/stribor/etc/tmpreaper.conf
+++ b/stribor/etc/tmpreaper.conf
@@ -13,6 +13,12 @@
 # see /usr/share/doc/tmpreaper/README.security.gz
 ## SHOWWARNING=true
 
+# Remove the next line if you prefer not to execute tmpreaper via
+# /etc/cron.daily/tmpreaper, but e.g. want to use it to clean not /tmp but
+# another directory.  Such usage will not have the issues mentioned in
+# /usr/share/doc/tmpreaper/README.security.gz.
+RUNFROMCRON=true
+
 # TMPREAPER_TIME
 #       is the max. age of files before they're removed.
 #       default:


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to