summaryrefslogtreecommitdiff
path: root/auth-pam.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2004-11-28 12:38:37 +0000
committerColin Watson <cjwatson@debian.org>2004-11-28 12:38:37 +0000
commit8095a8026b060fdfb9a0c268ff61752bdf688a10 (patch)
tree8edfd6a9bd12f2c81672e52de4e9a1a3e34c92cf /auth-pam.c
parent9ebd617cc085a14c1a197f140b037a3679ba3e2e (diff)
Make sure that there's a delay in PAM keyboard-interactive authentication
when PermitRootLogin is not set to yes and the correct root password is entered (closes: #248747).
Diffstat (limited to 'auth-pam.c')
-rw-r--r--auth-pam.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/auth-pam.c b/auth-pam.c
index ec3b74951..9be57dacd 100644
--- a/auth-pam.c
+++ b/auth-pam.c
@@ -645,7 +645,9 @@ sshpam_respond(void *ctx, u_int num, char **resp)
645 return (-1); 645 return (-1);
646 } 646 }
647 buffer_init(&buffer); 647 buffer_init(&buffer);
648 if (sshpam_authctxt->valid) 648 if (sshpam_authctxt->valid &&
649 (sshpam_authctxt->pw->pw_uid != 0 ||
650 options.permit_root_login == PERMIT_YES))
649 buffer_put_cstring(&buffer, *resp); 651 buffer_put_cstring(&buffer, *resp);
650 else 652 else
651 buffer_put_cstring(&buffer, badpw); 653 buffer_put_cstring(&buffer, badpw);