From ef5c00fef5f50d8b676890c49afe247875c74334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lesimple?= Date: Tue, 22 Oct 2019 14:14:32 +0200 Subject: [PATCH] enh: 13.12_users_valid_homedir.sh: ignore /nonexistent special home folder --- bin/hardening/13.12_users_valid_homedir.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/hardening/13.12_users_valid_homedir.sh b/bin/hardening/13.12_users_valid_homedir.sh index 07774bd..809cad7 100755 --- a/bin/hardening/13.12_users_valid_homedir.sh +++ b/bin/hardening/13.12_users_valid_homedir.sh @@ -24,7 +24,7 @@ audit () { USER=$(awk -F: {'print $1'} <<< $LINE) USERID=$(awk -F: {'print $2'} <<< $LINE) DIR=$(awk -F: {'print $3'} <<< $LINE) - if [ $USERID -ge 1000 -a ! -d "$DIR" -a $USER != "nfsnobody" -a $USER != "nobody" ]; then + if [ $USERID -ge 1000 -a ! -d "$DIR" -a $USER != "nfsnobody" -a $USER != "nobody" -a "$DIR" != "/nonexistent" ]; then crit "The home directory ($DIR) of user $USER does not exist." ERRORS=$((ERRORS+1)) fi