Quote binary variables during SUID/GID enumeration

Fixes cisofy/lynis#1078.

Signed-off-by: Simon Biewald <sbiewald@fam-biewald.de>
This commit is contained in:
Simon Biewald 2020-11-21 01:17:49 +01:00
parent 22a9fe7037
commit f695488ca8
1 changed files with 2 additions and 2 deletions

View File

@ -119,11 +119,11 @@
COUNT=$((COUNT + 1))
BINARY="${SCANDIR}/${FILENAME}"
DISCOVERED_BINARIES="${DISCOVERED_BINARIES}${BINARY} "
if [ -u ${BINARY} ]; then
if [ -u "${BINARY}" ]; then
NSUID_BINARIES=$((NSUID_BINARIES + 1))
SUID_BINARIES="${SUID_BINARIES}${BINARY} "
fi
if [ -g ${BINARY} ]; then
if [ -g "${BINARY}" ]; then
NSGID_BINARIES=$((NSGID_BINARIES + 1))
SGID_BINARIES="${SGID_BINARIES}${BINARY} "
fi