mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-27 15:54:09 +02:00
Solved null byte bash warning (#523)
This commit is contained in:
parent
2c9116dc0c
commit
94e4fb4bd9
@ -71,7 +71,7 @@
|
|||||||
case ${OS} in
|
case ${OS} in
|
||||||
"Linux")
|
"Linux")
|
||||||
if [ -f /proc/1/cmdline ]; then
|
if [ -f /proc/1/cmdline ]; then
|
||||||
FILENAME=$(${AWKBINARY} '/(^\/|init)/ { print $1 }' /proc/1/cmdline)
|
FILENAME=$(${AWKBINARY} '/(^\/|init)/ { print $1 }' /proc/1/cmdline | tr -d '\0')
|
||||||
LogText "Result: cmdline found = ${FILENAME}"
|
LogText "Result: cmdline found = ${FILENAME}"
|
||||||
ISFILE=$(echo ${FILENAME} | ${GREPBINARY} "^/")
|
ISFILE=$(echo ${FILENAME} | ${GREPBINARY} "^/")
|
||||||
if [ ! -z "${ISFILE}" ]; then
|
if [ ! -z "${ISFILE}" ]; then
|
||||||
|
@ -115,7 +115,7 @@
|
|||||||
TABLES="filter"
|
TABLES="filter"
|
||||||
for TABLE in ${TABLES}; do
|
for TABLE in ${TABLES}; do
|
||||||
LogText "Test: gathering information from table ${TABLE}"
|
LogText "Test: gathering information from table ${TABLE}"
|
||||||
FIND="$FIND""\n"$(${IPTABLESBINARY} -t ${TABLE} --numeric --list | ${EGREPBINARY} -z -o -w '[A-Z]+' | ${AWKBINARY} -v t=${TABLE} 'NR%2 {printf "%s %s ",t, $0 ; next;}1')
|
FIND="$FIND""\n"$(${IPTABLESBINARY} -t ${TABLE} --numeric --list | ${EGREPBINARY} -z -o -w '[A-Z]+' | tr -d '\0' | ${AWKBINARY} -v t=${TABLE} 'NR%2 {printf "%s %s ",t, $0 ; next;}1')
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "${FIND}" | while read line; do
|
echo "${FIND}" | while read line; do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user