- (djm) Merge patch from Tim Waugh (via Nalin Dahyabhai <nalin@redhat.com>)
   to fix NULL pointer deref and fake authloop breakage in PAM code.
diff --git a/auth2.c b/auth2.c
index 348c2f3..bab1c2e 100644
--- a/auth2.c
+++ b/auth2.c
@@ -210,10 +210,13 @@
 			authctxt->valid = 1;
 			debug2("input_userauth_request: setting up authctxt for %s", user);
 #ifdef USE_PAM
-			start_pam(pw);
+			start_pam(pw->pw_name);
 #endif
 		} else {
 			log("input_userauth_request: illegal user %s", user);
+#ifdef USE_PAM
+			start_pam("NOUSER");
+#endif
 		}
 		authctxt->user = xstrdup(user);
 		authctxt->service = xstrdup(service);