From 9d507dac1f78d87f2808ab247a44cd3860146375 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 14 May 2003 15:31:12 +1000 Subject: [PATCH] - (djm) Die screaming if start_pam() is called when UsePAM=no --- ChangeLog | 3 ++- auth-pam.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2bf9cd7e5..a4e47e09a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -71,6 +71,7 @@ - (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 + - (djm) Die screaming if start_pam() is called when UsePAM=no 20030512 - (djm) Redhat spec: Don't install profile.d scripts when not @@ -1458,4 +1459,4 @@ save auth method before monitor_reset_key_state(); bugzilla bug #284; ok provos@ -$Id: ChangeLog,v 1.2694 2003/05/14 05:11:48 djm Exp $ +$Id: ChangeLog,v 1.2695 2003/05/14 05:31:12 djm Exp $ diff --git a/auth-pam.c b/auth-pam.c index 234e8f435..34326c242 100644 --- a/auth-pam.c +++ b/auth-pam.c @@ -485,6 +485,9 @@ KbdintDevice mm_sshpam_device = { void start_pam(const char *user) { + if (!options.use_pam) + fatal("PAM: initialisation requested when UsePAM=no"); + if (sshpam_init(user) == -1) fatal("PAM: initialisation failed"); }