|
Lines 131-137
Link Here
|
| 131 |
* Conversation function for authentication thread. |
131 |
* Conversation function for authentication thread. |
| 132 |
*/ |
132 |
*/ |
| 133 |
static int |
133 |
static int |
| 134 |
sshpam_thread_conv(int n, const struct pam_message **msg, |
134 |
sshpam_thread_conv(int n, struct pam_message **msg, |
| 135 |
struct pam_response **resp, void *data) |
135 |
struct pam_response **resp, void *data) |
| 136 |
{ |
136 |
{ |
| 137 |
Buffer buffer; |
137 |
Buffer buffer; |
|
Lines 203-209
Link Here
|
| 203 |
#ifndef USE_POSIX_THREADS |
203 |
#ifndef USE_POSIX_THREADS |
| 204 |
const char *pam_user; |
204 |
const char *pam_user; |
| 205 |
|
205 |
|
| 206 |
pam_get_item(sshpam_handle, PAM_USER, (const void **)&pam_user); |
206 |
pam_get_item(sshpam_handle, PAM_USER, (void **)&pam_user); |
| 207 |
setproctitle("%s [pam]", pam_user); |
207 |
setproctitle("%s [pam]", pam_user); |
| 208 |
#endif |
208 |
#endif |
| 209 |
|
209 |
|
|
Lines 245-251
Link Here
|
| 245 |
} |
245 |
} |
| 246 |
|
246 |
|
| 247 |
static int |
247 |
static int |
| 248 |
sshpam_null_conv(int n, const struct pam_message **msg, |
248 |
sshpam_null_conv(int n, struct pam_message **msg, |
| 249 |
struct pam_response **resp, void *data) |
249 |
struct pam_response **resp, void *data) |
| 250 |
{ |
250 |
{ |
| 251 |
return (PAM_CONV_ERR); |
251 |
return (PAM_CONV_ERR); |
|
Lines 282-288
Link Here
|
| 282 |
if (sshpam_handle != NULL) { |
282 |
if (sshpam_handle != NULL) { |
| 283 |
/* We already have a PAM context; check if the user matches */ |
283 |
/* We already have a PAM context; check if the user matches */ |
| 284 |
sshpam_err = pam_get_item(sshpam_handle, |
284 |
sshpam_err = pam_get_item(sshpam_handle, |
| 285 |
PAM_USER, (const void **)&pam_user); |
285 |
PAM_USER, (void **)&pam_user); |
| 286 |
if (sshpam_err == PAM_SUCCESS && strcmp(user, pam_user) == 0) |
286 |
if (sshpam_err == PAM_SUCCESS && strcmp(user, pam_user) == 0) |
| 287 |
return (0); |
287 |
return (0); |
| 288 |
fatal_remove_cleanup(sshpam_cleanup, NULL); |
288 |
fatal_remove_cleanup(sshpam_cleanup, NULL); |
|
Lines 596-602
Link Here
|
| 596 |
} |
596 |
} |
| 597 |
|
597 |
|
| 598 |
static int |
598 |
static int |
| 599 |
pam_chauthtok_conv(int n, const struct pam_message **msg, |
599 |
pam_chauthtok_conv(int n, struct pam_message **msg, |
| 600 |
struct pam_response **resp, void *data) |
600 |
struct pam_response **resp, void *data) |
| 601 |
{ |
601 |
{ |
| 602 |
char input[PAM_MAX_MSG_SIZE]; |
602 |
char input[PAM_MAX_MSG_SIZE]; |