summaryrefslogtreecommitdiff
path: root/auth-pam.c
diff options
context:
space:
mode:
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 1e077602e..07847cb9d 100644
--- a/auth-pam.c
+++ b/auth-pam.c
@@ -29,7 +29,7 @@
29#include "xmalloc.h" 29#include "xmalloc.h"
30#include "servconf.h" 30#include "servconf.h"
31 31
32RCSID("$Id: auth-pam.c,v 1.19 2000/12/03 00:51:51 djm Exp $"); 32RCSID("$Id: auth-pam.c,v 1.20 2000/12/20 02:34:49 djm Exp $");
33 33
34#define NEW_AUTHTOK_MSG \ 34#define NEW_AUTHTOK_MSG \
35 "Warning: Your password has expired, please change it now" 35 "Warning: Your password has expired, please change it now"
@@ -97,13 +97,13 @@ static int pamconv(int num_msg, const struct pam_message **msg,
97 return PAM_CONV_ERR; 97 return PAM_CONV_ERR;
98 98
99 for (count = 0; count < num_msg; count++) { 99 for (count = 0; count < num_msg; count++) {
100 switch ((*msg)[count].msg_style) { 100 switch(PAM_MSG_MEMBER(msg, count, msg_style)) {
101 case PAM_PROMPT_ECHO_ON: 101 case PAM_PROMPT_ECHO_ON:
102 if (pamstate == INITIAL_LOGIN) { 102 if (pamstate == INITIAL_LOGIN) {
103 free(reply); 103 free(reply);
104 return PAM_CONV_ERR; 104 return PAM_CONV_ERR;
105 } else { 105 } else {
106 fputs((*msg)[count].msg, stderr); 106 fputs(PAM_MSG_MEMBER(msg, count, msg), stderr);
107 fgets(buf, sizeof(buf), stdin); 107 fgets(buf, sizeof(buf), stdin);
108 reply[count].resp = xstrdup(buf); 108 reply[count].resp = xstrdup(buf);
109 reply[count].resp_retcode = PAM_SUCCESS; 109 reply[count].resp_retcode = PAM_SUCCESS;
@@ -118,7 +118,7 @@ static int pamconv(int num_msg, const struct pam_message **msg,
118 reply[count].resp = xstrdup(pampasswd); 118 reply[count].resp = xstrdup(pampasswd);
119 } else { 119 } else {
120 reply[count].resp = 120 reply[count].resp =
121 xstrdup(read_passphrase((*msg)[count].msg, 1)); 121 xstrdup(read_passphrase(PAM_MSG_MEMBER(msg, count, msg), 1));
122 } 122 }
123 reply[count].resp_retcode = PAM_SUCCESS; 123 reply[count].resp_retcode = PAM_SUCCESS;
124 break; 124 break;
@@ -126,9 +126,9 @@ static int pamconv(int num_msg, const struct pam_message **msg,
126 case PAM_TEXT_INFO: 126 case PAM_TEXT_INFO:
127 if ((*msg)[count].msg != NULL) { 127 if ((*msg)[count].msg != NULL) {
128 if (pamstate == INITIAL_LOGIN) 128 if (pamstate == INITIAL_LOGIN)
129 pam_msg_cat((*msg)[count].msg); 129 pam_msg_cat(PAM_MSG_MEMBER(msg, count, msg));
130 else { 130 else {
131 fputs((*msg)[count].msg, stderr); 131 fputs(PAM_MSG_MEMBER(msg, count, msg), stderr);
132 fputs("\n", stderr); 132 fputs("\n", stderr);
133 } 133 }
134 } 134 }