aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/user.cpp
diff options
context:
space:
mode:
authorVlad Yaroslavlev <vladon@vladon.com>2022-02-10 16:46:25 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:25 +0300
commit344ea37b4a345701ab0e67de2266a1c1bd7baf2d (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /util/system/user.cpp
parent706b83ed7de5a473436620367af31fc0ceecde07 (diff)
downloadydb-344ea37b4a345701ab0e67de2266a1c1bd7baf2d.tar.gz
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 2 of 2.
Diffstat (limited to 'util/system/user.cpp')
-rw-r--r--util/system/user.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/system/user.cpp b/util/system/user.cpp
index ac6772f458..83e89ea0a8 100644
--- a/util/system/user.cpp
+++ b/util/system/user.cpp
@@ -13,7 +13,7 @@
#include <unistd.h>
#endif
-TString GetUsername() {
+TString GetUsername() {
for (const auto& var : {"LOGNAME", "USER", "LNAME", "USERNAME"}) {
TString val = GetEnv(var);
if (val) {
@@ -32,13 +32,13 @@ TString GetUsername() {
else
ythrow TSystemError(err) << " GetUserName failed";
} else {
- return TString(nameBuf.Data(), (size_t)(len - 1));
+ return TString(nameBuf.Data(), (size_t)(len - 1));
}
#elif defined(_bionic_)
const passwd* pwd = getpwuid(geteuid());
if (pwd) {
- return TString(pwd->pw_name);
+ return TString(pwd->pw_name);
}
ythrow TSystemError() << TStringBuf(" getpwuid failed");