=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/Attic/auth-skey.c,v retrieving revision 1.12.4.4 retrieving revision 1.13 diff -u -r1.12.4.4 -r1.13 --- src/usr.bin/ssh/Attic/auth-skey.c 2002/10/11 14:53:06 1.12.4.4 +++ src/usr.bin/ssh/Attic/auth-skey.c 2001/12/19 07:18:56 1.13 @@ -22,7 +22,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "includes.h" -RCSID("$OpenBSD: auth-skey.c,v 1.12.4.4 2002/10/11 14:53:06 miod Exp $"); +RCSID("$OpenBSD: auth-skey.c,v 1.13 2001/12/19 07:18:56 deraadt Exp $"); #ifdef SKEY @@ -30,7 +30,6 @@ #include "xmalloc.h" #include "auth.h" -#include "monitor_wrap.h" static void * skey_init_ctx(Authctxt *authctxt) @@ -38,7 +37,9 @@ return authctxt; } -int +#define PROMPT "\nS/Key Password: " + +static int skey_query(void *ctx, char **name, char **infotxt, u_int* numprompts, char ***prompts, u_int **echo_on) { @@ -50,23 +51,24 @@ if (skeychallenge(&skey, authctxt->user, challenge) == -1) return -1; - *name = xstrdup(""); - *infotxt = xstrdup(""); + *name = xstrdup(""); + *infotxt = xstrdup(""); *numprompts = 1; - *prompts = xmalloc(*numprompts * sizeof(char *)); + *prompts = xmalloc(*numprompts * sizeof(char*)); *echo_on = xmalloc(*numprompts * sizeof(u_int)); (*echo_on)[0] = 0; - len = strlen(challenge) + strlen(SKEY_PROMPT) + 1; + len = strlen(challenge) + strlen(PROMPT) + 1; p = xmalloc(len); - strlcpy(p, challenge, len); - strlcat(p, SKEY_PROMPT, len); + p[0] = '\0'; + strlcat(p, challenge, len); + strlcat(p, PROMPT, len); (*prompts)[0] = p; return 0; } -int +static int skey_respond(void *ctx, u_int numresponses, char **responses) { Authctxt *authctxt = ctx; @@ -90,14 +92,6 @@ skey_init_ctx, skey_query, skey_respond, - skey_free_ctx -}; - -KbdintDevice mm_skey_device = { - "skey", - skey_init_ctx, - mm_skey_query, - mm_skey_respond, skey_free_ctx }; #endif /* SKEY */