mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-08 02:18:53 +00:00
Fix os_version detection for Ubuntu 16.04 (#2125)
This commit is contained in:
parent
37544138b5
commit
1cf80c9300
@ -36,10 +36,16 @@ const std::string kLinuxOSRegex =
|
||||
"\"";
|
||||
#else
|
||||
const std::string kLinuxOSRelease = "/etc/os-release";
|
||||
#ifdef UBUNTU_XENIAL
|
||||
const std::string kLinuxOSRegex =
|
||||
"VERSION=\"(?P<major>[0-9]+)\\.(?P<minor>[0-9]+)[\\.]{0,1}(?P<patch>[0-9]+)"
|
||||
"?.* \\((?P<name>[\\w ]*)\\)\"$";
|
||||
#else
|
||||
const std::string kLinuxOSRegex =
|
||||
"VERSION=\"(?P<major>[0-9]+)\\.(?P<minor>[0-9]+)[\\.]{0,1}(?P<patch>[0-9]+)"
|
||||
"?.*, (?P<name>[\\w ]*)\"$";
|
||||
#endif
|
||||
#endif
|
||||
|
||||
QueryData genOSVersion(QueryContext& context) {
|
||||
std::string content;
|
||||
|
Loading…
Reference in New Issue
Block a user