]> granicus.if.org Git - sudo/log
sudo
12 years agoDon't try to erealloc() a potentially freed pointer.
Todd C. Miller [Wed, 23 May 2012 15:24:19 +0000 (11:24 -0400)]
Don't try to erealloc() a potentially freed pointer.

--HG--
branch : 1.7

12 years agoPrefer KERN_PROC2 over KERN_PROC. Fixes compilation on some versions
Todd C. Miller [Wed, 23 May 2012 15:23:31 +0000 (11:23 -0400)]
Prefer KERN_PROC2 over KERN_PROC.  Fixes compilation on some versions
of OpenBSD versions that have KERN_PROC2 but not KERN_PROC.

--HG--
branch : 1.7

12 years agoClarify what "sudoreplay -l" displays and mention that it is sorted.
Todd C. Miller [Wed, 23 May 2012 15:20:11 +0000 (11:20 -0400)]
Clarify what "sudoreplay -l" displays and mention that it is sorted.

--HG--
branch : 1.7

12 years agoiIf struct dirent has d_type, use it to avoid an extra stat().
Todd C. Miller [Wed, 23 May 2012 15:14:41 +0000 (11:14 -0400)]
iIf struct dirent has d_type, use it to avoid an extra stat().

--HG--
branch : 1.7

12 years agoSort output of "sudoreplay -l"
Todd C. Miller [Wed, 23 May 2012 15:05:11 +0000 (11:05 -0400)]
Sort output of "sudoreplay -l"

--HG--
branch : 1.7

12 years agoIf I/O log file includes rows + cols, warn if the user's tty is
Todd C. Miller [Wed, 23 May 2012 14:55:54 +0000 (10:55 -0400)]
If I/O log file includes rows + cols, warn if the user's tty is
not big enough.

--HG--
branch : 1.7

12 years agoFix printing of TSID in "sudoreplay -l"
Todd C. Miller [Wed, 23 May 2012 14:32:38 +0000 (10:32 -0400)]
Fix printing of TSID in "sudoreplay -l"

--HG--
branch : 1.7

12 years agoFix printf format warning (time_t vs. long)
Todd C. Miller [Wed, 23 May 2012 14:31:14 +0000 (10:31 -0400)]
Fix printf format warning (time_t vs. long)

--HG--
branch : 1.7

12 years agoAdd support for replaying sessions from sudo 1.8 when iolog_file
Todd C. Miller [Wed, 23 May 2012 14:28:58 +0000 (10:28 -0400)]
Add support for replaying sessions from sudo 1.8 when iolog_file
is set to something other than %{seq}.

--HG--
branch : 1.7

12 years agotypo fix in comment
Todd C. Miller [Tue, 22 May 2012 20:28:36 +0000 (16:28 -0400)]
typo fix in comment

--HG--
branch : 1.7

12 years agoAdd entry for SSL LDAP errors on Mozilla SDKs when the cert dir is
Todd C. Miller [Tue, 22 May 2012 20:27:34 +0000 (16:27 -0400)]
Add entry for SSL LDAP errors on Mozilla SDKs when the cert dir is
not specified.

--HG--
branch : 1.7

12 years agoMatch CentOS 6.0
Todd C. Miller [Tue, 22 May 2012 20:25:50 +0000 (16:25 -0400)]
Match CentOS 6.0

--HG--
branch : 1.7

12 years agoFix test for -z relro
Todd C. Miller [Tue, 22 May 2012 19:46:00 +0000 (15:46 -0400)]
Fix test for -z relro

--HG--
branch : 1.7

12 years agoBuild with -fstack-protector and link with -zrelo where supported.
Todd C. Miller [Tue, 22 May 2012 17:26:38 +0000 (13:26 -0400)]
Build with -fstack-protector and link with -zrelo where supported.
Added --disable-hardening option to disable hardening options.

--HG--
branch : 1.7

12 years agoIf sudoers_mode is group-readable but the actual sudoers file is
Todd C. Miller [Mon, 21 May 2012 18:24:27 +0000 (14:24 -0400)]
If sudoers_mode is group-readable but the actual sudoers file is
not, open the file as uid 0, not uid 1.  This fixes a problem when
sudoers has a more restrictive mode than what sudo expects to find.
In older versions, sudo would silently chmod the file to add the
group-readable bit.

