summaryrefslogtreecommitdiff
path: root/monitor_wrap.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_wrap.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_wrap.c')
-rw-r--r--monitor_wrap.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/monitor_wrap.c b/monitor_wrap.c
index a83413a5f..bd3a01a2b 100644
--- a/monitor_wrap.c
+++ b/monitor_wrap.c
@@ -47,6 +47,7 @@ RCSID("$OpenBSD: monitor_wrap.c,v 1.26 2003/04/07 08:29:57 markus Exp $");
47#include "atomicio.h" 47#include "atomicio.h"
48#include "monitor_fdpass.h" 48#include "monitor_fdpass.h"
49#include "getput.h" 49#include "getput.h"
50#include "servconf.h"
50 51
51#include "auth.h" 52#include "auth.h"
52#include "channels.h" 53#include "channels.h"
@@ -59,6 +60,7 @@ extern z_stream incoming_stream;
59extern z_stream outgoing_stream; 60extern z_stream outgoing_stream;
60extern struct monitor *pmonitor; 61extern struct monitor *pmonitor;
61extern Buffer input, output; 62extern Buffer input, output;
63extern ServerOptions options;
62 64
63void 65void
64mm_request_send(int socket, enum monitor_reqtype type, Buffer *m) 66mm_request_send(int socket, enum monitor_reqtype type, Buffer *m)
@@ -669,6 +671,8 @@ mm_start_pam(char *user)
669 Buffer m; 671 Buffer m;
670 672
671 debug3("%s entering", __func__); 673 debug3("%s entering", __func__);
674 if (!options.use_pam)
675 fatal("UsePAM=no, but ended up in %s anyway", __func__);
672 676
673 buffer_init(&m); 677 buffer_init(&m);
674 buffer_put_cstring(&m, user); 678 buffer_put_cstring(&m, user);