From 34eb749636ed0242db86868af515be4964d40c91 Mon Sep 17 00:00:00 2001 From: Alexander Lobodzinski Date: Fri, 16 Oct 2015 11:24:23 +0200 Subject: [PATCH] Authentication fixes for OpenBSD --- include/tests_authentication | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/tests_authentication b/include/tests_authentication index d973b01b..1cfe7341 100644 --- a/include/tests_authentication +++ b/include/tests_authentication @@ -62,7 +62,7 @@ Register --test-no AUTH-9208 --weight L --network NO --description "Check non-unique accounts in passwd file" if [ ${SKIPTEST} -eq 0 ]; then logtext "Test: Checking for non-unique accounts" - if [ "${OS}" = "DragonFly" -o "${OS}" = "FreeBSD" -o "${OS}" = "NetBSD" ]; then + if [ "${OS}" = "DragonFly" -o "${OS}" = "FreeBSD" -o "${OS}" = "NetBSD" -o "${OS}" = "OpenBSD" ]; then PASSWD_FILE="/etc/master.passwd" else PASSWD_FILE="/etc/passwd" @@ -273,7 +273,7 @@ # MacOS: need to be improved (just reading passwd file is not enough) # OpenBSD/NetBSD: unknown # Arch Linux / CentOS / Ubuntu: 1000+ - Register --test-no AUTH-9234 --os Linux --weight L --network NO --description "Query user accounts" + Register --test-no AUTH-9234 --weight L --network NO --description "Query user accounts" if [ ${SKIPTEST} -eq 0 ]; then logtext "Test: Read system users (including root user) from /etc/passwd" FIND="" @@ -289,6 +289,11 @@ FIND=`awk -F: '($3 >= 1000) && ($3 != 65534) || ($3 == 0) { print $1","$3 }' /etc/passwd` ;; + "OpenBSD") + logtext "OpenBSD real users output (ID = 0, or 1000-60000, but not 32767):" + FIND=`awk -F: '($3 >= 1000) && ($3 <= 60000) && ($3 != 32767) || ($3 == 0) { print $1","$3 }' /etc/passwd` + ;; + "Solaris") logtext "Solaris real users output (ID =0, or 100+, but not 60001/65534):" FIND=`awk -F: '($3 >= 100 && $3 != 60001 && $3 != 65534) || ($3 == 0) { print $1","$3 }' /etc/passwd`