From 797ef682735eff5a6ca9e36de2e13f518c8e7f29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lesimple?= Date: Tue, 9 Jan 2024 09:21:15 +0000 Subject: [PATCH] enh: osh-orphaned-homedir.sh: also cleanup /run/faillock --- bin/cron/osh-orphaned-homedir.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/cron/osh-orphaned-homedir.sh b/bin/cron/osh-orphaned-homedir.sh index 8390f4591..633684da6 100755 --- a/bin/cron/osh-orphaned-homedir.sh +++ b/bin/cron/osh-orphaned-homedir.sh @@ -107,4 +107,8 @@ do fi done < <(find /home/ -mindepth 1 -maxdepth 1 -type d -nouser -nogroup -mmin +3 -print0) +# there are also temporary files that might not be cleaned when an account disappears, +# so check for those here +[ -d /run/faillock ] && find /run/faillock -xdev -nouser -type f -delete + exit_success