Add support for multiple Debug lines per program. Callers may

register arbitrary debug facilities or use built-in defaults.  We
now use separate Debug statements for plugins and programs.
This commit is contained in:
Todd C. Miller
2014-10-22 13:23:05 -06:00
parent a7e724b75d
commit 866cfc4fc3
100 changed files with 1509 additions and 949 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1994-1996, 1998-2005, 2010-2012
* Copyright (c) 1994-1996, 1998-2005, 2010-2012, 2014
* Todd C. Miller <Todd.Miller@courtesan.com>
*
* Permission to use, copy, modify, and distribute this software for any
@@ -68,7 +68,7 @@ sudo_rfc1938_setup(struct passwd *pw, char **promptp, sudo_auth *auth)
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)
debug_decl(sudo_rfc1938_setup, SUDO_DEBUG_AUTH, sudoers_debug_instance)
/* Stash a pointer to the rfc1938 struct if we have not initialized */
if (!auth->data)
@@ -126,7 +126,7 @@ sudo_rfc1938_setup(struct passwd *pw, char **promptp, sudo_auth *auth)
int
sudo_rfc1938_verify(struct passwd *pw, char *pass, sudo_auth *auth)
{
debug_decl(sudo_rfc1938_verify, SUDO_DEBUG_AUTH)
debug_decl(sudo_rfc1938_verify, SUDO_DEBUG_AUTH, sudoers_debug_instance)
if (rfc1938verify((struct RFC1938 *) auth->data, pass) == 0)
debug_return_int(AUTH_SUCCESS);