--HG--
branch : 1.7

12 years agoFix #includedir; from Mike Frysinger
Todd C. Miller [Thu, 17 May 2012 19:44:22 +0000 (15:44 -0400)]
Fix #includedir; from Mike Frysinger

--HG--
branch : 1.7

12 years agoRelax the user/group/mode checks on sudoers files. As long as the
Todd C. Miller [Thu, 17 May 2012 16:09:56 +0000 (12:09 -0400)]
Relax the user/group/mode checks on sudoers files.  As long as the
file is owned by the right user, not world-writable and not writable
by a group other than the one specified at configure time (gid 0
byile is considered OK.  Note that visudo will still
set the mode to the value specified at configure time.

--HG--
branch : 1.7

12 years agoRelax the user/group/mode checks on sudoers files. As long as the
Todd C. Miller [Thu, 17 May 2012 16:07:18 +0000 (12:07 -0400)]
Relax the user/group/mode checks on sudoers files.  As long as the
file is owned by the right user, not world-writable and not writable
by a group other than the one specified at configure time (gid 0
byile is considered OK.  Note that visudo will still
set the mode to the value specified at configure time.

--HG--
branch : 1.7

12 years agoDelete creds after closing the PAM session.
Todd C. Miller [Thu, 17 May 2012 15:45:12 +0000 (11:45 -0400)]
Delete creds after closing the PAM session.

--HG--
branch : 1.7

12 years agoFix typo in last commit
Todd C. Miller [Thu, 17 May 2012 15:36:24 +0000 (11:36 -0400)]
Fix typo in last commit

--HG--
branch : 1.7

12 years agoInstead of treating ^C from tgetpass() specially, always
Todd C. Miller [Thu, 17 May 2012 15:23:54 +0000 (11:23 -0400)]
Instead of treating ^C from tgetpass() specially, always
return AUTH_INTR if tgetpass() returned NULL.
Treat PAM_AUTHINFO_UNAVAIL like PAM_AUTH_ERR which Mac OS X
returns this when there is no tty.

--HG--
branch : 1.7

12 years agoNeed to call ldapssl_clientauth_init() for start_tls on Mozilla
Todd C. Miller [Thu, 17 May 2012 15:04:33 +0000 (11:04 -0400)]
Need to call ldapssl_clientauth_init() for start_tls on Mozilla
LDAP SDK.

--HG--
branch : 1.7

12 years agoFix printing of invalid uri
Todd C. Miller [Thu, 17 May 2012 15:03:53 +0000 (11:03 -0400)]
Fix printing of invalid uri

--HG--
branch : 1.7

12 years agoProvide a more useful error message if using a Mozilla-style LDAP
Todd C. Miller [Thu, 17 May 2012 15:03:18 +0000 (11:03 -0400)]
Provide a more useful error message if using a Mozilla-style LDAP
SDK and you forgot to specify TLS_CERT in ldap.conf.

--HG--
branch : 1.7

12 years agoSplit global and per-connection LDAP options into separate arrays.
Todd C. Miller [Thu, 17 May 2012 14:58:44 +0000 (10:58 -0400)]
Split global and per-connection LDAP options into separate arrays.
Set global LDAP options before calling ldap_initialize() or ldap_init().
After we have an LDAP handle, set the per-connection options.
Fixes a problem with OpenLDAP using the nss crypto backend; bug #342

--HG--
branch : 1.7

12 years agoQuiet some compiler warnings
Todd C. Miller [Wed, 16 May 2012 20:06:30 +0000 (16:06 -0400)]
Quiet some compiler warnings

--HG--
branch : 1.7

12 years agoFix compiler warnings on some platforms and provide a better method
Todd C. Miller [Wed, 16 May 2012 19:50:42 +0000 (15:50 -0400)]
Fix compiler warnings on some platforms and provide a better method
of defeating gcc's warn_unused_result attribute.

--HG--
branch : 1.7

12 years agoAdded tag SUDO_1_7_9p1 for changeset 26d9603eb5af
Todd C. Miller [Tue, 15 May 2012 14:05:10 +0000 (10:05 -0400)]
Added tag SUDO_1_7_9p1 for changeset 26d9603eb5af

--HG--
branch : 1.7

12 years agoUpdate for sudo 1.7.9p1 SUDO_1_7_9p1
Todd C. Miller [Mon, 14 May 2012 18:49:11 +0000 (14:49 -0400)]
Update for sudo 1.7.9p1

--HG--
branch : 1.7

12 years agoAdd missing break between AF_INET and AF_INET6 in addr_matches_if_netmask()
Todd C. Miller [Mon, 14 May 2012 18:47:47 +0000 (14:47 -0400)]
Add missing break between AF_INET and AF_INET6 in addr_matches_if_netmask()

--HG--
branch : 1.7

12 years agoThe pointer to the siginfo_t struct in a signal handler may be NULL.
Todd C. Miller [Fri, 11 May 2012 15:00:07 +0000 (11:00 -0400)]
The pointer to the siginfo_t struct in a signal handler may be NULL.

--HG--
branch : 1.7

12 years agoFix an alignment problem on NetBSD systems with a 64-bit time_t and
Todd C. Miller [Thu, 10 May 2012 19:22:27 +0000 (15:22 -0400)]
Fix an alignment problem on NetBSD systems with a 64-bit time_t and
strict alignment.  Based on a patch from Martin Husemann.

--HG--
branch : 1.7

12 years agoAdd offsetof macro for those without it.
Todd C. Miller [Thu, 10 May 2012 19:22:20 +0000 (15:22 -0400)]
Add offsetof macro for those without it.

--HG--
branch : 1.7

12 years agoAdd mode for docdir. Fixes a problem on Linux when building in a
Todd C. Miller [Tue, 1 May 2012 17:48:17 +0000 (13:48 -0400)]
Add mode for docdir.  Fixes a problem on Linux when building in a
directory with the setgid bit set.

--HG--
branch : 1.7

12 years agoSync with upstream for Mac OS X (and other) fixes.
Todd C. Miller [Tue, 24 Apr 2012 13:23:47 +0000 (09:23 -0400)]
Sync with upstream for Mac OS X (and other) fixes.

--HG--
branch : 1.7

12 years agoDebian sudo has not been built with --with-exempt=sudo since 1.6.8.
Todd C. Miller [Mon, 23 Apr 2012 20:53:24 +0000 (16:53 -0400)]
Debian sudo has not been built with --with-exempt=sudo since 1.6.8.

--HG--
branch : 1.7

12 years agoOnly build Mac intel universal binary on an intel machine.
Todd C. Miller [Mon, 23 Apr 2012 20:53:12 +0000 (16:53 -0400)]
Only build Mac intel universal binary on an intel machine.
When building on Mac OS X, set SDK_FLAGS if specified osversion
doesn't match host.

--HG--
branch : 1.7

12 years agoAdd missing initialization of a sigaction structure when I/O logging.
Todd C. Miller [Mon, 23 Apr 2012 18:56:48 +0000 (14:56 -0400)]
Add missing initialization of a sigaction structure when I/O logging.
Fixes a potential problem when suspending the command.

--HG--
branch : 1.7

12 years agoDo not use GLOB_BRACE or GLOB_TILDE flags to glob()--we want the
Todd C. Miller [Sun, 8 Apr 2012 23:40:03 +0000 (19:40 -0400)]
Do not use GLOB_BRACE or GLOB_TILDE flags to glob()--we want the
glob() and fnmatch() results to be consistent.

--HG--
branch : 1.7

12 years agofix typo in last commit
Todd C. Miller [Fri, 30 Mar 2012 19:36:04 +0000 (15:36 -0400)]
fix typo in last commit

--HG--
branch : 1.7

12 years agoUse ecalloc() when allocating structs.
Todd C. Miller [Fri, 30 Mar 2012 19:26:01 +0000 (15:26 -0400)]
Use ecalloc() when allocating structs.

--HG--
branch : 1.7

12 years agoAdd ecalloc().
Todd C. Miller [Fri, 30 Mar 2012 18:55:02 +0000 (14:55 -0400)]
Add ecalloc().

--HG--
branch : 1.7

12 years agoUse error() instead of log_fatal()
Todd C. Miller [Fri, 30 Mar 2012 18:26:49 +0000 (14:26 -0400)]
Use error() instead of log_fatal()

--HG--
branch : 1.7

12 years agog/c __unused which is no longer used
Todd C. Miller [Fri, 30 Mar 2012 17:55:08 +0000 (13:55 -0400)]
g/c __unused which is no longer used

--HG--
branch : 1.7

12 years agoRemove the NO_EXIT flag to log_error() and add a log_fatal() function
Todd C. Miller [Fri, 30 Mar 2012 17:53:19 +0000 (13:53 -0400)]
Remove the NO_EXIT flag to log_error() and add a log_fatal() function
that exits and is marked no_return.  Fixes false positives from
static analyzers and is easier for humans to read too.

--HG--
branch : 1.7

12 years agocast ctype(3) function/macro arguments from char to unsigned char to
Todd C. Miller [Fri, 30 Mar 2012 17:35:36 +0000 (13:35 -0400)]
cast ctype(3) function/macro arguments from char to unsigned char to
avoid potential negative subscripting.

--HG--
branch : 1.7

12 years agoWhen initializing the environment for env_reset, start out with the
Todd C. Miller [Fri, 30 Mar 2012 17:34:19 +0000 (13:34 -0400)]
When initializing the environment for env_reset, start out with the
contents of /etc/environment on AIX and login.conf on BSD.  Also
apply environment in login.conf for "sudo -i".

--HG--
branch : 1.7

12 years agoAdd entry for AIX enhanced RBAC config.
Todd C. Miller [Fri, 30 Mar 2012 16:59:35 +0000 (12:59 -0400)]
Add entry for AIX enhanced RBAC config.

--HG--
branch : 1.7

12 years agoIf we are not running with an effective uid of 0, try to give the
Todd C. Miller [Fri, 30 Mar 2012 16:58:54 +0000 (12:58 -0400)]
If we are not running with an effective uid of 0, try to give the
user enough information to debug the problem.

--HG--
branch : 1.7

12 years agoIf the "timestampowner" user cannot be resolved, use uid 0 instead
Todd C. Miller [Fri, 30 Mar 2012 16:51:32 +0000 (12:51 -0400)]
If the "timestampowner" user cannot be resolved, use uid 0 instead
of exiting with a fatal error.

--HG--
branch : 1.7

12 years agoFor PAM authentication, merge the PAM environment with the user
Todd C. Miller [Fri, 30 Mar 2012 16:47:42 +0000 (12:47 -0400)]
For PAM authentication, merge the PAM environment with the user
environment in pam_begin_session().

--HG--
branch : 1.7

12 years agoQuiet compiler warning when SELinux is enabled.
Todd C. Miller [Fri, 30 Mar 2012 16:46:37 +0000 (12:46 -0400)]
Quiet compiler warning when SELinux is enabled.

--HG--
branch : 1.7

12 years agoDon't read /etc/environment on Linux when using PAM, PAM should set
Todd C. Miller [Fri, 30 Mar 2012 16:35:02 +0000 (12:35 -0400)]
Don't read /etc/environment on Linux when using PAM, PAM should set
the environment variables as needed via pam_env.

--HG--
branch : 1.7

12 years agoAdd check for pam_getenvlist()
Todd C. Miller [Fri, 30 Mar 2012 16:32:47 +0000 (12:32 -0400)]
Add check for pam_getenvlist()

--HG--
branch : 1.7

12 years agoUse normal error path if unable to set sudoers gid.
Todd C. Miller [Fri, 30 Mar 2012 16:30:36 +0000 (12:30 -0400)]
Use normal error path if unable to set sudoers gid.

--HG--
branch : 1.7

12 years agoMake sudoersdir relative to PKG_INSTALL_ROOT for Solaris.
Todd C. Miller [Fri, 30 Mar 2012 16:27:12 +0000 (12:27 -0400)]
Make sudoersdir relative to PKG_INSTALL_ROOT for Solaris.
Make sure sudoers file is writable before trying to edit it.

--HG--
branch : 1.7

12 years agoAdd execvpe(), exect(), posix_spawn() and posix_spawnp() wrappers
Todd C. Miller [Fri, 30 Mar 2012 13:44:25 +0000 (09:44 -0400)]
Add execvpe(), exect(), posix_spawn() and posix_spawnp() wrappers
to sudo_noexec.c.

--HG--
branch : 1.7

12 years agoUpdate zlib to version 1.2.6
Todd C. Miller [Thu, 29 Mar 2012 18:30:13 +0000 (14:30 -0400)]
Update zlib to version 1.2.6

--HG--
branch : 1.7

12 years agoIf there is nothing to read from the askpass program, set errno to
Todd C. Miller [Tue, 27 Mar 2012 16:39:11 +0000 (12:39 -0400)]
If there is nothing to read from the askpass program, set errno to
EINTR.  This makes the cancel button behave like the user entered
^C at the password prompt when PAM is used.

--HG--
branch : 1.7

12 years agoAdded tag SUDO_1_7_9 for changeset d896e8043fe6
Todd C. Miller [Fri, 17 Feb 2012 18:47:43 +0000 (13:47 -0500)]
Added tag SUDO_1_7_9 for changeset d896e8043fe6

--HG--
branch : 1.7

12 years agoBuild flat packages, not package bundles, on Mac OS X. SUDO_1_7_9
Todd C. Miller [Thu, 16 Feb 2012 18:13:19 +0000 (13:13 -0500)]
Build flat packages, not package bundles, on Mac OS X.

--HG--
branch : 1.7

12 years agoMake sudo_goodpath() return value boolean
Todd C. Miller [Fri, 10 Feb 2012 19:56:41 +0000 (14:56 -0500)]
Make sudo_goodpath() return value boolean

--HG--
branch : 1.7

12 years agoDon't permanently add -D_FORTIFY_SOURCE=2 to CPPFLAGS
Todd C. Miller [Fri, 10 Feb 2012 19:29:28 +0000 (14:29 -0500)]
Don't permanently add -D_FORTIFY_SOURCE=2 to CPPFLAGS

--HG--
branch : 1.7

12 years agoAdd Mac OS X support, printing the latest chunk of the NEWS file
Todd C. Miller [Fri, 10 Feb 2012 17:59:58 +0000 (12:59 -0500)]
Add Mac OS X support, printing the latest chunk of the NEWS file
and the license text in the installer.

--HG--
branch : 1.7

12 years agoAdd explicit file modes that match those used by "make install"
Todd C. Miller [Fri, 10 Feb 2012 17:55:13 +0000 (12:55 -0500)]
Add explicit file modes that match those used by "make install"

--HG--
branch : 1.7

12 years agoSync with upstream for Mac OS X fixes.
Todd C. Miller [Fri, 10 Feb 2012 17:52:52 +0000 (12:52 -0500)]
Sync with upstream for Mac OS X fixes.

--HG--
branch : 1.7

12 years agoGot back to using "install-sh -M" for files installed as non-readable
Todd C. Miller [Fri, 10 Feb 2012 17:52:22 +0000 (12:52 -0500)]
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.

--HG--
branch : 1.7

12 years agoUse -m not -M for install-sh for everything except setuid.
Todd C. Miller [Thu, 9 Feb 2012 16:13:40 +0000 (11:13 -0500)]
Use -m not -M for install-sh for everything except setuid.
If timedir parent doesn't exist, use default dir mode, not 0700.

--HG--
branch : 1.7

12 years agoRe-sync with upstream; no longer need a local patch.
Todd C. Miller [Tue, 7 Feb 2012 18:27:15 +0000 (13:27 -0500)]
Re-sync with upstream; no longer need a local patch.

--HG--
branch : 1.7

12 years agoAdd support for building Mac OS X packages.
Todd C. Miller [Tue, 7 Feb 2012 16:50:26 +0000 (11:50 -0500)]
Add support for building Mac OS X packages.

--HG--
branch : 1.7

12 years agoSync with upstream
Todd C. Miller [Tue, 7 Feb 2012 16:46:40 +0000 (11:46 -0500)]
Sync with upstream

--HG--
branch : 1.7

12 years agoError out if user specified --with-pam but we can't find the headers
Todd C. Miller [Wed, 1 Feb 2012 17:12:53 +0000 (12:12 -0500)]
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.

--HG--
branch : 1.7

12 years agoFix the sudoers permission check when the expected sudoers mode is
Todd C. Miller [Tue, 31 Jan 2012 21:25:07 +0000 (16:25 -0500)]
Fix the sudoers permission check when the expected sudoers mode is
owner-writable.

--HG--
branch : 1.7

12 years agoVerify that we can link executables built with -D_FORTIFY_SOURCE
Todd C. Miller [Mon, 30 Jan 2012 20:03:40 +0000 (15:03 -0500)]
Verify that we can link executables built with -D_FORTIFY_SOURCE
before using it.

--HG--
branch : 1.7

12 years agoAdd rudimentary check for _FORTIFY_SOURCE support by checking for
Todd C. Miller [Mon, 30 Jan 2012 15:12:14 +0000 (10:12 -0500)]
Add rudimentary check for _FORTIFY_SOURCE support by checking for
__sprintf_chk, one of the functions used by gcc to support it.

--HG--
branch : 1.7

12 years agoadd 1.7.8p2
Todd C. Miller [Mon, 30 Jan 2012 15:11:14 +0000 (10:11 -0500)]
add 1.7.8p2

--HG--
branch : 1.7

12 years agoUpdate
Todd C. Miller [Thu, 26 Jan 2012 21:36:16 +0000 (16:36 -0500)]
Update

--HG--
branch : 1.7

12 years agoWe need to init the auth system regardless of whether we need a
Todd C. Miller [Thu, 26 Jan 2012 21:34:49 +0000 (16:34 -0500)]
We need to init the auth system regardless of whether we need a
password since we will be closing the PAM session in the monitor
process.  Fixes a crash in the monitor on Solaris; bugzilla #533

--HG--
branch : 1.7

12 years agoThe change in a1e7e31519ec that caused to exit when the monitor
Todd C. Miller [Wed, 25 Jan 2012 21:33:15 +0000 (16:33 -0500)]
The change in a1e7e31519ec 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.

--HG--
branch : 1.7

12 years agoAdd custom version of AC_CHECK_LIB that uses the extra libs in the
Todd C. Miller [Fri, 20 Jan 2012 15:53:12 +0000 (10:53 -0500)]
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.

--HG--
branch : 1.7

12 years agoBetter handling of network functions that need -lsocket -lnsl
Todd C. Miller [Thu, 19 Jan 2012 19:21:31 +0000 (14:21 -0500)]
Better handling of network functions that need -lsocket -lnsl

--HG--
branch : 1.7

12 years agoFix sh warning; use "test" instead of "["
Todd C. Miller [Tue, 17 Jan 2012 18:11:05 +0000 (13:11 -0500)]
Fix sh warning; use "test" instead of "["

--HG--
branch : 1.7

12 years agoWhen not logging I/O, use a signal handler that only forwards SIGINT,
Todd C. Miller [Tue, 17 Jan 2012 17:20:28 +0000 (12:20 -0500)]
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.

--HG--
branch : 1.7

12 years agoBack out change that put the command in its own pgrp when not logging
Todd C. Miller [Tue, 17 Jan 2012 16:22:44 +0000 (11:22 -0500)]
Back out change that put the command in its own pgrp when not logging
I/O.  It causes problems with pipelines.

--HG--
branch : 1.7

13 years agoInclude parent directories in case they don't already exist. This
Todd C. Miller [Fri, 13 Jan 2012 14:50:03 +0000 (09:50 -0500)]
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.

--HG--
branch : 1.7

13 years agosync with git version
Todd C. Miller [Fri, 13 Jan 2012 14:06:26 +0000 (09:06 -0500)]
sync with git version

--HG--
branch : 1.7

13 years agoMove tty name lookup code to its own file.
Todd C. Miller [Fri, 13 Jan 2012 11:11:23 +0000 (06:11 -0500)]
Move tty name lookup code to its own file.

--HG--
branch : 1.7

13 years agoUpdate for sudo 1.7.9
Todd C. Miller [Thu, 12 Jan 2012 21:42:45 +0000 (16:42 -0500)]
Update for sudo 1.7.9

--HG--
branch : 1.7

13 years agoregen
Todd C. Miller [Thu, 12 Jan 2012 20:29:45 +0000 (15:29 -0500)]
regen

--HG--
branch : 1.7

13 years agoFor "visudo -c" also list include files that were checked when
Todd C. Miller [Thu, 12 Jan 2012 20:26:37 +0000 (15:26 -0500)]
For "visudo -c" also list include files that were checked when
everything is OK.

--HG--
branch : 1.7

13 years agoUpdate copyright year.
Todd C. Miller [Thu, 12 Jan 2012 20:26:24 +0000 (15:26 -0500)]
Update copyright year.

--HG--
branch : 1.7

13 years agoAllow "visudo -c" to work when we only have read-only access to the
Todd C. Miller [Thu, 12 Jan 2012 20:23:16 +0000 (15:23 -0500)]
Allow "visudo -c" to work when we only have read-only access to the
sudoers include files.

--HG--
branch : 1.7

13 years agoDo not include GLOB_MARK in the flags we pass to glob(3). Fixes a
Todd C. Miller [Thu, 12 Jan 2012 20:21:36 +0000 (15:21 -0500)]
Do not include GLOB_MARK in the flags we pass to glob(3). Fixes a
bug where a pattern like "/usr/*" include /usr/bin/ in the results,
which would be incorrectly be interpreted as if the sudoers file had
specified a directory. From Vitezslav Cizek.

--HG--
branch : 1.7

13 years agoPrint a more sensible error if yyparse() returns non-zero but
Todd C. Miller [Thu, 12 Jan 2012 20:20:47 +0000 (15:20 -0500)]
Print a more sensible error if yyparse() returns non-zero but
yyerror() was not called.

--HG--
branch : 1.7

13 years agoWhen trying to determine the tty, fall back on /proc/ppid/fd/{0,1,2}
Todd C. Miller [Thu, 12 Jan 2012 20:17:30 +0000 (15:17 -0500)]
When trying to determine the tty, fall back on /proc/ppid/fd/{0,1,2}
if the main process's fds 0-2 are not hooked up to a tty.
On BSD, use the KERN_PROC_PID sysctl() instead.

--HG--
branch : 1.7

13 years agoWhen not logging I/O, put command in its own pgrp and make that the
Todd C. Miller [Thu, 12 Jan 2012 20:04:07 +0000 (15:04 -0500)]
When not logging I/O, put command in its own pgrp and make that the
controlling pgrp if the command is in the foreground. 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.

--HG--
branch : 1.7

13 years agoAdd missing %s printf escape to the iolog_dir description.
Todd C. Miller [Thu, 12 Jan 2012 20:02:08 +0000 (15:02 -0500)]
Add missing %s printf escape to the iolog_dir description.

--HG--
branch : 1.7

13 years agoHandle different Unix domain socket (actually socketpair) semantics
Todd C. Miller [Thu, 12 Jan 2012 19:54:18 +0000 (14:54 -0500)]
Handle different Unix domain socket (actually socketpair) semantics
in BSD vs. Linux. In BSD if one end of the socketpair goes away
select() returns the fd as readable and the read will fail with
ECONNRESET. This doesn't appear to happen on Linux so if we notice
that the monitor process has died when I/O logging is enabled,
behave like the command has exited. This means we log the wait
status of the monitor, not the command, but there is nothing else
we can do at that point. This should only be an issue if SIGKILL
is sent to the monitor process.

--HG--
branch : 1.7

13 years agoCatch common signals in the monitor process so they get passed to
Todd C. Miller [Thu, 12 Jan 2012 19:52:07 +0000 (14:52 -0500)]
Catch common signals in the monitor process so they get passed to
the command. Fixes a problem when the entire login session is killed
when ssh is disconnected or the terminal window is closed.

--HG--
branch : 1.7

13 years agoMention how to configure pam_hpsec on HP-UX to play nicely with
Todd C. Miller [Thu, 12 Jan 2012 19:51:27 +0000 (14:51 -0500)]
Mention how to configure pam_hpsec on HP-UX to play nicely with
sudo.

--HG--
branch : 1.7