diff options
-rw-r--r-- | lib/common/UnixUser.cpp | 4 | ||||
-rw-r--r-- | lib/common/UnixUser.h | 2 |
2 files changed, 3 insertions, 3 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) diff --git a/lib/common/UnixUser.h b/lib/common/UnixUser.h index c895eb2a..dafe6aa7 100644 --- a/lib/common/UnixUser.h +++ b/lib/common/UnixUser.h @@ -13,7 +13,7 @@ class UnixUser { public: - UnixUser(const char *Username); + UnixUser(const std::string& Username); UnixUser(uid_t UID, gid_t GID); ~UnixUser(); private: |