Update Server.cpp

This commit is contained in:
alexey-milovidov 2018-12-10 22:35:20 +03:00 committed by GitHub
parent 42de08f3b9
commit b56de46b79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,7 +90,8 @@ static std::string getCanonicalPath(std::string && path)
return std::move(path); return std::move(path);
} }
static std::string getUserName(uid_t user_id) { static std::string getUserName(uid_t user_id)
{
/// Try to convert user id into user name. /// Try to convert user id into user name.
auto buffer_size = sysconf(_SC_GETPW_R_SIZE_MAX); auto buffer_size = sysconf(_SC_GETPW_R_SIZE_MAX);
if (buffer_size <= 0) if (buffer_size <= 0)