From: Steve Langasek Date: Thu, 13 Sep 2001 20:03:25 +0000 (+0000) Subject: Relevant BUGIDs: 440107 X-Git-Tag: Linux-PAM-0-76~68 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6b86dbb45f8015e784da716fbaa044d153e73959;hp=55c3de6afdac8b957f705becadf83fffd17753cd;p=linux-pam 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. --- 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; } }