- (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
diff --git a/monitor.c b/monitor.c
index 78d1e2e..36f9a6c 100644
--- a/monitor.c
+++ b/monitor.c
@@ -567,7 +567,8 @@
 	}
 
 #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 @@
 {
 	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);