diff options
author | Damien Miller <djm@mindrot.org> | 2000-12-20 03:34:48 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-12-20 03:34:48 +0100 |
commit | 82cf0ceea899d4c7a47bdec79eea6dc2a8576bc7 (patch) | |
tree | f9011833137c0c5589ebe0b5fb45da9ddc069bca /auth-pam.c | |
parent | - (bal) split CFLAGS into CFLAGS and CPPFLAGS in configure.in and Makefile. (diff) | |
download | openssh-82cf0ceea899d4c7a47bdec79eea6dc2a8576bc7.tar.xz openssh-82cf0ceea899d4c7a47bdec79eea6dc2a8576bc7.zip |
- (djm) Workaround PAM inconsistencies between Solaris derived PAM code
and Linux-PAM. Based on report and fix from Andrew Morgan
<morgan@transmeta.com>
Diffstat (limited to 'auth-pam.c')
-rw-r--r-- | auth-pam.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/auth-pam.c b/auth-pam.c index 1e077602e..07847cb9d 100644 --- a/auth-pam.c +++ b/auth-pam.c @@ -29,7 +29,7 @@ #include "xmalloc.h" #include "servconf.h" -RCSID("$Id: auth-pam.c,v 1.19 2000/12/03 00:51:51 djm Exp $"); +RCSID("$Id: auth-pam.c,v 1.20 2000/12/20 02:34:49 djm Exp $"); #define NEW_AUTHTOK_MSG \ "Warning: Your password has expired, please change it now" @@ -97,13 +97,13 @@ static int pamconv(int num_msg, const struct pam_message **msg, return PAM_CONV_ERR; for (count = 0; count < num_msg; count++) { - switch ((*msg)[count].msg_style) { + switch(PAM_MSG_MEMBER(msg, count, msg_style)) { case PAM_PROMPT_ECHO_ON: if (pamstate == INITIAL_LOGIN) { free(reply); return PAM_CONV_ERR; } else { - fputs((*msg)[count].msg, stderr); + fputs(PAM_MSG_MEMBER(msg, count, msg), stderr); fgets(buf, sizeof(buf), stdin); reply[count].resp = xstrdup(buf); reply[count].resp_retcode = PAM_SUCCESS; @@ -118,7 +118,7 @@ static int pamconv(int num_msg, const struct pam_message **msg, reply[count].resp = xstrdup(pampasswd); } else { reply[count].resp = - xstrdup(read_passphrase((*msg)[count].msg, 1)); + xstrdup(read_passphrase(PAM_MSG_MEMBER(msg, count, msg), 1)); } reply[count].resp_retcode = PAM_SUCCESS; break; @@ -126,9 +126,9 @@ static int pamconv(int num_msg, const struct pam_message **msg, case PAM_TEXT_INFO: if ((*msg)[count].msg != NULL) { if (pamstate == INITIAL_LOGIN) - pam_msg_cat((*msg)[count].msg); + pam_msg_cat(PAM_MSG_MEMBER(msg, count, msg)); else { - fputs((*msg)[count].msg, stderr); + fputs(PAM_MSG_MEMBER(msg, count, msg), stderr); fputs("\n", stderr); } } |