--- embedaddon/sudo/plugins/sudoers/getspwuid.c 2012/02/21 16:23:02 1.1.1.1 +++ embedaddon/sudo/plugins/sudoers/getspwuid.c 2013/07/22 10:46:12 1.1.1.3 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 1998-2005, 2010 + * Copyright (c) 1996, 1998-2005, 2010-2012 * Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any @@ -23,7 +23,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include @@ -82,6 +81,7 @@ char * sudo_getepw(const struct passwd *pw) { char *epw = NULL; + debug_decl(sudo_getepw, SUDO_DEBUG_AUTH) /* If there is a function to check for shadow enabled, use it... */ #ifdef HAVE_ISCOMSEC @@ -142,12 +142,14 @@ sudo_getepw(const struct passwd *pw) done: #endif /* If no shadow password, fall back on regular password. */ - return estrdup(epw ? epw : pw->pw_passwd); + debug_return_str(estrdup(epw ? epw : pw->pw_passwd)); } void sudo_setspent(void) { + debug_decl(sudo_setspent, SUDO_DEBUG_AUTH) + #ifdef HAVE_GETPRPWNAM setprpwent(); #endif @@ -163,11 +165,14 @@ sudo_setspent(void) #ifdef HAVE_GETAUTHUID setauthent(); #endif + debug_return; } void sudo_endspent(void) { + debug_decl(sudo_endspent, SUDO_DEBUG_AUTH) + #ifdef HAVE_GETPRPWNAM endprpwent(); #endif @@ -183,4 +188,5 @@ sudo_endspent(void) #ifdef HAVE_GETAUTHUID endauthent(); #endif + debug_return; }