summaryrefslogtreecommitdiffstats
path: root/auth-pam.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-12-20 13:34:48 +1100
committerDamien Miller <djm@mindrot.org>2000-12-20 13:34:48 +1100
commit82cf0ceea899d4c7a47bdec79eea6dc2a8576bc7 (patch)
treef9011833137c0c5589ebe0b5fb45da9ddc069bca /auth-pam.c
parent28bfc0da69166bc1afe33cfb1a61dadce01169e2 (diff)
- (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.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/auth-pam.c b/auth-pam.c
index 1e077602..07847cb9 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);
}
}