Todd C. Miller
2632ec7e69
Move warn/error into common and make static builds work.
2012-11-25 09:34:40 -05:00
Todd C. Miller
c2c6616a0c
Move _sudo_printf from src/conversation.c to common/sudo_printf.c.
...
Add sudo_printf function pointer that is initialized to _sudo_printf()
instead of requiring a sudo_conv function pointer everywhere. The
plugin will reset sudo_printf to point to the version passed in via
the plugin open function. Now plugin_error.c can just call sudo_printf
in all cases. The sudoers binaries no longer need their own version
of sudo_printf.
2012-11-25 09:34:33 -05:00
Todd C. Miller
88c6446daf
Do locale swapping in the warning()/error() macros themselves instead
...
of in the underlying functions.
2012-11-25 09:34:15 -05:00
Todd C. Miller
4bde57b8b2
Rename warning2()/error2() -> warning_nodebug()/error_nodebug().
2012-11-25 09:34:10 -05:00
Todd C. Miller
f8660f9988
Add variants of warn/error and sudo_debug_printf that take a va_list
...
instead of a variable number of args.
2012-11-08 15:37:42 -05:00
Todd C. Miller
5ac272c03e
Fix gcc 2.x variant macro support.
2012-06-18 14:03:11 -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
3ee9cef0da
Fold SUDO_DEBUG_PROGERR and SUDO_DEBUG_SYSERR into SUDO_DEBUG_ERROR
2011-11-07 16:33:49 -05:00
Todd C. Miller
9923464d96
Wrap error/errorx and warning/warningx functions with debug statements.
...
Disable wrapping for standalone sudoers programs as well as memory
allocation functions (to avoid infinite recursion).
2011-10-22 14:28:33 -04:00
Todd C. Miller
f4a4cbeabd
Add __printflike
2011-05-19 16:21:41 -04:00
Todd C. Miller
b72a530fd0
Update copyright year
2010-06-14 12:19:49 -04:00
Todd C. Miller
841807dd66
Convert to ANSI C
2010-02-27 09:26:43 -05:00
Todd C. Miller
e90fa482f9
Rework source layout in preparation for modular sudo.
2010-02-20 09:14:01 -05:00