summaryrefslogtreecommitdiff
path: root/security/PAM/patches/patch-as
diff options
context:
space:
mode:
Diffstat (limited to 'security/PAM/patches/patch-as')
-rw-r--r--security/PAM/patches/patch-as32
1 files changed, 32 insertions, 0 deletions
diff --git a/security/PAM/patches/patch-as b/security/PAM/patches/patch-as
new file mode 100644
index 00000000000..2af7b25fe24
--- /dev/null
+++ b/security/PAM/patches/patch-as
@@ -0,0 +1,32 @@
+$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 <unistd.h>
+ #include <sys/types.h>
+ #include <pwd.h>
++#ifdef HAVE_SHADOW_H
+ #include <shadow.h>
++#endif
+ #include <signal.h>
+
+ #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");