|
Lines 409-414
monitor_child_preauth(Authctxt *_authctx
Link Here
|
| 409 |
} |
409 |
} |
| 410 |
} |
410 |
} |
| 411 |
|
411 |
|
|
|
412 |
#if defined(HAVE_PAM_AUSER) && defined(USE_PAM) |
| 413 |
if (hostbased_cuser != NULL) { |
| 414 |
free(hostbased_cuser); |
| 415 |
hostbased_cuser = NULL; |
| 416 |
} |
| 417 |
#endif |
| 412 |
if (!authctxt->valid) |
418 |
if (!authctxt->valid) |
| 413 |
fatal("%s: authenticated invalid user", __func__); |
419 |
fatal("%s: authenticated invalid user", __func__); |
| 414 |
if (strcmp(auth_method, "unknown") == 0) |
420 |
if (strcmp(auth_method, "unknown") == 0) |
|
Lines 638-649
monitor_reset_key_state(void)
Link Here
|
| 638 |
{ |
644 |
{ |
| 639 |
/* reset state */ |
645 |
/* reset state */ |
| 640 |
free(key_blob); |
646 |
free(key_blob); |
|
|
647 |
#if !defined(HAVE_PAM_AUSER) || !defined(USE_PAM) |
| 641 |
free(hostbased_cuser); |
648 |
free(hostbased_cuser); |
|
|
649 |
hostbased_cuser = NULL; |
| 650 |
#endif |
| 642 |
free(hostbased_chost); |
651 |
free(hostbased_chost); |
| 643 |
key_blob = NULL; |
652 |
key_blob = NULL; |
| 644 |
key_bloblen = 0; |
653 |
key_bloblen = 0; |
| 645 |
key_blobtype = MM_NOKEY; |
654 |
key_blobtype = MM_NOKEY; |
| 646 |
hostbased_cuser = NULL; |
|
|
| 647 |
hostbased_chost = NULL; |
655 |
hostbased_chost = NULL; |
| 648 |
} |
656 |
} |
| 649 |
|
657 |
|
|
Lines 1068-1073
mm_answer_pam_account(int sock, Buffer *
Link Here
|
| 1068 |
if (!options.use_pam) |
1076 |
if (!options.use_pam) |
| 1069 |
fatal("UsePAM not set, but ended up in %s anyway", __func__); |
1077 |
fatal("UsePAM not set, but ended up in %s anyway", __func__); |
| 1070 |
|
1078 |
|
|
|
1079 |
#ifdef HAVE_PAM_AUSER |
| 1080 |
if (hostbased_cuser != NULL) |
| 1081 |
do_pam_set_auser(hostbased_cuser); |
| 1082 |
#endif |
| 1083 |
|
| 1071 |
ret = do_pam_account(); |
1084 |
ret = do_pam_account(); |
| 1072 |
|
1085 |
|
| 1073 |
buffer_put_int(m, ret); |
1086 |
buffer_put_int(m, ret); |