Package: tmpreaper
Version: 1.6.18
Severity: important
X-Debbugs-Cc: [email protected]
In /etc/cron.daily/tmpreaper, there are these lines:
> # get the TMPREAPER_TIME value from /etc/default/rcS if not already set
>
> if [ -n "$TMPREAPER_TIME" ]; then
> if grep '^TMPTIME=' /etc/default/rcS >/dev/null 2>&1; then
The test [ -n "$TMPREAPER_TIME" ] is backwards: it evaluates to true
exactly when TMPREAPER_TIME is already set.
If one does not set TMPREAPER_TIME in /etc/tmpreaper.conf,
the whole if-block is skipped, TMPREAPER_TIME is not read from
/etc/default/rcS, and is subsequently set to 7 days by the line
TMPREAPER_TIME=${TMPREAPER_TIME:-7d}
The test in question should be replaced with [ -z "$TMPREAPER_TIME" ].
Best regards,
g.
-- System Information:
Debian Release: 13.3