Todd C. Miller
652d0de98a
Remove errant file.
2012-12-07 14:58:06 -05:00
Todd C. Miller
3391038d49
Remove obsolete sudoers_cleanup() stubs.
2012-12-04 10:41:59 -05:00
Todd C. Miller
1d7072fe09
Don't include <sys/param.h>. We only needed it for MAXPATHLEN,
...
MAXHOSTNAMELEN and the MIN/MAX macros. We now use PATH_MAX and
HOST_NAME_MAX throughout without falling back on MAXPATHLEN or
MAXHOSTNAMELEN and define our own MIN/MAX macros as needed.
2012-12-04 10:40:47 -05:00
Todd C. Miller
3c9da162e4
Use MAX_HOST_NAME+1 (limits.h) instead of MAXHOSTNAMELEN (sys/param.h
...
or netdb.h).
2012-12-04 10:18:41 -05:00
Todd C. Miller
9a1889a61c
Move debug_decl() in log_failure() to be after the variable
...
declarations for C89.
2012-11-30 11:39:27 -05:00
Todd C. Miller
b7ae7977a6
Cannot wrap sigsetjmp() or we end up returning to the wrong place.
...
Use a macro instead.
2012-11-29 06:37:13 -05:00
Todd C. Miller
02ad501ecc
Fix return in sudoers_policy_open that should be debug_return.
2012-11-28 16:48:04 -05:00
Todd C. Miller
d3ab8b080b
Define sudo_ttyname_dev() for the HAVE_STRUCT_PSINFO_PR_TTYDEV case
...
too.
2012-11-27 10:49:46 -05:00
Todd C. Miller
dd5d0eada7
Quiet a gcc warning and add comment about needing to keep the
...
handle open.
2012-11-27 10:29:55 -05:00
Todd C. Miller
a94e94cf8c
mention --disable-shared
2012-11-26 15:25:19 -05:00
Todd C. Miller
94e2b1fbd4
Add missing command_info argument in I/O plugin open() prototype.
...
Bug #579
2012-11-26 09:57:35 -05:00
Todd C. Miller
1660c2692a
Regen for proper line numbers.
2012-11-25 11:55:33 -05:00
Todd C. Miller
415dc82971
Add locale_stub.o to SUDO_OBJS, not locale_stub.lo.
2012-11-25 11:54:17 -05:00
Todd C. Miller
14e5f35d4d
Include missing.h for __printflike.
2012-11-25 11:51:43 -05:00
Todd C. Miller
727be29893
Saner loop invariant in io_mkdirs (cosmetic only).
2012-11-25 09:46:40 -05: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
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
5496ffe1e8
Add plugin_setjmp() wrapper for siglongjmp(error_jmp, 1) so we don't
...
need error_jmp to be extern. Also add plugin_clearjmp() that clears
a flag so error()/errorx() knows when to call exit() vs. longjmp().
2012-11-25 09:34:26 -05:00
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