From 817e6d384425cc276c5ba22dab3e84b5da48679d Mon Sep 17 00:00:00 2001 From: djm Date: Wed, 14 May 2003 05:31:12 +0000 Subject: [PATCH] - (djm) Die screaming if start_pam() is called when UsePAM=no --- ChangeLog | 1 + auth-pam.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/ChangeLog b/ChangeLog index f08f8b4b..59f611a0 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 diff --git a/auth-pam.c b/auth-pam.c index 234e8f43..34326c24 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"); } -- 2.45.2