--- embedaddon/sudo/plugins/sudoers/auth/rfc1938.c 2012/02/21 16:23:02 1.1 +++ embedaddon/sudo/plugins/sudoers/auth/rfc1938.c 2014/06/15 16:12:54 1.1.1.4 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994-1996, 1998-2005, 2010-2011 + * Copyright (c) 1994-1996, 1998-2005, 2010-2012 * Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any @@ -22,7 +22,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include @@ -63,12 +62,13 @@ #include "sudo_auth.h" int -rfc1938_setup(struct passwd *pw, char **promptp, sudo_auth *auth) +sudo_rfc1938_setup(struct passwd *pw, char **promptp, sudo_auth *auth) { char challenge[256]; static char *orig_prompt = NULL, *new_prompt = NULL; static int op_len, np_size; static struct RFC1938 rfc1938; + debug_decl(sudo_rfc1938_setup, SUDO_DEBUG_AUTH) /* Stash a pointer to the rfc1938 struct if we have not initialized */ if (!auth->data) @@ -100,10 +100,10 @@ rfc1938_setup(struct passwd *pw, char **promptp, sudo_ */ if (rfc1938challenge(&rfc1938, pw->pw_name, challenge, sizeof(challenge))) { if (IS_ONEANDONLY(auth)) { - warningx(_("you do not exist in the %s database"), auth->name); - return AUTH_FATAL; + warningx(U_("you do not exist in the %s database"), auth->name); + debug_return_int(AUTH_FATAL); } else { - return AUTH_FAILURE; + debug_return_int(AUTH_FAILURE); } } @@ -120,15 +120,16 @@ rfc1938_setup(struct passwd *pw, char **promptp, sudo_ orig_prompt, challenge); *promptp = new_prompt; - return AUTH_SUCCESS; + debug_return_int(AUTH_SUCCESS); } int -rfc1938_verify(struct passwd *pw, char *pass, sudo_auth *auth) +sudo_rfc1938_verify(struct passwd *pw, char *pass, sudo_auth *auth) { + debug_decl(sudo_rfc1938_verify, SUDO_DEBUG_AUTH) if (rfc1938verify((struct RFC1938 *) auth->data, pass) == 0) - return AUTH_SUCCESS; + debug_return_int(AUTH_SUCCESS); else - return AUTH_FAILURE; + debug_return_int(AUTH_FAILURE); }