fix(ssb): fix error when no process uses prctl to set ssb mitigation

fixes #281
This commit is contained in:
Stéphane Lesimple 2019-05-13 15:35:58 +02:00
parent d187827841
commit d547ce4ab4

View File

@ -3619,7 +3619,7 @@ check_CVE_2018_3639_linux()
if [ "$kernel_ssbd_enabled" = 1 ]; then
_info_nol "* SSB mitigation currently active for selected processes: "
mitigated_processes=$(grep -El 'Speculation.?Store.?Bypass:[[:space:]]+thread (force )?mitigated' /proc/*/status \
| sed s/status/exe/ | xargs -n1 readlink -f | xargs -n1 basename | sort -u | tr "\n" " " | sed 's/ $//')
| sed s/status/exe/ | xargs -r -n1 readlink -f | xargs -r -n1 basename | sort -u | tr "\n" " " | sed 's/ $//')
if [ -n "$mitigated_processes" ]; then
pstatus green YES "$mitigated_processes"
else