mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-27 07:44:14 +02:00
commit
87fef1c27b
@ -313,6 +313,16 @@ unset LANG
|
|||||||
XARGSBINARY=""
|
XARGSBINARY=""
|
||||||
YUMBINARY=""
|
YUMBINARY=""
|
||||||
ZYPPERBINARY=""
|
ZYPPERBINARY=""
|
||||||
|
|
||||||
|
# == Variables for strict mode ==
|
||||||
|
IFCONFIGBINARY=""
|
||||||
|
LOCATEBINARY=""
|
||||||
|
SEARCH_VERSION=""
|
||||||
|
SHA1SUMBINARY=""
|
||||||
|
SHA256SUMBINARY=""
|
||||||
|
OPENSSLBINARY=""
|
||||||
|
LICENSE_KEY=""
|
||||||
|
|
||||||
#
|
#
|
||||||
#################################################################################
|
#################################################################################
|
||||||
#
|
#
|
||||||
|
@ -1400,7 +1400,8 @@
|
|||||||
# AIX does not fully support pgrep options, so using ps instead
|
# AIX does not fully support pgrep options, so using ps instead
|
||||||
if [ -n "${PGREPBINARY}" -a ! "${OS}" = "AIX" ]; then
|
if [ -n "${PGREPBINARY}" -a ! "${OS}" = "AIX" ]; then
|
||||||
# When --user is used, perform a search using the -u option
|
# When --user is used, perform a search using the -u option
|
||||||
if [ -n "${users}" ]; then
|
# Initialize users for strict mode
|
||||||
|
if [ -n "${users:-}" ]; then
|
||||||
for u in "${users}"; do
|
for u in "${users}"; do
|
||||||
user_uid=$(getent passwd ${u} 2> /dev/null | ${AWKBINARY} -F: '{print $3}')
|
user_uid=$(getent passwd ${u} 2> /dev/null | ${AWKBINARY} -F: '{print $3}')
|
||||||
# Only perform search if user exists and we had no match yet
|
# Only perform search if user exists and we had no match yet
|
||||||
@ -2641,8 +2642,9 @@
|
|||||||
|
|
||||||
# Log exceptions
|
# Log exceptions
|
||||||
ReportException() {
|
ReportException() {
|
||||||
Report "exception_event[]=$1|$2|"
|
# Allow this function with only 1 parameter in strict mode with ${2-Text}
|
||||||
LogText "Exception: test has an exceptional event ($1) with text $2"
|
Report "exception_event[]=$1|${2-NoInfo}|"
|
||||||
|
LogText "Exception: test has an exceptional event ($1) with text ${2-NoText}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user