summaryrefslogtreecommitdiff
path: root/lib/common/UnixUser.cpp
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2012-06-29 22:18:36 +0000
committerChris Wilson <chris+github@qwirx.com>2012-06-29 22:18:36 +0000
commit46bb5c32a5273b4c7c936569a4da3ca1ecc05ec8 (patch)
tree9fbc79c460c3fc13410eee52edcbad34ba104289 /lib/common/UnixUser.cpp
parenta9e867a2392349a76b3dbac30b3b85b22b478579 (diff)
Allow UnixUser to be created with a std::string for C++ style.
Diffstat (limited to 'lib/common/UnixUser.cpp')
-rw-r--r--lib/common/UnixUser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/common/UnixUser.cpp b/lib/common/UnixUser.cpp
index f81b474c..32acacfa 100644
--- a/lib/common/UnixUser.cpp
+++ b/lib/common/UnixUser.cpp
@@ -31,13 +31,13 @@
// Created: 21/1/04
//
// --------------------------------------------------------------------------
-UnixUser::UnixUser(const char *Username)
+UnixUser::UnixUser(const std::string& Username)
: mUID(0),
mGID(0),
mRevertOnDestruction(false)
{
// Get password info
- struct passwd *pwd = ::getpwnam(Username);
+ struct passwd *pwd = ::getpwnam(Username.c_str());
if(pwd == 0)
{
THROW_EXCEPTION(CommonException, CouldNotLookUpUsername)