Todd C. Miller
a8f63191ef
Sprinkle some debugging around uid/gid setting in sudoedit.
2014-08-21 15:42:35 -06:00
Todd C. Miller
db35c7c0e4
Make sudoedit work with SELinux RBAC.
...
Adapted from RedHat patches (Daniel Kopecek) but made to behave a
bit more like the non-SELinux bits.
2014-08-21 15:28:36 -06:00
Todd C. Miller
a147330f3f
Refactor code that copies temp files into separate functions.
2014-08-21 15:28:35 -06:00
Todd C. Miller
2c542178a3
Add missing call to initprogname().
2014-08-18 16:46:55 -06:00
Todd C. Miller
dd43530f0a
Remove two instances of -no-fast-install that were missed before.
2014-08-08 11:07:09 -06:00
Todd C. Miller
703263bf0e
Fix "sudo -C" when we have internal fds to preserve from closefrom().
2014-08-07 09:38:03 -06:00
Todd C. Miller
7a988d489c
It is now sudo_efree() not efree().
...
Don't try to free a pointer to garbage on error.
2014-07-30 09:46:48 -06:00
Todd C. Miller
edf0d39703
Plug memory leak, even though we are headed for exit.
2014-07-29 19:33:55 -06:00
Todd C. Miller
ae0014d6f4
Attempt to handle systems with SA_SIGINFO but that lack SI_USER.
2014-07-28 20:25:46 -06:00
Todd C. Miller
787a89ed0d
Back out old workaround for sudoedit hang when debugging was enabled.
2014-07-26 06:07:34 -06:00
Todd C. Miller
6f77ffd7c7
Don't memcpy() the preserved_fds TAILQ as the pointers into the
...
head will be wrong. All we need to do is save the old command
details and restore them after calling run_command(). Fixes a hang
with sudoedit when debugging is enabled.
2014-07-26 06:06:18 -06:00
Todd C. Miller
32a837623e
The default policy close function should only print an error message
...
if the error_code is non-zero.
2014-07-25 17:07:23 -06:00
Todd C. Miller
7e5a239741
If there the preserved fds list is empty, add a new element with
...
TAILQ_INSERT_HEAD instead of TAILQ_INSERT_TAIL to avoid an infinite
loop on AIX, Solaris and possibly others when debug mode is active.
2014-07-25 17:00:10 -06:00
Todd C. Miller
47835ff289
Rename missing.h -> sudo_compat.h
2014-07-22 14:25:16 -06:00
Todd C. Miller
844a285391
Version the functions in libsudo_util
2014-07-22 11:26:17 -06:00
Todd C. Miller
127ba1354b
Rename gettext.h -> sudo_gettext.h
2014-07-21 14:49:43 -06:00
Todd C. Miller
3687b665cb
Rename fatal.h -> sudo_fatal.h
2014-07-21 14:40:18 -06:00
Todd C. Miller
b45727cefa
Rename queue.h -> sudo_queue.h to avoid collisions with the system
...
version.
2014-07-21 14:37:27 -06:00
Todd C. Miller
fb96eb2445
Error out if sesh is run as a login shell but the shell it needs
...
to run has no slash. This shouldn't happen in practice.
2014-07-14 09:56:38 -06:00
Todd C. Miller
d5ecc1590d
Audit failed user role changes. RedHat bz #665131
2014-07-12 10:04:19 -06:00
Todd C. Miller
3f216cc2be
When running a login shell via sesh, make new argv[0] -shell, not
...
/path/to-shell. RedHat bz #1065418
2014-07-12 06:51:00 -06:00
Todd C. Miller
36a5767e3e
efree -> sudo_efree for consistency
2014-07-10 15:35:04 -06:00
Todd C. Miller
78d2b42b7e
Remove @SOEXT@ and @SHLIB_EXT@ now that we use libtool to install
...
shared objects. Instead, use the new @SHLIB_ENABLE@ that is set
to the value of $enable_dlopen. For sudo_noexec.so there is nothing
special to do since the install-noexec target is only called when
noexec is enabled by configure.
2014-07-08 20:19:09 -06:00
Todd C. Miller
12c3b456d8
Add sudo_warn_strerror() that wraps strerror() with calls to
...
setlocale() in sudoers so we always get the error string in the
user's locale. Also change _warning() to take the error number as
a parameter instead of examining errno.
2014-07-08 09:52:21 -06:00
Todd C. Miller
2bad717548
Avoid a cppcheck warning when NSIG is not defined.
2014-07-03 16:55:01 -06:00
Todd C. Miller
4e1e76a4b1
Use libtool to install/uninstall the plugins and sudo_noexec.
2014-06-29 20:45:36 -06:00
Todd C. Miller
a8fa112a53
atobool -> sudo_strtobool
...
atoid-> sudo_strtoid
atomode -> sudo_strtomode
2014-06-27 14:53:54 -06:00
Todd C. Miller
2be0929f22
Handle systems like AIX that lack a way to set the modification
...
time on open fds.
2014-06-27 11:47:16 -06:00
Todd C. Miller
2d61d38c23
Add sudo_ prefix to alloc.c functions and rename alloc.h -> sudo_alloc.h
2014-06-27 10:48:31 -06:00
Todd C. Miller
8e088e65c0
Split fileops.c into parseln.c and locking.c
2014-06-27 09:46:24 -06:00
Todd C. Miller
aecef4aa1d
Rename warning/fatal -> sudo_warn/sudo_fatal to avoid namespace
...
pollution in libsudo_util.so.
2014-06-27 09:30:52 -06:00
Todd C. Miller
d36846a699
Reduce name space pollution in libsudo_util.so
2014-06-26 16:21:19 -06:00
Todd C. Miller
9b3c19cc36
Use sudo_dso_load() from libsudo_util.so instead of dlopen() since
...
we no longer link sudo directly with libdl.so.
2014-06-26 16:01:24 -06:00
Todd C. Miller
7bafa63c15
Don't pollute the namespace with lbuf struct and functions
2014-06-26 15:51:15 -06:00
Todd C. Miller
6bdee0488c
Rename parse_gid_list -> sudo_parse_gids to avoid namespace pollution.
2014-06-26 15:51:15 -06:00
Todd C. Miller
9ba5d82926
Rename fmt_string -> sudo_new_key_val to better describe its function.
2014-06-26 15:51:15 -06:00
Todd C. Miller
f029e3e744
Remove touch() from fileops.c and just call utimes/futimes directly.
...
Rename lock_file -> sudo_lock_file to avoid namespace pollution
2014-06-26 15:51:15 -06:00
Todd C. Miller
088edcb6f5
Add exported libsudo_util functions to util.exp and mark in headers
...
using __dso_public.
2014-06-26 15:51:15 -06:00
Todd C. Miller
4d37a4a162
Top level directory reorg
...
Move src/po -> po
Combine common and compat -> lib/util
Move zlib -> lib/zlib
2014-06-26 15:51:02 -06:00
Todd C. Miller
826e190f31
Ignore signals sent by the command's process group, not just the
...
command itself. If we cannot determine the process group ID of the
sender (as it may no longer exist), just check the process ID.
2014-05-28 09:50:14 -06:00
Todd C. Miller
b121da2e21
In handler_user_only() only forward the signal if it was not generated
...
by the command. This should fix a problem with programs that catch
SIGTSTP, perform cleanup, and then re-send the signal to their
process group (of which sudo is the leader).
2014-05-27 10:51:31 -06:00
Todd C. Miller
d628e17ead
Handle EINTR from write(2) when writing to pipes and socket pairs.
2014-05-27 10:16:49 -06:00
Todd C. Miller
4eb0122e98
Norwegian Bokmaal translation for sudo from translationproject.com
2014-05-23 13:29:20 -06:00
Todd C. Miller
70f6249764
Sync with translationproject.org
2014-05-10 15:55:03 -06:00
Todd C. Miller
9cdf7797cf
When comparing tty names, resolve the tty for fds 0-3 and compare
...
each one instead of just using the first that resolves.
2014-05-07 15:25:05 -06:00
Todd C. Miller
7f0b9eca03
Add debugging info for when we delete I/O events that still have
...
buffered data in them.
2014-05-02 14:58:01 -06:00
Todd C. Miller
134b2a4228
Rename emalloc2() -> emallocarray() and erealloc3() -> ereallocarray().
2014-04-22 16:02:28 -06:00
Todd C. Miller
ac3ffde5e8
parse_gid_list() now returns -1 on error instead of calling fatalx().
2014-04-07 05:33:36 -06:00
Todd C. Miller
36b991348c
Forward SIGINFO to running command if supported. If the command
...
is being run in the background (or exec_background is set in sudoers),
it is the sudo process, not the actual command, that receives the ^T.
2014-04-04 15:30:15 -06:00
Todd C. Miller
a1240a5417
Use common printf format when warning of buffer overflow prevention.
2014-03-31 15:58:24 -06:00