From 2e22b5f601becb7be140a7442f842ed550f7c6f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Thu, 15 Jun 2023 10:08:10 +0800 Subject: [PATCH] Host (FreeBSD): actually support --- src/detection/host/host_bsd.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/detection/host/host_bsd.c b/src/detection/host/host_bsd.c index d4b99e952..dcbd5006b 100644 --- a/src/detection/host/host_bsd.c +++ b/src/detection/host/host_bsd.c @@ -1,5 +1,5 @@ #include "host.h" -#include "common/sysctl.h" +#include "common/settings.h" const char* ffDetectHost(FFHostResult* host) { @@ -8,6 +8,11 @@ const char* ffDetectHost(FFHostResult* host) ffStrbufInit(&host->productVersion); ffStrbufInit(&host->productSku); ffStrbufInit(&host->sysVendor); + ffSettingsGetFreeBSDKenv("smbios.system.product", &host->productName); + ffSettingsGetFreeBSDKenv("smbios.system.family", &host->productFamily); + ffSettingsGetFreeBSDKenv("smbios.system.version", &host->productVersion); + ffSettingsGetFreeBSDKenv("smbios.system.sku", &host->productSku); + ffSettingsGetFreeBSDKenv("smbios.system.maker", &host->sysVendor); - return ffSysctlGetString("hw.fdt.model", &host->productName); + return NULL; }