mirror of
https://github.com/CISOfy/lynis.git
synced 2025-04-08 17:15:25 +02:00
Allow for files with spaces
This commit is contained in:
parent
61d28ac73c
commit
2451029a6e
@ -699,15 +699,15 @@
|
||||
file=$1
|
||||
find=""
|
||||
if [ ! -z "${DPKGBINARY}" ]; then
|
||||
find=$(${DPKGBINARY} -S ${file} 2> /dev/null | ${AWKBINARY} -F: '{print $1}')
|
||||
find=$(${DPKGBINARY} -S "${file}" 2> /dev/null | ${AWKBINARY} -F: '{print $1}')
|
||||
elif [ ! -z "${RPMBINARY}" ]; then
|
||||
find=$(${RPMBINARY} -qf ${file} 2> /dev/null | ${AWKBINARY} -F- '{print $1}')
|
||||
find=$(${RPMBINARY} -qf "${file}" 2> /dev/null | ${AWKBINARY} -F- '{print $1}')
|
||||
fi
|
||||
if [ ! -z "${find}" ]; then
|
||||
LogText "Result: file ${file} belongs to package (${find})"
|
||||
LogText "Result: file '${file}' belongs to package (${find})"
|
||||
exitcode=0
|
||||
else
|
||||
LogText "Result: file ${file} does most likely not belong to a package"
|
||||
LogText "Result: file '${file}' does most likely not belong to a package"
|
||||
fi
|
||||
return ${exitcode}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user