Open fullofentropy opened 7 months ago
Thanks for reporting.
So in your case:
Is that correct?
Do you have zgrep installed/available in your path? It doesn't make sense for the ReportException message text to use GREPTOOL
, because it's blank (that's the only way that check would fall). Even GREPBINARY
is technically wrong, since GREPTOOL
might not be set to that.
Since you said LINUXCONFIGFILE_ZIPPED
is 1, it tries to set GREPTOOL
to ZGREPBINARY
, which means ZGREPBINARY
is blank, and it shows the exception.
Your ultimate issue is zgrep can't be found, which is required to search the compressed Linux config file.
Describe the bug Function/test: [KRNL-5730] produces an exception. Error message from exception is incorrect:
Message: No valid /bin/grep tool found to search kernel settings
A valid /bin/grep tool does exist on the system. When looking at the source searching "KRNL-5730" the following flow is done incorrectly:
Version
Expected behavior No exception expected, error should be properly handled.
Output If applicable, add output that you get from the tool or the related section of lynis.log 18:26:05 [+] Kernel 18:26:05 ------------------------------------ 18:26:05 - Checking default run level [ 3 ] 18:26:05 - Checking kernel version and release [ DONE ] 18:26:06 - Checking kernel type [ DONE ] 18:26:06 - Checking loaded kernel modules [ DONE ] 18:26:06 - Checking Linux kernel configuration file [ FOUND ] 18:26:06 18:26:06 ================================================================= 18:26:06 18:26:06 Exception found! 18:26:06 18:26:06 Function/test: [KRNL-5730] 18:26:06 Message: No valid /bin/grep tool found to search kernel settings 18:26:06
Additional context