]> granicus.if.org Git - sudo/commitdiff
added LONG_SKEY_PROMPT support
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 25 Nov 1995 04:56:05 +0000 (04:56 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 25 Nov 1995 04:56:05 +0000 (04:56 +0000)
check.c

diff --git a/check.c b/check.c
index 60340ec29bd43d39330b899350a7793372fc7911..fa9aae0693aebe1fb6ed5900f506264647ab9c50 100644 (file)
--- 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);
 }