Todd C. Miller
5ac272c03e
Fix gcc 2.x variant macro support.
2012-06-18 14:03:11 -04:00
Todd C. Miller
c8ce3a0a85
Log the process id in the debug file output. Since we don't want
...
to keep calling getpid(), stash the value at init time and when we
fork().
2012-04-06 15:20:16 -04:00
Todd C. Miller
abdff25703
Always pass __func__, __FILE__ and __LINE__ in sudo_debug_printf()
...
and use a new flag, SUDO_DEBUG_FILENO to specify when to use it.
This allows consumers of sudo_debug_printf() to log that data without
having to specify it manually.
2012-04-05 13:04:00 -04:00
Todd C. Miller
2c84bd4d08
Log warning() at SUDO_DEBUG_WARN not SUDO_DEBUG_ERROR.
...
Log the function, file and line number in the debug log for warning()
and error().
2012-04-05 12:37:15 -04:00
Todd C. Miller
2fe41248ac
Add SUDO_DEBUG_ERRNO flag to debug functions so we can log errno.
...
Use this flag when wrapping error() and warning() so the debug
output includes the error string.
2012-04-04 16:59:31 -04:00
Todd C. Miller
37770ecf1e
Initial cut at a hooks implementation. The plugin can register
...
hooks for getenv, putenv, setenv and unsetenv. This makes it
possible for the plugin to trap changes to the environment made by
authentication methods such as PAM or BSD auth so that such changes
are reflected in the environment passed back to sudo for execve().
2012-03-07 16:35:42 -05:00
Todd C. Miller
e16ae617e4
g/c now-unused debug subsystems
2012-02-05 10:17:26 -05:00
Todd C. Miller
a64f1eaea8
Do not close error pipe or debug fd via closefrom() as we need them
...
to report an exec error should one occur.
2011-11-29 19:51:24 -05:00
Todd C. Miller
3ee9cef0da
Fold SUDO_DEBUG_PROGERR and SUDO_DEBUG_SYSERR into SUDO_DEBUG_ERROR
2011-11-07 16:33:49 -05:00
Todd C. Miller
53e3ad11b5
New debug framework for sudo and plugins using /etc/sudo.conf that
...
also supports function call tracing.
2011-10-22 14:00:52 -04:00