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.
#include <shadow.h>
#include <limits.h>
#include <utmp.h>
+#include <errno.h>
#include <security/_pam_macros.h>
#include <security/pam_modules.h>
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;
}
}