fix: improve mariadb binary classifer to detect older versions (#3339)

With older versions of mariadb the binary name was `mysql`, so this
adjusts the binary classifier to additionally search for the expected
version pattern in `mysql` binaries.

Signed-off-by: Weston Steimel <commits@weston.slmail.me>
This commit is contained in:
Weston Steimel 2024-10-16 16:43:50 +00:00 committed by GitHub
parent 754cebee64
commit d7194bb00f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -351,7 +351,7 @@ func DefaultClassifiers() []Classifier {
},
{
Class: "mariadb-binary",
FileGlob: "**/mariadb",
FileGlob: "**/{mariadb,mysql}",
EvidenceMatcher: FileContentsVersionMatcher(
// 10.6.15-MariaDB
`(?m)(?P<version>[0-9]+(\.[0-9]+)?(\.[0-9]+)?(alpha[0-9]|beta[0-9]|rc[0-9])?)-MariaDB`),