From 288d26366a5722a4215088b7212f3445452f2dad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20S?= Date: Wed, 16 Jan 2019 13:47:49 +0100 Subject: [PATCH] Implement #25 We loop through directories in /home and see ig the owner has a resolvable ID. --- evocheck.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/evocheck.sh b/evocheck.sh index 42faf83..0056ce0 100755 --- a/evocheck.sh +++ b/evocheck.sh @@ -106,6 +106,7 @@ IS_EVOACME_CRON=1 IS_EVOACME_LIVELINKS=1 IS_APACHE_CONFENABLED=1 IS_MELTDOWN_SPECTRE=1 +IS_OLD_HOME_DIR=1 #Proper to OpenBSD IS_SOFTDEP=1 @@ -835,6 +836,17 @@ if [ -e /etc/debian_version ]; then fi fi fi + + if [ "$IS_OLD_HOME_DIR" = 1 ]; then + for dir in /home/*; do + stat -c "%n has owner %u resolved as %U" "$dir" | grep -v .bak | grep -q UNKNOWN + if [[ ${PIPESTATUS[2]} == 0 ]]; then + # There is at least one dir matching + echo 'IS OLD_HOME_DIR FAILED!' + break + fi + done + fi fi