$NetBSD: patch-ar,v 1.1.1.1 2000/10/21 18:41:54 rh Exp $

--- modules/pam_unix/unix_chkpwd.c.orig	Sat Oct 21 14:30:41 2000
+++ modules/pam_unix/unix_chkpwd.c
@@ -26,8 +26,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 */
@@ -98,6 +101,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,
@@ -124,6 +130,7 @@
 				salt = x_strdup(pwd->pw_passwd);
 			}
 		}
+#endif
 	}
 	if (pwd == NULL || salt == NULL) {
 		_log_err(LOG_ALERT, "check pass; user unknown");
