$NetBSD: patch-ar,v 1.2 2002/01/29 17:10:11 jlam Exp $

--- modules/pam_unix/unix_chkpwd.c.orig	Sun Feb 11 01:33:53 2001
+++ modules/pam_unix/unix_chkpwd.c
@@ -22,8 +22,11 @@
 #include <syslog.h>
 #include <unistd.h>
 #include <sys/types.h>
+#include <sys/param.h>
 #include <pwd.h>
+#ifndef BSD
 #include <shadow.h>
+#endif
 #include <signal.h>
 
 #define MAXPASS		200	/* the maximum length of a password */
@@ -94,6 +97,9 @@
 	pwd = getpwnam(name);	/* Get password file entry... */
 	endpwent();
 	if (pwd != NULL) {
+#ifdef BSD
+		salt = x_strdup(pwd->pw_passwd);
+#else
 		if (strcmp(pwd->pw_passwd, "x") == 0) {
 			/*
 			 * ...and shadow password file entry for this user,
@@ -120,6 +126,7 @@
 				salt = x_strdup(pwd->pw_passwd);
 			}
 		}
+#endif
 	}
 	if (pwd == NULL || salt == NULL) {
 		_log_err(LOG_ALERT, "check pass; user unknown");
