summaryrefslogtreecommitdiffstats
path: root/auth-pam.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth-pam.c')
-rw-r--r--auth-pam.c3
1 files changed, 3 insertions, 0 deletions
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");
}