Commit Graph

6336 Commits

Author SHA1 Message Date
Todd C. Miller
054e448081 Don't permanently add -D_FORTIFY_SOURCE=2 to CPPFLAGS 2012-02-10 14:28:10 -05:00
Todd C. Miller
ef7dcd5197 Add Mac OS X support, printing the latest chunk of the NEWS file
and the license text in the installer.
2012-02-10 12:50:15 -05:00
Todd C. Miller
37570290c7 Add explicit file modes that match those used by "make install" 2012-02-10 12:35:41 -05:00
Todd C. Miller
86f809ab47 Sync with upstream for Mac OS X fixes. 2012-02-10 11:34:08 -05:00
Todd C. Miller
dfbd6e429b Got back to using "install-sh -M" for files installed as non-readable
by owner.  This fixes "make install" as non-root for package building.
2012-02-10 11:31:54 -05:00
Todd C. Miller
5c941edc97 Sync with translationproject.org 2012-02-09 11:17:35 -05:00
Todd C. Miller
cb66fc6f10 Use -m not -M for install-sh for everything except setuid.
Install locale .mo files mode 0444, not 0644.
If timedir parent doesn't exist, use default dir mode, not 0700.
2012-02-09 11:11:58 -05:00
Todd C. Miller
12eba56fdc Re-sync with upstream; no longer need a local patch. 2012-02-07 13:26:27 -05:00
Todd C. Miller
5afbdab23b Add support for building Mac OS X packages. 2012-02-07 11:49:46 -05:00
Todd C. Miller
8891688e64 Sync with upstream 2012-02-07 11:45:42 -05:00
Todd C. Miller
c4d3f289f3 No longer need to define _PATH_SUDO_CONF here. 2012-02-07 11:45:11 -05:00
Todd C. Miller
cd0e10e1b7 Fix noexec for Mac OS X. 2012-02-07 00:18:08 -05:00
Todd C. Miller
d35f50bd65 Move _PATH_SUDO_CONF override to common to match sudo_debug.c 2012-02-06 15:57:26 -05:00
Todd C. Miller
e066ff5caf More complete fix for LDR_PRELOAD on AIX. The addition of
set_perm(PERM_ROOT) before calling the nss open functions (needed
to avoid a GNU TLS bug) also broke LDR_PRELOAD.  Setting the effective
and then real uid to 0 for PERM_ROOT works around the issue.
2012-02-06 15:46:17 -05:00
Todd C. Miller
8dd16b63d2 regen 2012-02-06 13:40:24 -05:00
Todd C. Miller
c6ef580100 Set real uid to root before calling sudo_edit() or run_command()
so that the monitor process is owned by root and not by the user.
Otherwise, on AIX at least, the monitor process shows up in ps as
belonging to the user (and can be killed by the user).
2012-02-06 13:33:46 -05:00
Todd C. Miller
656807823d For PERM_ROOT when using setreuid(), only set the euid to 0 prior
to the call to setuid(0) if the current euid is non-zero.  This
effectively restores the state of things prior to rev 7bfeb629fccb.
Fixes a problem on AIX where LDR_PRELOAD was not being honored for
the command being executed.
2012-02-06 13:29:19 -05:00
Todd C. Miller
8c1d8a7b15 Make a copy of the struct passwd in exec_setup() to make sure nothing
in the policy init modifies it.
2012-02-06 10:56:39 -05:00
Todd C. Miller
b28dfa5011 update copyright 2012-02-05 13:35:20 -05:00
Todd C. Miller
e16ae617e4 g/c now-unused debug subsystems 2012-02-05 10:17:26 -05:00
Todd C. Miller
c32bd3db54 Enumerate the debug subsystems used by sudo and sudoers. 2012-02-05 10:17:09 -05:00
Todd C. Miller
c970d464cb Normally, sudo disables core dumps while it is running. This
behavior can now be modified at run time with a line in sudo.conf
like "Set disable_coredumps false"
2012-02-03 14:57:03 -05:00
Todd C. Miller
e6fbba6986 Mention Spanish translation 2012-02-03 12:31:24 -05:00
Todd C. Miller
c91f5ee680 Make sure we don't try to fall back to using the conversation
function for debugging in the main sudo process if we are unable
to open the debug file.
2012-02-03 12:30:07 -05:00
Todd C. Miller
2a2d2c4cd5 Add sudo Spanish translation from translationproject.org 2012-02-03 09:15:14 -05:00
Todd C. Miller
3da971ba33 Better debug subsystem usage 2012-02-02 11:28:33 -05:00
Todd C. Miller
f5f9aadccc Remove duplicate function prototypes 2012-02-02 11:28:19 -05:00
Todd C. Miller
f1fef17d83 Error out if user specified --with-pam but we can't find the headers
or library.  Also throw an error if the headers are present but the
library is not and vice versa.
2012-02-01 11:27:50 -05:00
Todd C. Miller
491b4495f5 Fix the sudoers permission check when the expected sudoers mode is
owner-writable.
2012-01-31 16:24:57 -05:00
Todd C. Miller
c894f802d3 Verify that we can link executables built with -D_FORTIFY_SOURCE
before using it.
2012-01-30 14:09:17 -05:00
Todd C. Miller
ca4a338c45 Fix potential off-by-one when making a copy of the environment for
LD_PRELOAD insertion.  Fixes bug #534
2012-01-30 13:49:24 -05:00
Todd C. Miller
7908621ba0 Add rudimentary check for _FORTIFY_SOURCE support by checking for
__sprintf_chk, one of the functions used by gcc to support it.
2012-01-30 10:09:23 -05:00
Todd C. Miller
da6fe1230f Use AC_HEADER_STDBOOL instead of checking for stdbool.h ourselves. 2012-01-30 09:28:11 -05:00
Todd C. Miller
f3f986c75d regen 2012-01-29 14:48:20 -05:00
Todd C. Miller
1877c455d1 The change in 818e82ecbbfc that caused to exit when the monitor
dies created a race condition between the monitor exiting and the
status being read.  All we really want to do is make sure that
select() notifies us that there is a status change when the monitor
dies unexpectedly so shutdown the socketpair connected to the monitor
for writing when it dies.  That way we can still read the status
that is pending on the socket and select() on Linux will tell us
that the fd is ready.
2012-01-25 16:29:08 -05: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
e852bf4374 Add custom version of AC_CHECK_LIB that uses the extra libs in the
cache value name.  With this we no longer need to rely on a modified
version of autoconf.
2012-01-20 10:28:56 -05:00
Todd C. Miller
d337a532ac Better handling of network functions that need -lsocket -lnsl 2012-01-19 14:19:37 -05:00
Todd C. Miller
66a66729af When setting up the execution environment, set groups before gid/egid
like sudo 1.7 did.
2012-01-19 12:55:23 -05:00
Todd C. Miller
8e3691c38e Remove "WARNING: unable to find foo() trying -lsocket -lnsl" 2012-01-19 11:09:22 -05:00
Todd C. Miller
a5dfea7cd4 For "sudo -g" prepend the specified group ID to the beginning of
the groups list.  This matches BSD convention where the effective
gid is the first entry in the group list.  This is required on newer
FreeBSD where the effective gid is not tracked separately and thus
setgroups() changes the egid if this convention is not followed.
Fixes bug #532
2012-01-19 11:03:22 -05:00
Todd C. Miller
7747b481dd Fix sh warning; use "test" instead of "[" 2012-01-17 13:07:35 -05:00
Todd C. Miller
2fd77381a1 When not logging I/O, use a signal handler that only forwards SIGINT,
SIGQUIT and SIGHUP when they are user-generated signals.  Fixes a
race in the non-I/O logging path where the command may receive two
keyboard-generated signals; one from the kernel and one from the
sudo process.
2012-01-17 10:27:33 -05:00
Todd C. Miller
97cecaf6eb Back out change that put the command in its own pgrp when not logging
I/O.  It causes problems with pipelines.
2012-01-17 10:25:44 -05:00
Todd C. Miller
40badb50e6 Only run compat regress tests on compat objects we actually build.
Fixes "make check" in the compat dir for systems that don't implement
character classes in fnmatch() or glob().  Bug #531
2012-01-16 10:40:11 -05:00
Todd C. Miller
0df60d8ec0 Update po files from translationproject.org 2012-01-14 07:19:43 -05:00
Todd C. Miller
4baffc7801 Include parent directories in case they don't already exist. This
fixes a directory permissions problem with the AIX package when the
/usr/local directories don't already exist.
2012-01-13 09:49:20 -05:00
Todd C. Miller
4d8a8e0156 sync with git version 2012-01-13 09:06:08 -05:00
Todd C. Miller
ee0fb36d8b regen dependencies 2012-01-13 06:02:17 -05:00
Todd C. Miller
106bbebba7 Move tty name lookup code to its own file. 2012-01-13 06:01:58 -05:00