Merge branch '25-Detect-old-home-dir' of evolix/evocheck into master

This commit is contained in:
Victor Laborie 2019-01-16 16:48:23 +01:00 committed by Gitea
commit c15f959c22

View file

@ -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
@ -836,6 +837,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