From 4a1ada604c725e1fdad9d6a775917595594cf918 Mon Sep 17 00:00:00 2001 From: Carter Li Date: Fri, 6 Jun 2025 14:33:29 +0800 Subject: [PATCH] Host (Linux): more detailed info of WSL --- src/detection/host/host_linux.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/detection/host/host_linux.c b/src/detection/host/host_linux.c index 2ed4d71ad..98349a642 100644 --- a/src/detection/host/host_linux.c +++ b/src/detection/host/host_linux.c @@ -77,10 +77,11 @@ const char* ffDetectHost(FFHostResult* host) //On WSL, the real host can't be detected. Instead use WSL as host. if(wslDistroName != NULL || getenv("WSL_DISTRO") != NULL || getenv("WSL_INTEROP") != NULL) { - ffStrbufAppendS(&host->name, "Windows Subsystem for Linux"); + ffStrbufSetStatic(&host->name, "Windows Subsystem for Linux"); if (wslDistroName) ffStrbufAppendF(&host->name, " - %s", wslDistroName); - ffStrbufAppendS(&host->family, "WSL"); + ffStrbufSetStatic(&host->family, "WSL"); + ffStrbufSetStatic(&host->vendor, "Microsoft Corporation"); if (instance.config.general.detectVersion) {