diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2016-07-30 17:08:45 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2016-07-30 17:08:45 +0300 |
commit | d776c30b06be93897bd91992f2927bcb1a753bc1 (patch) | |
tree | 42b72f523b81f8b04ec342792ff05352d87da391 | |
parent | 6375953b26c325c319248bcc9739a4f9ef8e0c4f (diff) |
[AUTH-9406] - Readability and code style changes
-rw-r--r-- | include/tests_authentication | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/include/tests_authentication b/include/tests_authentication index afaccd24..084f0eab 100644 --- a/include/tests_authentication +++ b/include/tests_authentication @@ -1209,22 +1209,23 @@ Register --test-no AUTH-9406 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Query LDAP servers in client configuration" if [ ${SKIPTEST} -eq 0 ]; then LogText "Test: checking ldap.conf options" - for I in ${LDAP_CONF_LOCATIONS}; do - LogText "Test: checking ${I}" - if [ -f ${I} ]; then - LogText "Result: file ${I} exists, LDAP being used" - LDAP_CLIENT_CONFIG_FILE="${I}" - LogText "Test: checking LDAP servers in file ${I}" - FIND2=`egrep "^host " ${I} | awk '{ print $2 }'` - for I in ${FIND2}; do - Display --indent 6 --text "LDAP server: ${I}" - LogText "Result: found LDAP server ${I}" - Report "ldap_server[]=${I}" + for FILE in ${LDAP_CONF_LOCATIONS}; do + LogText "Test: checking ${FILE}" + if [ -f ${FILE} ]; then + LogText "Result: file ${FILE} exists, LDAP being used" + LDAP_CLIENT_CONFIG_FILE="${FILE}" + LogText "Test: checking LDAP servers in file ${FILE}" + FIND=$(egrep "^host " ${FILE} | awk '{ print $2 }') + for SERVER in ${FIND}; do + Display --indent 6 --text "LDAP server: ${SERVER}" + LogText "Result: found LDAP server ${SERVER}" + Report "ldap_server[]=${SERVER}" done - else - LogText "Result: ${I} does NOT exist" + else + LogText "Result: ${FILE} does NOT exist" fi done + unset FILE FIND SERVER fi # ################################################################################# |