Todd C. Miller [Tue, 15 Jan 2013 19:54:49 +0000 (14:54 -0500)]
Do not inform the user that the command was not permitted by the
policy if they do not successfully authenticate. This is a regression
introduced in sudo 1.7.10.
Todd C. Miller [Tue, 1 Jan 2013 21:23:37 +0000 (16:23 -0500)]
No need to restore default signal handler for SIGSTOP as it is not
catchable. Attempting to do so is harmless but sigaction() will
fail and set errno to EINVAL which makes it looks like there is an
error.
Todd C. Miller [Mon, 24 Sep 2012 19:09:32 +0000 (15:09 -0400)]
Fix running commands that need the terminal in the background when
I/O logging is enabled. E.g. "sudo vi &". When the command is
foregrounded, it will now resume properly.
Todd C. Miller [Mon, 27 Aug 2012 19:38:57 +0000 (15:38 -0400)]
Pass on SIGTSTP to the command if it was sent by a user process
(not the kernel or the terminal) when we are not I/O logging and
set the default SIGTSTP handler when we re-send the signal to
ourself, restoring our handler after we resume.
Todd C. Miller [Mon, 27 Aug 2012 19:33:31 +0000 (15:33 -0400)]
Shells typically change their process group when they start up so
that they can implement job control. Most well-behaved shells
change the pgrp back to its original value before suspending so we
must not try to restore in that case, lest we race with the child
upon resume, potentially stopping sudo with SIGTTOU while the command
continues to run. Some shells, such as pdksh, just suspend the
shell by sending SIGSTOP to themselves without restoring the pgrp.
In this case we need to change the pgrp back for them.
Should fix bug #568
Todd C. Miller [Wed, 22 Aug 2012 16:47:18 +0000 (12:47 -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 [Fri, 17 Aug 2012 14:31:34 +0000 (10:31 -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 [Tue, 7 Aug 2012 17:43:55 +0000 (13:43 -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 [Tue, 31 Jul 2012 17:36:59 +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 [Mon, 30 Jul 2012 15:15:14 +0000 (11:15 -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, 29 Jun 2012 16:55:22 +0000 (12:55 -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:34 +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 [Thu, 31 May 2012 20:58:22 +0000 (16:58 -0400)]
Quiet lintian warnings for .deb files:
* install sudoedit and the sudoedit manual as symbolic links, not
hard links and package them as such.
* set -e in %pos and %preun for debian
* add lintian overrides file
* fix modes to be more in line with what Debian expects
* add correct section
* install LICENSE as copyright and ChangeLog as changelog
* create stub changelog.debian