$NetBSD: patch-as,v 1.3 2002/12/23 21:24:00 jlam Exp $ --- modules/pam_unix/unix_chkpwd.c.orig Mon Sep 23 13:33:22 2002 +++ modules/pam_unix/unix_chkpwd.c @@ -29,7 +29,9 @@ #include #include #include +#ifdef HAVE_SHADOW_H #include +#endif #include #define MAXPASS 200 /* the maximum length of a password */ @@ -101,6 +103,7 @@ static int _unix_verify_password(const c pwd = getpwnam(name); /* Get password file entry... */ endpwent(); if (pwd != NULL) { +#ifdef HAVE_GETSPNAM if (strcmp(pwd->pw_passwd, "x") == 0) { /* * ...and shadow password file entry for this user, @@ -127,6 +130,9 @@ static int _unix_verify_password(const c salt = x_strdup(pwd->pw_passwd); } } +#else + salt = x_strdup(pwd->pw_passwd); +#endif } if (pwd == NULL || salt == NULL) { _log_err(LOG_ALERT, "check pass; user unknown");