LM (Linux): improve ssh version detection code

This commit is contained in:
Carter Li
2024-07-23 18:37:57 +08:00
parent 5b76a0b45a
commit fb03c95d68
+1 -2
View File
@@ -35,13 +35,12 @@ static const char* getSshdVersion(FFstrbuf* version)
{
const char* error = ffProcessAppendStdErr(version, (char* const[]) {
"sshd",
"-qv",
"-V",
NULL
});
if (error)
return error;
// unknown option -- v
// OpenSSH_9.0p1, OpenSSL 3.0.9 30 May 2023...
ffStrbufSubstrBeforeFirstC(version, ',');
ffStrbufSubstrAfterFirstC(version, '_');