From 6b86dbb45f8015e784da716fbaa044d153e73959 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Thu, 13 Sep 2001 20:03:25 +0000 Subject: [PATCH 1/1] Relevant BUGIDs: 440107 Purpose of commit: module reentrancy Commit summary: --------------- Commit sample code that uses getpwnam_r instead of getpwnam. All code is #ifdef'ed out right now. --- modules/pam_unix/support.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/pam_unix/support.c b/modules/pam_unix/support.c index 61915e57..6b8b8020 100644 --- a/modules/pam_unix/support.c +++ b/modules/pam_unix/support.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -346,7 +347,7 @@ int _unix_blankpasswd(unsigned int ctrl, const char *name) while (retval == ERANGE) { bufsize += 1024; buf = realloc(buf, bufsize); - if ((retval getpwnam_r(name, pwd, buf, bufsize, &pwd))) { + if ((retval = getpwnam_r(name, pwd, buf, bufsize, &pwd))) { pwd = NULL; } } -- 2.40.0