From edadbe86d860cb502b6a3bc3ea923f837e9e2986 Mon Sep 17 00:00:00 2001 From: "ggtakec@gmail.com" Date: Thu, 11 Apr 2013 02:37:25 +0000 Subject: [PATCH] Fixed issue: 328 1) Changes for fixing a bug(Issue 328) The return value in get_username() function is wrong value(NULL) when there is not user id in passwd file. git-svn-id: http://s3fs.googlecode.com/svn/trunk@404 df820570-a93a-0410-bd06-b72b767a4274 --- src/s3fs_util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/s3fs_util.cpp b/src/s3fs_util.cpp index b2149a7..5914e39 100644 --- a/src/s3fs_util.cpp +++ b/src/s3fs_util.cpp @@ -304,7 +304,7 @@ string get_username(uid_t uid) if(NULL == (ppw = getpwuid(uid)) || NULL == ppw->pw_name){ FGPRINT(" could not get username(errno=%d).\n", (int)errno); SYSLOGDBG("could not get username(errno=%d).\n", (int)errno); - return NULL; + return string(""); } return string(ppw->pw_name); }