Commit Graph

1666 Commits

Author SHA1 Message Date
Todd C. Miller
3ff8d5e781 Use memset() instead of zero_bytes() since we don't include sudoers.h 2010-10-11 15:51:21 -04:00
Todd C. Miller
5fc7233d2f sudo_preload_table is an array 2010-10-11 09:12:07 -04: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
6b4fe798d5 Move set_project() from sudoers module into sudo proper. 2010-10-01 13:52:42 -04:00
Todd C. Miller
413b7b55d1 Add missing signal_pipe[0] to fdsr for the non-pty case. 2010-10-01 12:03:47 -04:00
Todd C. Miller
f538ed4e35 Add dlopen() emulation for systems without it.
For HP-UX 10, emulate using shl_load().
For others, link sudoers plugin statically and use a lookup
table to emulate dlsym().
2010-09-26 17:41:35 -04:00
Todd C. Miller
ece29bdea1 Use SIG_SETMASK when resetting signal mask instead of SIG_UNBLOCK. 2010-09-14 09:25:52 -04:00
Todd C. Miller
01c7840dc5 Reset signal mask at sudo startup time; we need to be able to rely on
normal signal delivery to control the child process.
2010-09-14 09:23:19 -04:00
Todd C. Miller
c04f48b4bf Quiet gcc warnings on glibc systems that use warn_unused_result for
write(2).
2010-09-11 09:26:09 -04:00
Todd C. Miller
66bea8c4c9 Read as many signals on the signal pipe as we can before returning. 2010-09-10 11:27:20 -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
e069b74dc8 Convert sudoers plugin to use interface list passed in settings. 2010-09-08 15:07:40 -04:00
Todd C. Miller
1009d7a3e6 Query local network interfaces in the main sudo driver and pass to
the plugin as "network_addrs" in the settings list.
2010-09-08 14:20:11 -04:00
Todd C. Miller
10c3bb62c4 Make local includes consistent; use double quotes for local includes
except for generated ones where we use angle brackets.
Also g/c unused compat.h.
2010-09-07 16:45:19 -04:00
Todd C. Miller
399381de99 Add #include of sys/types.h for .c files that include missing.h to
be sure that size_t and ssize_t are defined.
2010-08-30 09:14:41 -04:00
Todd C. Miller
2cef2bb5b0 When not logging I/O install a handler for SIGCONT and deliver it
to the command upon resume.  Fixes bugzilla #431
2010-08-24 08:42:47 -04:00
Todd C. Miller
9706b4c508 Fix typo that prevented compilation on Irix; Friedrich Haubensak 2010-08-17 09:51:12 -04:00
Todd C. Miller
f454727bb8 Merge compat.h and missing.h into missing.h 2010-08-16 14:05:44 -04:00
Todd C. Miller
10637f6e04 Make _sudo_printf return the number of characters printed on success
like printf(3).
2010-08-12 10:27:56 -04:00
Todd C. Miller
6bcd9efc0c Use gettimeofday() directly instead of via the gettime() wrapper. 2010-08-10 13:50:40 -04:00
Todd C. Miller
8dd8aa000e Remove some obsolete configure tests, ancient Unix systems are no
longer supported.
2010-08-10 13:44:05 -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
e11e4efb8f Do I/O logging in the C locale so the floating point numbers in the
timing file are not locale-dependent.
2010-07-27 09:45:20 -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
06a918b88f Pass install-sh -b~ here too. 2010-07-23 11:26:18 -04:00
Todd C. Miller
092a6935e1 Install binary files with -b~ to make a backup.
Fixes "text file busy" error on HP-UX during install.
2010-07-23 11:23:53 -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
006427345c Restore RLIMIT_NPROC after the uid switch if it appears that runas_setup()
did not do it for us.  Fixes a bash script problem on SuSE with RLIMIT_NPROC
set to RLIM_INFINITY.
2010-07-16 14:05:03 -04:00
Todd C. Miller
a33996e740 install-man -> install-doc 2010-07-13 08:36:19 -04:00
Todd C. Miller
7bcbce2078 Use http://rc.quest.com/topics/polypkg/ for packaging 2010-07-13 08:33:46 -04:00
Todd C. Miller
151db86e3b Do not strip binaries. 2010-07-12 18:06:46 -04:00
Todd C. Miller
ea4298bb54 Use mkstemps() instead of mkstemp() in sudoedit. This allows sudoedit
to preserve the file extension (if any) which may be used by the editor
(like emacs) to choose the editing mode.
2010-07-09 10:08:05 -04:00
Todd C. Miller
3f33f75b7a Add uninstall target 2010-07-07 11:42:36 -04:00
Todd C. Miller
17dbb33e57 Use RTLD_LAZY instead of RTLD_NOW; was using RTLD_NOW as a debugging aid. 2010-07-02 16:03:21 -04:00
Todd C. Miller
e6b48d415c Replace built-in non-unix group support with a sudoers group plugin.
Include a sample plugin that can read Unix-format group files.
2010-07-02 11:11:25 -04:00
Todd C. Miller
66eafd0994 Add a trailing slash to _PATH_SUDO_PLUGIN_DIR to simplify usage. 2010-07-02 10:53:47 -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
867ba48dbf Add check for setkeycreatecon() when --with-selinux is specified. 2010-06-24 15:31: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
46355186bb Quote any non-alphanumeric characters other than '_' or '-' when passing
a command to be run via the shell for the -s and -i options.
2010-06-16 15:27:40 -04:00
Todd C. Miller
2cd108304d Add Linux audit support. 2010-06-16 11:17:02 -04:00
Todd C. Miller
4fb8a83e6f Fix -A flag when askpass is specified in sudo.conf or if sudo doesn't need
to read a password.
2010-06-15 15:11:10 -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
b72a530fd0 Update copyright year 2010-06-14 12:19:49 -04:00
Todd C. Miller
a28a4764e6 Print configure args with verbose version information. 2010-06-11 10:53:44 -04:00
Todd C. Miller
047fc3876d Remove sigaction emulation
Use SA_INTERRUPT in sa_flags
2010-06-10 15:18:23 -04:00