You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The test for TraceEnable in Apache (HTTP-6660) has a comparison that is invalid in Dash (the default for /bin/sh in Debian-based distros). This is due to the way it does the string comparisons to try to compensate for an empty string (are there still shells around that need to do that?).
Line 325 in include/tests_webservers:
TRACEENABLED_SETTING=$( echo ${TRACEENABLE} | tr 'A-Z' 'a-z' )
if [ x${TRACEENABLED_SETTING} == x'off' ]; then
...
else
...
fi
It leads to this error:
./lynis: 326: [: xoff: unexpected operator
Since I'm not sure which old/obscure shells out there can't process an empty string as a parameter when in quotes, I kept the extra "x" and just wrapped the quotes properly.
Version
Describe the bug
The test for TraceEnable in Apache (HTTP-6660) has a comparison that is invalid in Dash (the default for /bin/sh in Debian-based distros). This is due to the way it does the string comparisons to try to compensate for an empty string (are there still shells around that need to do that?).
Line 325 in include/tests_webservers:
It leads to this error:
Since I'm not sure which old/obscure shells out there can't process an empty string as a parameter when in quotes, I kept the extra "x" and just wrapped the quotes properly.
PR is here: #1536
The text was updated successfully, but these errors were encountered: