summaryrefslogtreecommitdiff
path: root/check.c
diff options
context:
space:
mode:
authorTodd C. Miller <Todd.Miller@courtesan.com>1995-11-25 04:56:05 +0000
committerTodd C. Miller <Todd.Miller@courtesan.com>1995-11-25 04:56:05 +0000
commit933b5afe297706b652731ed58611dd48d4231859 (patch)
tree7bb734ac82d9651d274bb35ed51aa3d9ea192077 /check.c
parent9a291800d37296302daf1650b71b307d7bc0a4b5 (diff)
downloadsudo-933b5afe297706b652731ed58611dd48d4231859.tar.gz
added LONG_SKEY_PROMPT support
Diffstat (limited to 'check.c')
-rw-r--r--check.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/check.c b/check.c
index 60340ec29..fa9aae069 100644
--- a/check.c
+++ b/check.c
@@ -684,9 +684,17 @@ static char *sudo_skeyprompt(user_skey, p)
exit(1);
}
+#ifdef LONG_SKEY_PROMPT
+ /* separate s/key challenge and prompt for easy snarfing */
+ if (skeyprompt[0] == 's' && skeyprompt[1] == '/')
+ (void) sprintf(new_prompt, "%s\n%s", &skeyprompt[2], old_prompt);
+ else
+ (void) sprintf(new_prompt, "%s\n%s", skeyprompt, old_prompt);
+#else
/* embed the s/key challenge into the new password prompt */
(void) strncpy(new_prompt, old_prompt, plen);
(void) sprintf(new_prompt + plen, " [%s]:", skeyprompt);
+#endif /* LONG_SKEY_PROMPT */
return(new_prompt);
}