diff --git a/src/detection/tpm/tpm_bsd.c b/src/detection/tpm/tpm_bsd.c index ffaf0009b..f51adb8ad 100644 --- a/src/detection/tpm/tpm_bsd.c +++ b/src/detection/tpm/tpm_bsd.c @@ -1,10 +1,16 @@ #include "tpm.h" #include "common/sysctl.h" +#include +#include + const char* ffDetectTPM(FFTPMResult* result) { if (ffSysctlGetString("dev.tpmcrb.0.%desc", &result->description) != NULL) - return "TPM device is not found or TPM kernel module is not loaded"; + { + if (modfind("tpm") < 0) return "TPM kernel module is not loaded"; + return "TPM device is not found"; + } if (ffStrbufContainS(&result->description, "2.0")) ffStrbufSetStatic(&result->version, "2.0");