Todd C. Miller
12a1b672c0
We must include gettext.h before missing.h as it includes system
...
headers. Also add missing DEFAULT_TEXT_DOMAIN defines in sudoers
audit code that does not include sudoers.h.
2014-02-11 09:40:59 -07:00
Todd C. Miller
054a94e6c9
Add definition of U_ for --disable-nsl
...
Don't define warning_gettext if --disable-nsl
Bug #621 ; from Daniel Richard G.
2013-11-19 09:45:13 -07:00
Todd C. Miller
96eb2c4f8f
Add warning_gettext() wrapper function that changes to the user locale,
...
then calls gettext().
Add U_ macro that calls warning_gettext() instead of gettext().
Rename warning2()/error2() back to warning_nodebug()/error_nodebug().
2013-11-18 08:59:57 -07:00
Todd C. Miller
99352d6738
Rename error.h -> fatal.h now that there is no error() function.
2013-08-15 14:24:29 -06:00
Todd C. Miller
d6282d154a
Update copyright years.
2013-04-24 09:35:02 -04:00
Todd C. Miller
7eb2394b40
Don't need all of sudoers.h in here
2013-03-28 11:19:18 -04:00
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
90147bb605
Allow sudoers programs (visudo, sudoreplay, visudo) to use
...
plugin_error.c instead of the error.c from the front-end. This
means sudoers_setlocale() needs to be independent of the sudo_user
struct and the defaults table. The sudoers locale is now updated
via a callback.
2012-11-25 09:33:52 -05:00
Todd C. Miller
acf8af9aac
#unifdef HAVE_SETLOCALE, it is C89 so no need to check for it.
2012-11-12 08:51:58 -05:00
Todd C. Miller
336021a9c0
Fix compilation on systems w/o setlocale()
2012-11-12 05:36:43 -05:00
Todd C. Miller
c1db4b1546
Always include locale.h from gettext.h so we no longer need to
...
include locale.h from the .c files.
2012-11-11 20:23:53 -05:00
Todd C. Miller
a0c53bd751
Call gettext inside log_error et al instead of having the caller do it. This way we can display any messages to the user in their own locale but log in the sudoers local.
2012-11-08 15:37:44 -05:00
Todd C. Miller
4207589fe2
Add simple locale switching to make it easy to switch from the
...
user's locale to the sudoers locale without making excessive
setlocale() calls when we don't need to.
2012-11-08 15:37:43 -05:00