From 6bab259a5e7a7a95bab2227f44fb64fb35e2ca0d Mon Sep 17 00:00:00 2001 From: mboelen Date: Mon, 11 Jan 2016 01:31:08 +0100 Subject: [PATCH] [AUTH-9234] Gather users on AIX, and rewriting of tests --- include/tests_authentication | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/include/tests_authentication b/include/tests_authentication index 38a55b61..2c53e8dc 100644 --- a/include/tests_authentication +++ b/include/tests_authentication @@ -269,8 +269,9 @@ # # Test : AUTH-9234 # Description : Query user accounts - # Notes : HPUX > 100 - # MacOS: need to be improved (just reading passwd file is not enough) + # Notes : AIX: 100+ + # HPUX: 100+ + # Mac OS X: needs to be improved (just reading passwd file is not enough) # OpenBSD/NetBSD: unknown # Arch Linux / CentOS / Ubuntu: 1000+ Register --test-no AUTH-9234 --weight L --network NO --description "Query user accounts" @@ -279,19 +280,24 @@ FIND="" case ${OS} in + "AIX") + LogText "AIX real users output (ID = 0, or 100+):" + FIND=`awk -F: '($3 >= 100 && $3 != 65534) || ($3 == 0) { print $1","$3 }' /etc/passwd` + ;; + "FreeBSD") LogText "FreeBSD real users output (ID = 0, or 1000+, but not 65534):" - FIND=`awk -F: '($3 >= 1000) && ($3 != 65534) || ($3 == 0) { print $1","$3 }' /etc/passwd` + FIND=`awk -F: '($3 >= 1000 && $3 != 65534) || ($3 == 0) { print $1","$3 }' /etc/passwd` ;; "Linux") - LogText "Linux real users output (ID = 0, or 500+, but not 65534):" - FIND=`awk -F: '($3 >= 1000) && ($3 != 65534) || ($3 == 0) { print $1","$3 }' /etc/passwd` + LogText "Linux real users output (ID = 0, or 1000+, but not 65534):" + 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` + FIND=`awk -F: '($3 >= 1000 && $3 <= 60000 && $3 != 32767) || ($3 == 0) { print $1","$3 }' /etc/passwd` ;; "Solaris")