mirror of https://github.com/CISOfy/lynis.git
Merge pull request #871 from bginsbach/fix-find-not
Fix uses of non-standard find not operator
This commit is contained in:
commit
357b059c12
|
@ -677,7 +677,7 @@
|
||||||
LogText "Result: directory /etc/pam.d exists"
|
LogText "Result: directory /etc/pam.d exists"
|
||||||
Display --indent 2 --text "- PAM configuration files (pam.d)" --result "${STATUS_FOUND}" --color GREEN
|
Display --indent 2 --text "- PAM configuration files (pam.d)" --result "${STATUS_FOUND}" --color GREEN
|
||||||
LogText "Test: searching PAM configuration files"
|
LogText "Test: searching PAM configuration files"
|
||||||
FIND=$(${FINDBINARY} ${ROOTDIR}etc/pam.d -not -name "*.pam-old" -type f -print | sort)
|
FIND=$(${FINDBINARY} ${ROOTDIR}etc/pam.d \! -name "*.pam-old" -type f -print | sort)
|
||||||
for FILE in ${FIND}; do
|
for FILE in ${FIND}; do
|
||||||
LogText "Found file: ${FILE}"
|
LogText "Found file: ${FILE}"
|
||||||
done
|
done
|
||||||
|
|
|
@ -77,12 +77,12 @@
|
||||||
if [ -d ${PAM_DIRECTORY} ]; then
|
if [ -d ${PAM_DIRECTORY} ]; then
|
||||||
LogText "Result: ${PAM_DIRECTORY} exists"
|
LogText "Result: ${PAM_DIRECTORY} exists"
|
||||||
if [ ! "${OS}" = "FreeBSD" -a ! "${OS}" = "NetBSD" ]; then
|
if [ ! "${OS}" = "FreeBSD" -a ! "${OS}" = "NetBSD" ]; then
|
||||||
FIND_FILES=$(find ${PAM_DIRECTORY} -not -name "*.pam-old" -type f -print)
|
FIND_FILES=$(find ${PAM_DIRECTORY} \! -name "*.pam-old" -type f -print)
|
||||||
else
|
else
|
||||||
if [ -f ${PAM_DIRECTORY}/README ]; then
|
if [ -f ${PAM_DIRECTORY}/README ]; then
|
||||||
LogText "Skipped checking ${OS} ${PAM_DIRECTORY}/README as a PAM file"
|
LogText "Skipped checking ${OS} ${PAM_DIRECTORY}/README as a PAM file"
|
||||||
fi
|
fi
|
||||||
FIND_FILES=$(find ${PAM_DIRECTORY} -not -name "README" -not -name "*.pam-old" -type f -print)
|
FIND_FILES=$(find ${PAM_DIRECTORY} \! -name "README" \! -name "*.pam-old" -type f -print)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for PAM_FILE in ${FIND_FILES}; do
|
for PAM_FILE in ${FIND_FILES}; do
|
||||||
|
|
Loading…
Reference in New Issue