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
ae0014d6f4
Attempt to handle systems with SA_SIGINFO but that lack SI_USER.
2014-07-28 20:25:46 -06:00
Todd C. Miller
bb9775879b
Make noexec parameter to sudo_execve() bool.
2014-01-08 17:02:22 -07:00
Todd C. Miller
1adeda54ef
Add support for preventing fds from getting clobbered by closefrom().
2013-12-20 11:14:32 -07:00
Todd C. Miller
bb45f8e84d
Very old systems (pre XPG 4.2) may not support MSG_WAITALL. The
...
likelihood of receiving a partial message is quite low so this is
not a big deal.
2013-11-12 15:14:58 -07:00
Todd C. Miller
83d2d25c4c
Convert the main sudo event loop to use the event subsystem.
...
Read events for I/O buffers are added before the loop starts.
Write events are added on demand as the buffers are filled.
2013-10-12 05:53:52 -06:00
Todd C. Miller
d6282d154a
Update copyright years.
2013-04-24 09:35:02 -04:00
Todd C. Miller
5cb928c512
If the policy plugin does not provide a close function, there is
...
no command timeout and no pty is required, skip the event loop and
just exec the command directly.
2013-02-23 14:19:07 -05:00
Todd C. Miller
99704cc101
Catch SIGINT, SIGQUIT and SIGTSTP in the front end before we execute
...
the command. If we get SIGINT or SIGQUIT, call the plugin close()
functions as if the command was interrupted. If we get SIGTSTP,
uninstall the handler and deliver SIGTSTP to ourselves.
2013-01-17 09:20:45 -05:00
Todd C. Miller
0655deab57
Fix a comment, update a variable name in a prototype; all cosmetic.
2012-08-07 14:47:58 -04:00
Todd C. Miller
dc08cf3c99
If we receive a signal from the command we executed, do not forward
...
it back to the command. This fixes a problem with BSD-derived
versions of the reboot command which send SIGTERM to all other
processes, including the sudo process. Sudo would then deliver
SIGTERM to reboot which would die before calling the reboot() system
call, effectively leaving the system in single user mode.
2012-08-06 14:38:35 -04:00
Todd C. Miller
d11e7febbc
Refactor disable_execute() and my_execve() into exec_common.c for
...
use by sesh.c. This fixes NOEXEC when SELinux is used. Instead
of disabling exec in exec_setup(), disable it immediately before
executing the command. Adapted from a diff by Arno Schuring.
2012-01-25 14:58:02 -05:00
Todd C. Miller
21a2f95821
Use stdbool.h instead of rolling our own TRUE/FALSE macros.
2011-12-02 11:27:33 -05:00
Todd C. Miller
2041d39db7
Add support for ut_exit
2011-03-15 16:18:33 -04:00
Todd C. Miller
3506f01077
Add support for controlling whether utmp is updated and which user is
...
listed in the entry.
2011-03-15 15:53:49 -04:00
Todd C. Miller
8653ccc809
Redo utmp handling. If no getutent()/getutxent() is available,
...
assume a ttyslot-based utmp. If getttyent() is available, use
that directly instead of ttyslot() so we don't have to do the
stdin dup2 dance.
2011-03-14 10:20:47 -04:00
Todd C. Miller
1e9def1efa
Move utmp handling into utmp.c
2011-03-11 15:54:12 -05:00
Todd C. Miller
53da5e8cdf
Update copyright years.
2011-03-11 15:34:35 -05:00
Todd C. Miller
c7a7d31905
Add support for disabling exec via solaris privileges.
...
Includes preparation for moving noexec support out of sudoers
and into front end as documented.
2011-03-10 14:24:10 -05:00
Todd C. Miller
1496bfed6c
Add support for adding a utmp entry when allocating a new pty.
...
Requires the BSD login(3) or SYSV/POSIX getutent()/getutxent().
Currently only creates a new entry if the existing tty has
a utmp entry.
2011-03-08 15:37:40 -05:00
Todd C. Miller
2959d5dadd
Use special values SIGCONT_FG and SIGCONT_BG instead of SIGUSR1 and
...
SIGUSR2 to indicate whether the child should be continued in the
foreground or background.
2011-02-03 09:59:41 -05:00
Todd C. Miller
59399d55c3
Instead of using a array to store received signals, open a pipe and
...
have the signal handler write the signal number to one end and
select() on the other end. This makes it possible to handle signals
similar to I/O without race conditions.
2010-09-10 11:20:32 -04:00
Todd C. Miller
d018936b4e
Move functions and symbols shared between exec.c and exec_pty.c
...
into sudo_exec.h.
2010-06-16 16:46:56 -04:00