From 09193d8ba95023f8af7db0649f3f31420c80e56a Mon Sep 17 00:00:00 2001 From: mboelen Date: Thu, 3 Mar 2016 12:48:42 +0100 Subject: [PATCH] Add support for FreeBSD to detect PAM files --- include/tests_authentication | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/tests_authentication b/include/tests_authentication index e9c0b8bf..ad815b31 100644 --- a/include/tests_authentication +++ b/include/tests_authentication @@ -21,7 +21,7 @@ LDAP_AUTH_ENABLED=0 LDAP_PAM_ENABLED=0 LDAP_CONF_LOCATIONS="/etc/ldap.conf /etc/ldap/ldap.conf /etc/openldap/ldap.conf /usr/local/etc/ldap.conf /usr/local/etc/openldap/ldap.conf" - PAM_FILE_LOCATIONS="/lib/i386-linux-gnu/security /lib/security /lib/x86_64-linux-gnu/security /lib64/security /usr/lib/security" + PAM_FILE_LOCATIONS="/lib/i386-linux-gnu/security /lib/security /lib/x86_64-linux-gnu/security /lib64/security /usr/lib /usr/lib/security" SUDOERS_LOCATIONS="/etc/sudoers /usr/local/etc/sudoers /usr/pkg/etc/sudoers" SUDOERS_FILE="" # @@ -549,7 +549,7 @@ # # Test : AUTH-9268 # Description : Searching available PAM files - # Notes : PAM is used on AIX, Linux, HPUX, Solaris + # Notes : PAM is used on AIX, FreeBSD, Linux, HPUX, Solaris if [ ${OS} = "AIX" -o ${OS} = "Linux" -o ${OS} = "HPUX" -o ${OS} = "Solaris" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi Register --test-no AUTH-9268 --preqs-met ${PREQS_MET} --weight L --network NO --description "Checking presence pam.d files" if [ ${SKIPTEST} -eq 0 ]; then @@ -559,7 +559,8 @@ LogText "Test: Checking ${I}" if [ -d ${I} -a ! -L ${I} ]; then LogText "Result: directory ${I} exists" - FIND=`find ${I} -type f -name "*.so" -print | sort` + # Search in the specified directory + FIND=`find ${I} -maxdepth 1 -type f -name "pam_*.so" -print | sort` if [ ! "${FIND}" = "" ]; then FOUND=1; fi for I in ${FIND}; do LogText "Found file: ${I}"