From 46bb5c32a5273b4c7c936569a4da3ca1ecc05ec8 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 29 Jun 2012 22:18:36 +0000 Subject: Allow UnixUser to be created with a std::string for C++ style. --- lib/common/UnixUser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/common/UnixUser.cpp') 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) -- cgit v1.2.3