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
Todd C. Miller
929aef0754
Make interfaces pointer private to interfaces.c and add get_interfaces()
...
accessor.
2012-10-25 13:15:52 -04:00
Todd C. Miller
319fe95d08
Make user_cwd const since it is either a string literal or passed
...
in from the front-end.
2012-10-24 16:32:43 -04:00
Todd C. Miller
8aca292b23
sudo 1.8.7
2012-10-24 16:29:13 -04:00
Todd C. Miller
4134b24ec2
Avoid nested strtok() calls.
2012-10-24 14:24:36 -04:00
Todd C. Miller
2b23d2b12c
Move expand_prompt() into its own source file for easier unit testing.
2012-10-23 14:27:52 -04:00
Todd C. Miller
0a7af23038
Make check.c independent of the underlying timestamp implementation.
2012-10-23 14:16:57 -04:00
Todd C. Miller
fb037caffc
Add SUDOERS_NO_SEQ define to allow ${seq} to be disabled.
2012-10-23 11:57:07 -04:00
Todd C. Miller
3442a0aeae
Use a list for the possible values of Tag_Spec with a minimal indent
...
to improve readability. In the pod version, these were =head3.
Also use .St -p1003.1 instead of just POSIX when talking about
glob() and fnmatch().
2012-10-23 10:21:24 -04:00
Todd C. Miller
84eedd3f79
sudo_ttyname_dev() is unused if there is no /proc or sysctl().
2012-10-02 15:29:52 -04:00
Todd C. Miller
a3a1574cdf
Explicitly mark main() as public in executables to avoid an HP-UX
...
ld warning.
2012-10-02 15:08:02 -04:00
Todd C. Miller
09140fd1a0
Remove grep from SEE ALSO section.
2012-10-02 15:07:11 -04:00
Todd C. Miller
1cf3def4be
If vasprintf() fails, just use the errno it sets instead of assuming
...
ENOMEM.
2012-10-02 14:45:18 -04:00
Todd C. Miller
acb9c62987
Mention HP-UX pam.conf settings.
2012-09-28 09:05:31 -04:00
Todd C. Miller
0fa33ccf0f
Split off timestamp functions into their own source file.
2012-09-27 10:21:13 -04:00
Todd C. Miller
05896f9cfc
Mention how !foo is not the same as ALL,!foo
2012-09-26 14:55:18 -04:00
Todd C. Miller
592f6fefb0
Start commands in the background when I/O logging is enabled. We
...
can't do this on Mac OS X due to a kernel bug in tc[gs]etattr(2)
which returns EINTR on signal instead of restarting automatically.
2012-09-25 13:49:51 -04:00
Todd C. Miller
616d713e9b
Handle SIGCONT_FG and SIGCONT_BG when converting signal number to
...
string in deliver_signal().
2012-09-25 13:31:20 -04:00
Todd C. Miller
0e94e8ca91
Fix running commands that need the terminal in the background when
...
I/O logging is enabled. E.g. "sudo vi &". When the command is
foregrounded, it will now resume properly.
2012-09-24 15:06:14 -04:00
Todd C. Miller
6a25affb47
Add rudimentary support for name-based matching as a compile-time
...
option. This unsafe when used in conjunction with the '!' operator.
2012-09-24 10:09:41 -04:00