mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-31 01:34:23 +02:00
Try creating a temporary log and report file in unprivileged mode
This commit is contained in:
parent
73bcfccd20
commit
d4f71e6d42
9
lynis
9
lynis
@ -195,9 +195,14 @@ Make sure to execute ${PROGRAM_NAME} from untarred directory or check your insta
|
||||
# Disable logging if no alternative was provided
|
||||
if [ ${PRIVILEGED} -eq 0 ]; then
|
||||
if [ "${LOGFILE}" = "" ]; then
|
||||
LOGFILE="/dev/null"
|
||||
# Try creating a log file in temporary directory
|
||||
touch /tmp/lynis.log
|
||||
if [ $? -eq 0 ]; then LOGFILE="/tmp/lynis.log"; else LOGFILE="/dev/null"; fi
|
||||
fi
|
||||
if [ "${REPORTFILE}" = "" ]; then
|
||||
touch /tmp/lynis-report.dat
|
||||
if [ $? -eq 0 ]; then REPORTFILE="/tmp/lynis-report.dat"; else REPORTFILE="/dev/null"; fi
|
||||
fi
|
||||
if [ "${REPORTFILE}" = "" ]; then REPORTFILE="/dev/null"; fi
|
||||
fi
|
||||
#
|
||||
#################################################################################
|
||||
|
Loading…
x
Reference in New Issue
Block a user