From dceead3997d00db403e0803f33ba14b9cc061095 Mon Sep 17 00:00:00 2001 From: Jean Raby Date: Tue, 3 Sep 2013 09:59:01 -0400 Subject: [PATCH] Fixup sogo spool cleanup cronjob Add -user sogo to be on the safe side. Change call to /bin/rmdir by -delete to avoid error messages. Find would call rmdir and then do an openat() on the deleted directory, which would obviously fail. Fixes #2372 --- Scripts/tmpwatch | 2 +- packaging/debian-multiarch/sogo.cron.daily | 2 +- packaging/debian/sogo.cron.daily | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Scripts/tmpwatch b/Scripts/tmpwatch index 5aa1eb521..b834a417d 100644 --- a/Scripts/tmpwatch +++ b/Scripts/tmpwatch @@ -4,4 +4,4 @@ SOGOSPOOL=/var/spool/sogo /usr/sbin/tmpwatch 24 "$SOGOSPOOL" -find "$SOGOSPOOL" -depth -mindepth 1 -type d -empty -exec /bin/rmdir {} \; 2> /dev/null +find "$SOGOSPOOL" -mindepth 1 -type d -user sogo -empty -delete > /dev/null diff --git a/packaging/debian-multiarch/sogo.cron.daily b/packaging/debian-multiarch/sogo.cron.daily index 623388ff4..d28a8faa8 100644 --- a/packaging/debian-multiarch/sogo.cron.daily +++ b/packaging/debian-multiarch/sogo.cron.daily @@ -3,4 +3,4 @@ SOGOSPOOL=/var/spool/sogo /usr/sbin/tmpreaper 24 "$SOGOSPOOL" -find "$SOGOSPOOL" -mindepth 1 -type d -empty -exec /bin/rmdir {} \; 2> /dev/null +find "$SOGOSPOOL" -mindepth 1 -type d -user sogo -empty -delete > /dev/null diff --git a/packaging/debian/sogo.cron.daily b/packaging/debian/sogo.cron.daily index 623388ff4..d28a8faa8 100644 --- a/packaging/debian/sogo.cron.daily +++ b/packaging/debian/sogo.cron.daily @@ -3,4 +3,4 @@ SOGOSPOOL=/var/spool/sogo /usr/sbin/tmpreaper 24 "$SOGOSPOOL" -find "$SOGOSPOOL" -mindepth 1 -type d -empty -exec /bin/rmdir {} \; 2> /dev/null +find "$SOGOSPOOL" -mindepth 1 -type d -user sogo -empty -delete > /dev/null