Todd C. Miller
adbc8a574f
Use -fstack-protector-all in preference to -fstack-protector
...
where supported.
2013-01-11 09:39:59 -05:00
Todd C. Miller
34d018fb91
Only test for -fstack-protector and -fvisibility=hidden on GNU
...
compatible compilers.
2013-01-10 21:27:40 -05:00
Todd C. Miller
726a7daa63
Add Sudo 1.8.6p4
2013-01-03 14:52:10 -05:00
Todd C. Miller
6e560f2bab
Break out stack smashing protector options into SSP_CFLAGS and
...
SSP_LDFLAGS so we can use it everywhere (unlike LT_LDFLAGS).
2013-01-03 14:20:49 -05:00
Todd C. Miller
90d58685ff
In rbrepair(), make sure we never try to change the color of the
...
sentinel node, which is the first entry, not the root.
From Michael King
2013-01-01 13:31:40 -05:00
Todd C. Miller
782da0aa81
No need to restore default signal handler for SIGSTOP as it is not
...
catchable. Attempting to do so is harmless but sigaction() will
fail and set errno to EINVAL which makes it looks like there is an
error.
2012-12-28 11:03:23 -05:00
Todd C. Miller
d129290ec3
Print SIGCONT_FG and SIGCONT_BG properly in debug output.
2012-12-28 11:01:36 -05:00
Todd C. Miller
948253a156
Disable PIE on FreeBSD/ia64, otherwise sudo will segfault.
2012-12-27 16:25:51 -05:00
Todd C. Miller
a449e8b3e7
Add howmany() macro since some systems have this in sys/param.h
...
which we no longer include.
2012-12-20 14:46:45 -05:00
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