--- embedaddon/sudo/plugins/sudoers/auth/rfc1938.c 2012/02/21 16:23:02 1.1.1.1 +++ embedaddon/sudo/plugins/sudoers/auth/rfc1938.c 2012/05/29 12:26:49 1.1.1.2 @@ -63,12 +63,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) @@ -101,9 +102,9 @@ 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; + debug_return_int(AUTH_FATAL); } else { - return AUTH_FAILURE; + debug_return_int(AUTH_FAILURE); } } @@ -120,15 +121,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); }