summaryrefslogtreecommitdiffstats
path: root/monitor.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2003-05-14 15:11:48 +1000
committerDamien Miller <djm@mindrot.org>2003-05-14 15:11:48 +1000
commit4e448a31ae12e6f84caa7cdfc8b4c23db92459db (patch)
tree8f4c0885c8c91456b4d27d7f405e9125b83491a4 /monitor.c
parent9c617693c2250c62e5e326372bc783e3416a94b0 (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.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/monitor.c b/monitor.c
index 78d1e2e0..36f9a6c2 100644
--- a/monitor.c
+++ b/monitor.c
@@ -567,7 +567,8 @@ mm_answer_pwnamallow(int socket, Buffer *m)
}
#ifdef USE_PAM
- monitor_permit(mon_dispatch, MONITOR_REQ_PAM_START, 1);
+ if (options.use_pam)
+ monitor_permit(mon_dispatch, MONITOR_REQ_PAM_START, 1);
#endif
return (0);
@@ -750,6 +751,9 @@ mm_answer_pam_start(int socket, Buffer *m)
{
char *user;
+ if (!options.use_pam)
+ fatal("UsePAM not set, but ended up in %s anyway", __func__);
+
user = buffer_get_string(m, NULL);
start_pam(user);