Todd C. Miller
5fc2f8f454
Pass SIGUSR1/SIGUSR2 through to the child.
2011-02-03 10:25:42 -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
82c85571c9
Remove obsolete comment
2011-02-02 14:24:48 -05:00
Todd C. Miller
8a64a8c798
If we get a signal other than SIGCHLD in the monitor, pass it directly
...
to the child.
2011-02-02 13:27:24 -05:00
Todd C. Miller
c18468d1a5
Save signal state before changing handlers and restore before
...
we execute the command.
2011-02-02 12:44:35 -05:00
Todd C. Miller
ae2f7638f5
standardize on "return foo;" rather than "return(foo);" or "return (foo);"
2011-01-24 15:15:18 -05:00
Todd C. Miller
e2f253e51d
Fix TCGETWINSZ compat.
2010-10-07 14:11:10 -04:00
Todd C. Miller
1a4990f571
Prefer newer TIOCGWINSZ ioctl to old TIOCGSIZE
2010-10-02 17:11:07 -04: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
420db23714
Quiet gcc warnings on glibc systems that use warn_unused_result for
...
write(2) and others.
2010-08-03 11:17:56 -04:00
Todd C. Miller
23c96fbc2e
Handle ENXIO from read/write which can occur when reading/writing
...
a pty that has gone away.
2010-07-26 13:04:11 -04:00
Todd C. Miller
c9e86ab3b9
The return value of strsignal() may be const and should be treated
...
as const regardless.
2010-07-21 15:57:37 -04:00
Todd C. Miller
30fe4a067c
Set usrinfo for AIX
...
Set adminstrative domain for the process when looking up user's
password or group info and when preparing for execve().
Include strings.h even if string.h exists since they may define
different things. Fixes warnings on AIX and others.
2010-06-29 13:08:05 -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
Todd C. Miller
f64bb67c6c
Clean up some XXXs
2010-06-15 15:01:11 -04:00
Todd C. Miller
54ffb19ccb
remove setsid check, we require a POSIX system
2010-06-15 09:24:56 -04:00
Todd C. Miller
c2f8d24f20
Check for dup2() failure.
2010-06-15 09:02:23 -04:00
Todd C. Miller
d27223b4c7
Call selinux_restore_tty() as part of cleanup() so it gets called
...
from error()/errorx()
2010-06-14 15:09:15 -04:00
Todd C. Miller
047fc3876d
Remove sigaction emulation
...
Use SA_INTERRUPT in sa_flags
2010-06-10 15:18:23 -04:00
Todd C. Miller
34613c8465
Use a flag bit in struct command_details for selinux instead of a separate
...
field.
2010-06-09 16:25:44 -04:00
Todd C. Miller
4c1ef12648
Implement background mode. If I/O logging we use pipes instead of a pty.
2010-06-09 16:19:45 -04:00
Todd C. Miller
c5a6ca998a
Move compat definition of NSIG to compat.h
2010-06-09 13:57:07 -04:00
Todd C. Miller
e5283b2f96
Require POSIX termios to build sudo
2010-06-09 11:09:55 -04:00
Todd C. Miller
51f70f2040
Use POSIX tcgetpgrp() instead of BSD TIOCGPGRP ioctl
2010-06-09 09:54:58 -04:00
Todd C. Miller
edd34a2d7e
Add selinux_enabled flag into struct command_details and
...
set it in command_info_to_details().
Return an error from selinux_setup() instead of exiting.
Call selinux_setup() from exec_setup().
2010-06-08 17:59:18 -04:00
Todd C. Miller
ecfb70b056
Remove commented out copy of old sudo_execve() function.
2010-06-09 09:22:44 -04:00
Todd C. Miller
0be6bab05c
Remove duplicate call to selinux_setup().
2010-06-08 16:16:08 -04:00
Todd C. Miller
6717c59d77
Split exec.c into exec.c and exec_pty.c
2010-06-07 18:06:22 -04:00