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
This commit is contained in:
ggtakec@gmail.com 2013-04-11 02:37:25 +00:00
parent f002cdb9b2
commit edadbe86d8

View File

@ -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);
}