]> granicus.if.org Git - linux-pam/commitdiff
Relevant BUGIDs: 440107
authorSteve Langasek <vorlon@debian.org>
Thu, 13 Sep 2001 20:03:25 +0000 (20:03 +0000)
committerSteve Langasek <vorlon@debian.org>
Thu, 13 Sep 2001 20:03:25 +0000 (20:03 +0000)
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

index 61915e57156961ef0d699bacb5997031adcd114c..6b8b8020b1fac85f882a7d1ae72ef5e678c82a0d 100644 (file)
@@ -15,6 +15,7 @@
 #include <shadow.h>
 #include <limits.h>
 #include <utmp.h>
+#include <errno.h>
 
 #include <security/_pam_macros.h>
 #include <security/pam_modules.h>
@@ -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;
                }
        }