Remove data after "-" when using uname (which could theoretically be

used to identify a system).
This commit is contained in:
hiker 2014-10-10 09:40:19 +11:00
parent 3877bf1dab
commit a5ad78654e

View File

@ -175,7 +175,10 @@ void determineOSVersion()
m_os_version = "Linux unknown";
return;
}
m_os_version = std::string(u.sysname) + " " + u.release;
// Ignore data after "-", since it could identify a system (self compiled
// kernels).
std::vector<std::string> l = StringUtils::split(std::string(u.release),'-');
m_os_version = std::string(u.sysname) + " " + l[0];
#endif
@ -186,7 +189,10 @@ void determineOSVersion()
m_os_version = "BSD unknown";
return;
}
m_os_version = std::string(u.sysname) + " " + u.release;
// Ignore data after "-", since it could identify a system (self compiled
// kernels).
std::vector<std::string> l = StringUtils::split(std::string(u.release),'-');
m_os_version = std::string(u.sysname) + " " + l[0];
#endif
#ifdef WIN32