Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#742241: tmpreaper: please make it easy to use tmpreaper without running it from cron to clean /tmp

32 views
Skip to first unread message

Joost van Baal-Ilić

unread,
Mar 21, 2014, 2:20:02 AM3/21/14
to
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 debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Paul Slootman

unread,
Dec 14, 2021, 7:40:03 AM12/14/21
to
Sorry for ignoring this for so long...

On Fri 21 Mar 2014, Joost van Baal-Ilić wrote:

> 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.

Surely if you don't want to run tmpreaper from cron, simply delete the
cron.daily script?

If you don't use the cron.daily script (either by deleting it or by
implementing your suggested patch) then /etc/tmpreaper.conf is not used.
So if you want to run tmpreaper manually, just go for it, no need to
modify /tmp/tmpreaper.conf.

Maybe I've misunderstood what you're trying to do?


Regards,
Paul
0 new messages