diff options
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -567,7 +567,8 @@ mm_answer_pwnamallow(int socket, Buffer *m) | |||
567 | } | 567 | } |
568 | 568 | ||
569 | #ifdef USE_PAM | 569 | #ifdef USE_PAM |
570 | monitor_permit(mon_dispatch, MONITOR_REQ_PAM_START, 1); | 570 | if (options.use_pam) |
571 | monitor_permit(mon_dispatch, MONITOR_REQ_PAM_START, 1); | ||
571 | #endif | 572 | #endif |
572 | 573 | ||
573 | return (0); | 574 | return (0); |
@@ -750,6 +751,9 @@ mm_answer_pam_start(int socket, Buffer *m) | |||
750 | { | 751 | { |
751 | char *user; | 752 | char *user; |
752 | 753 | ||
754 | if (!options.use_pam) | ||
755 | fatal("UsePAM not set, but ended up in %s anyway", __func__); | ||
756 | |||
753 | user = buffer_get_string(m, NULL); | 757 | user = buffer_get_string(m, NULL); |
754 | 758 | ||
755 | start_pam(user); | 759 | start_pam(user); |