From: Todd C. Miller Date: Tue, 11 Sep 2012 14:21:32 +0000 (-0400) Subject: Add some debuggging X-Git-Tag: SUDO_1_8_6p1~1^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d2a46c0f81abc0f0dd3674d5e05197beab6c2a89;p=sudo Add some debuggging --- diff --git a/plugins/sudoers/env.c b/plugins/sudoers/env.c index a77613964..51ee912d2 100644 --- a/plugins/sudoers/env.c +++ b/plugins/sudoers/env.c @@ -360,6 +360,8 @@ sudo_putenv(char *str, bool dupcheck, bool overwrite) int rval; debug_decl(sudo_putenv, SUDO_DEBUG_ENV) + sudo_debug_printf(SUDO_DEBUG_INFO, "sudo_putenv: %s", str); + rval = sudo_putenv_nodebug(str, dupcheck, overwrite); if (rval == -1) { #ifdef ENV_DEBUG @@ -489,6 +491,8 @@ sudo_unsetenv(const char *name) int rval; debug_decl(sudo_unsetenv, SUDO_DEBUG_ENV) + sudo_debug_printf(SUDO_DEBUG_INFO, "sudo_unsetenv: %s", name); + rval = sudo_unsetenv_nodebug(name); debug_return_int(rval); @@ -527,6 +531,8 @@ sudo_getenv(const char *name) char *val; debug_decl(sudo_getenv, SUDO_DEBUG_ENV) + sudo_debug_printf(SUDO_DEBUG_INFO, "sudo_getenv: %s", name); + val = sudo_getenv_nodebug(name); debug_return_str(val); @@ -658,6 +664,9 @@ env_should_delete(const char *var) delete_it = matches_env_delete(var); if (!delete_it) delete_it = matches_env_check(var) == false; + + sudo_debug_printf(SUDO_DEBUG_INFO, "delete %s: %s", + var, delete_it ? "YES" : "NO"); debug_return_bool(delete_it); } @@ -675,6 +684,8 @@ env_should_keep(const char *var) if (keepit == -1) keepit = matches_env_keep(var); + sudo_debug_printf(SUDO_DEBUG_INFO, "keep %s: %s", + var, keepit ? "YES" : "NO"); debug_return_bool(keepit == true); }