Todd C. Miller
d658d12195
Let warning() call gettext() for us.
2012-11-25 09:34:20 -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
7b3d268687
Call gettext() on parameters for warning()/warningx() instead of
...
having warning() do it for us.
2012-11-25 09:34:04 -05:00
Todd C. Miller
15c69e0e3f
Call gettext() in sudoerserror() in the user's locale and pass the untranslated string to it.
2012-11-25 09:33:58 -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
3e5bd8dc52
Include setjmp.h in sudoers.h
...
Move error_jmp into plugin_error.c
Rename sudoers_plugin_cleanup sudoers_cleanup
Make sudoers warning/error functions work when sudo_conv is NULL
2012-11-25 09:33:33 -05:00
Todd C. Miller
3b5f786994
No need to change locale in front-end warning()/error().
2012-11-25 09:25:15 -05:00
Todd C. Miller
e81eb5b00a
Ignore bad lines in passwd/group file instead if stopping processing when we hit one.
2012-11-25 09:23:17 -05:00
Todd C. Miller
cca915e39b
Bash doesn't let you set UID to use MYUID instead.
2012-11-25 08:12:55 -05:00
Todd C. Miller
056c08a5b7
Avoid NULL deref for unknown Defaults in strict mode.
2012-11-25 08:12:54 -05:00
Todd C. Miller
6849fff4d7
See DEFAULT_TEXT_DOMAIN
2012-11-25 08:10:12 -05:00
Todd C. Miller
6e3965160a
Add signame.c and mksigname.
2012-11-13 09:46:19 -05:00
Todd C. Miller
5e09ae9b75
Fold preinstall into install-plugin and pass the path to the
...
plugin binary to the preinstall command.
2012-11-13 09:41:52 -05:00
Todd C. Miller
c46a6a5b23
sync with upstream
2012-11-13 08:54:40 -05:00
Todd C. Miller
8195fe1bd2
repair spacing
2012-11-13 08:54:31 -05:00
Todd C. Miller
0178d5ae01
Set group on sudo_debug when creating it to gid 0 so systems without
...
BSD group semantics don't get the invoking user's group.
2012-11-12 17:12:34 -05:00
Todd C. Miller
edf0881823
Rename mkdir_parents() io_mkdirs() and add a flag to specify whether
...
path is a temporary, in which case the final component is created
via mkdtemp() instead of mkdir().
2012-11-12 17:04:24 -05:00
Todd C. Miller
cab6b976dc
For PERM_ROOT set egid to 0 so log files are not created with
...
the gid of the user.
2012-11-12 15:20:10 -05:00
Todd C. Miller
02aa965a2d
Add calls to set_perms(PERM_ROOT) becore logging to a file. We
...
should already be root but since we cache the current permission
status it is basically free. That way, if more of sudoers runs as
non-root in the future logging will still work correctly.
2012-11-12 09:41:56 -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
6485906583
Mention that sudo.conf is parsed in the C locale.
2012-11-12 06:27:53 -05:00
Todd C. Miller
4bd4a91714
Parse sudo.conf in the "C" locale.
2012-11-12 05:42:48 -05:00
Todd C. Miller
336021a9c0
Fix compilation on systems w/o setlocale()
2012-11-12 05:36:43 -05:00
Todd C. Miller
5957c88f4c
Sudo now includes a workaround for the Solaris 11 locale issue.
2012-11-12 05:22:01 -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
83dde2fbb6
Add os-specific initialization functions for solaris (workaround
...
setuid locale problem in Solaris 11) and openbsd (set malloc_options
if SUDO_DEVEL). Also move set_project() to solaris.c.
2012-11-11 07:11:22 -05:00
Todd C. Miller
56de023de8
Avoid strerror() when possible and just rely on warning/error
...
to handle errno in the proper locale.
2012-11-09 16:32:29 -05:00
Todd C. Miller
e28ce01fe0
Set sudoers locale in log_allowed()
2012-11-09 16:31:23 -05:00
Todd C. Miller
69cb0c3215
Make the sudo lecture translatable.
2012-11-09 15:37:03 -05:00
Todd C. Miller
5e637ad832
Add the values of badpass_message, passprompt and mailsub to
...
sudoers.pot so they can be translated.
2012-11-09 15:31:04 -05:00
Todd C. Miller
693e6767f0
Expand the FMT_FIRST anf FMT_CONTD macros inline so they get picked
...
up by xgettext.
2012-11-09 15:30:06 -05:00
Todd C. Miller
6a7884d474
Make expand_prompt() args const and free the prompt when we are
...
done with it.
2012-11-08 16:40:37 -05:00
Todd C. Miller
e88c8941d8
Fix cut and pasto
2012-11-08 16:40:03 -05:00
Todd C. Miller
cac7ca6a69
Expand def_mailsub in the sudoers locale, not the user's.
2012-11-08 16:39:44 -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
595d3b2651
Display warning/error messages in the user's locale.
2012-11-08 15:37:44 -05:00
Todd C. Miller
f454a852cb
audit_failure() now calls gettext itself using the sudoers locale.
2012-11-08 15:37:43 -05:00
Todd C. Miller
3f82a3407e
Convert setlocale() to sudoers_setlocale() in the sudoers module.
...
This only converts existing uses, there are more places where we
need to sprinkle sudoers_setlocale() calls.
2012-11-08 15:37:43 -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
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
56857f7f01
Document Solaris 11 locale issues and workarounds.
2012-11-08 15:22:44 -05:00
Todd C. Miller
9d2dc4c30a
Solaris gettext() looks in lang.UTF-8, not just lang for UTF-8 locales.
...
Make links from localdir/lang -> localdir/lang.UTF-8
2012-11-08 14:45:22 -05:00
Todd C. Miller
5d052aeb60
Do not inform the user that the command was not permitted by the
...
policy if they do not successfully authenticate. This is a regression
introduced in sudo 1.8.6.
2012-11-06 11:19:51 -05:00
Todd C. Miller
941d759c51
Add preinstall target that runs SUDO_PREINSTALL_CMD. Used to fixup
...
the rpath in HP-UX SOM shared libraries for the LDAP libs.
2012-11-06 11:08:53 -05:00
Todd C. Miller
e6207003b1
The -a option should be #ifdef HAVE_BSD_AUTH_H, not -A.
2012-11-06 11:00:22 -05:00
Todd C. Miller
0586a5e28a
Allow the user to specify and alternate libtool
2012-10-28 12:58:48 -04:00
Todd C. Miller
68376c1380
Allow sudo to be build with sss support without also including ldap
...
support. From Stephane Graber.
2012-10-26 10:27:56 -04:00
Todd C. Miller
475662aaa4
Refactor policy plugin interface code from sudoers.c into policy.c
2012-10-25 16:58:31 -04:00
Todd C. Miller
3651377e12
Refactor command_info setting into its own function.
2012-10-25 13:16:58 -04:00