Todd C. Miller [Tue, 14 Aug 2012 14:45:55 +0000 (10:45 -0400)]
Add new check_defaults() function to check (but not update) the
Defaults entries. Visudo can now use this instead of update_defaults
to check all the defaults regardless instead of just the global
Defaults entries.
Todd C. Miller [Thu, 9 Aug 2012 18:11:41 +0000 (14:11 -0400)]
If sudo.conf contains an I/O plugin but no policy plugin, use sudoers
for the policy plugin. If a policy plugin is specified without an
I/O plugin, only the policy plugin will be loaded.
Todd C. Miller [Thu, 9 Aug 2012 15:36:25 +0000 (11:36 -0400)]
Add a note about wildcards matching multiple words and include an
example. Also mention that for sudoedit, a wildcard in command
line args does not match a slash.
Todd C. Miller [Mon, 6 Aug 2012 18:38:35 +0000 (14:38 -0400)]
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.
Todd C. Miller [Thu, 2 Aug 2012 18:37:32 +0000 (14:37 -0400)]
If a command matches using an empty Runas_List (i.e. Runas_List is
present but empty) and the -u option was not specified, set runas_pw
to user_pw instead of using runas_default. This is intended to be
used in conjunction with the Solaris Privilege Set support for rules
that grant privileges without changing the user.
Todd C. Miller [Thu, 2 Aug 2012 18:02:54 +0000 (14:02 -0400)]
Add support for parsing an empty Runas_List, which only allows the
command to be run as the invoking user. This can be used in
conjunction with the Solaris Privilege Set support to grant privileges
without changing the user.
Todd C. Miller [Wed, 1 Aug 2012 18:38:52 +0000 (14:38 -0400)]
Generate a sed script file when munging *.mdoc or *.man instead of
passing sed expressions on the command line. Older seds do not
support \n in a replacement so generate and run a sed script instead.
Todd C. Miller [Tue, 31 Jul 2012 17:36:48 +0000 (13:36 -0400)]
When checking whether a signal is user-generated, compare si_code
against SI_USER instead of <= 0 since on HP-UX, terminal-related
signals get a code of 0.
Todd C. Miller [Tue, 31 Jul 2012 15:11:25 +0000 (11:11 -0400)]
SuSE Enterprise Linux uses RLIMIT_NPROC and _SC_CHILD_MAX interchangably.
This causes problems when setting RLIMIT_NPROC to RLIM_INFINITY due
to a bug in bash where bash tries to honor the value of _SC_CHILD_MAX
but treats a value of -1 as an error, and uses a default value of
32 instead.
Previously, we just checked RLIMIT_NPROC and, if it was unlimited,
restored the previous value of RLIMIT_NPROC. However, that makes
it impossible to set nproc to unlimited. We now only restore the
nproc resource limit if sysconf(_SC_CHILD_MAX) is negative. In
most cases, pam_limits will set RLIMIT_NPROC for us.
Todd C. Miller [Mon, 30 Jul 2012 15:09:11 +0000 (11:09 -0400)]
Active Directory apparently requires that tenths of a second be
present in a date so append .0 to the "now" value in the time filter.
Also remove space for the global AND from TIMEFILTER_LENGTH since
it was not being used consistently. Buffers of TIMEFILTER_LENGTH
now need to account for the terminating NUL byte.
Todd C. Miller [Fri, 27 Jul 2012 20:22:09 +0000 (16:22 -0400)]
Fix printing of the permission denied message to standard error
when a user is not allowed to run a command. This got broken by
the recent logging changes.
Todd C. Miller [Tue, 10 Jul 2012 16:42:33 +0000 (12:42 -0400)]
Move log_denial() calls and logic to log_failure().
Move authentication failure logging to log_auth_failure().
Both of these call audit_failure() for us.
This subtly changes logging for commands that are denied by sudoers
but where the user failed to enter the correct password. Previously,
these would be logged as "N incorrect password attempts" but now
are logged as "command not allowed". Fixes bug #563
Todd C. Miller [Sun, 1 Jul 2012 17:47:25 +0000 (13:47 -0400)]
Add -Wc,-fstack-protector to LT_LDFLAGS instead of adding
-fstack-protector to LDFLAGS so it doesn't get stripped out. Libtool
will strip -fstack-protector from the linker flags and we always
link with libtool.
Todd C. Miller [Fri, 29 Jun 2012 16:14:45 +0000 (12:14 -0400)]
Add support for ldaps using Tivoli LDAP libraries.
Add ldap.conf option to specify Tivoli key db password.
Allow TLS ciphers to be configured for Tivoli.
Todd C. Miller [Thu, 28 Jun 2012 18:58:15 +0000 (14:58 -0400)]
Treat LDAP_OPT_CONNECT_TIMEOUT (Tivoli Directory Server 6.3) the
same as LDAP_OPT_CONNECT_TIMEOUT (OpenSSH).
Don't make failure to a set an ldap option fatal.
Todd C. Miller [Mon, 18 Jun 2012 14:21:05 +0000 (10:21 -0400)]
Link check_symbols with SUDO_LIBS to make sure we link with the
requisite libraries to successfully dlopen sudoers.so. This is
needed on HP-UX where a program dlopen()ing a shared object that
uses pthreads must also be linked with pthreads (and HP-UX LDAP
uses pthreads).