Authentication fixes for OpenBSD

This commit is contained in:
Alexander Lobodzinski 2015-10-16 11:24:23 +02:00
parent 8c5f67f624
commit 34eb749636
1 changed files with 7 additions and 2 deletions

View File

@ -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`