return assignToString(result, length, res);
}
+void Socket2Id::mapToDomainLabel(std::string &label)
+{
+ static const std::string subdomainSep = "::";
+ static const auto systemLabelLen = strlen(OWNER_ID_SYSTEM);
+
+ if (label.length() > systemLabelLen + subdomainSep.length() &&
+ label.compare(0, systemLabelLen, OWNER_ID_SYSTEM) == 0 &&
+ label.compare(systemLabelLen, subdomainSep.length(), subdomainSep) == 0) {
+ label = OWNER_ID_SYSTEM;
+ }
+}
+
void Socket2Id::resetCache()
{
m_stringMap.clear();
private:
int getCredentialsFromSocket(int sock, std::string &res);
+ void mapToDomainLabel(std::string &label);
typedef std::map<std::string, std::string> StringMap;
StringMap m_stringMap;