diff options
author | Damien Miller <djm@mindrot.org> | 2003-05-14 15:11:48 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2003-05-14 15:11:48 +1000 |
commit | 4e448a31ae12e6f84caa7cdfc8b4c23db92459db (patch) | |
tree | 8f4c0885c8c91456b4d27d7f405e9125b83491a4 /monitor.c | |
parent | 9c617693c2250c62e5e326372bc783e3416a94b0 (diff) |
- (djm) Add new UsePAM configuration directive to allow runtime control
over usage of PAM. This allows non-root use of sshd when built with
--with-pam
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); |