aboutsummaryrefslogtreecommitdiff
path: root/modules/pam_unix/passverify.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pam_unix/passverify.c')
-rw-r--r--modules/pam_unix/passverify.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/modules/pam_unix/passverify.c b/modules/pam_unix/passverify.c
index c48e3c5a..c6515a65 100644
--- a/modules/pam_unix/passverify.c
+++ b/modules/pam_unix/passverify.c
@@ -1190,16 +1190,12 @@ char *
getuidname(uid_t uid)
{
struct passwd *pw;
- static char username[256];
pw = getpwuid(uid);
if (pw == NULL)
return NULL;
- strncpy(username, pw->pw_name, sizeof(username));
- username[sizeof(username) - 1] = '\0';
-
- return username;
+ return pw->pw_name;
}
#endif