Todd C. Miller
5f5a60f822
Add script to generate ChangeLog from git log output.
2017-12-09 20:40:28 -07:00
Todd C. Miller
b16912da1d
Don't include syslog.h from logging.h, just include it in the two
...
.c files it is actually needed.
2017-12-08 15:00:41 -07:00
Todd C. Miller
e78283af99
Document that in check mode, visudo does not check the owner/mode
...
on files specified with the -f flag.
2017-12-06 10:17:33 -07:00
Todd C. Miller
48fba3c2cc
update my email to Todd.Miller@sudo.ws
2017-12-03 17:53:40 -07:00
Todd C. Miller
01587b1b14
Add missing carriage return before prompt when replay is done.
2017-12-02 21:32:24 -07:00
Todd C. Miller
a2eff11509
Track window size changes that happen while sudo is suspended
2017-12-02 21:30:11 -07:00
Todd C. Miller
988328393a
regen
2017-12-01 15:43:04 -07:00
Todd C. Miller
276d83cc98
regen for sudo 1.8.22
2017-12-01 14:37:16 -07:00
Todd C. Miller
e8532bdcee
Sudo 1.8.22
2017-12-01 14:35:34 -07:00
Todd C. Miller
c2eee7904d
Background processes started by the command will no longer receive
...
SIGHUP.
2017-12-01 13:53:09 -07:00
Todd C. Miller
b561d0d7dd
When the command completes, make the monitor the foreground process
...
group before informing the main sudo process of the command's exit
status. This will prevent processes started by the command (which
runs in a different process group) from receiving SIGHUP since the
kernel sends SIGHUP to the foreground process group associated with
the terminal session. The monitor has a SIGHUP handler installed
so the signal is effectively ignored.
2017-12-01 13:43:06 -07:00
Todd C. Miller
4168668f53
Add debug printfs around group list retrieval.
2017-12-01 12:58:37 -07:00
Todd C. Miller
116c5d7eff
Move call to sudo_ev_loopcontinue() into schedule_signal() itself.
...
We always want to prioritize signal forwarding.
2017-11-30 10:02:15 -07:00
Todd C. Miller
b9adb3dd51
Don't loop over read/write, recv/send or tcgetpgrp/tcsetpgrp trying
...
to handle EINTR. We now use SA_RESTART with signals so this is not
needed and is potentially dangerous if it is possible to receive
SIGTTIN or SIGTTOU (which it currently is not).
2017-11-30 09:53:21 -07:00
Todd C. Miller
9298a2a42e
Better describe things when a command is run in a pty.
2017-11-21 16:59:54 -07:00
Todd C. Miller
486ced7c11
Sprinkle some extra debugging printfs
2017-11-29 13:13:33 -07:00
Todd C. Miller
54acf4f991
Handle receipt of SIGTTIN/SIGTTOU when reading/writing from/to the tty.
...
We can't use a signal event for these since that would restart the
system call after the signal was handled and the callback would not
get a chance to run. Fixes running a command in the background that
write to the tty when the TOSTOP terminal flag is set.
2017-11-29 12:06:12 -07:00
Todd C. Miller
5ccc7ab879
We don't need to be the foreground process to be able to write to
...
the terminal in most cases. If the background process tries to
modify the terminal flags it will receive SIGTTOU which is relayed
to the sudo front-end. This currently mishandles terminals with
the TOSTOP local flag set.
2017-11-29 12:06:12 -07:00
Todd C. Miller
93828eca65
Avoid a double free when ipa_hostname is set in sssd.conf and it
...
is an unqualified host name. From Daniel Kopecek.
Also move the "unable to allocate memory" warning into get_ipa_hostname()
itself to make it easier to see where the allocation failed in the
debug log.
2017-11-28 11:28:44 -07:00
Todd C. Miller
250209d7a8
When running a command as the invoking user we cannot use the gid
...
list from the front-end since it may not correspond to the user's
aux group vector as defined by the group database.
2017-11-28 09:48:43 -07:00
Todd C. Miller
dd47a0a416
Add missing initprogname() calls.
2017-11-28 09:06:44 -07:00
Todd C. Miller
ca2e1a455a
Plug some memory leaks on error, some found by the clang static analyzer.
2017-11-16 09:43:24 -07:00
Todd C. Miller
bcc0eeb575
Avoid calling cmnd_matches() in list/verify mode if we already have
...
a match.
2017-11-15 15:09:25 -07:00
Todd C. Miller
88faa58735
In list (-l) or verify (-v) mode, if we have a match but authentication
...
is required, clear FLAG_NOPASSWD so that when listpw/verifypw is
set to "all" and there are multiple sudoers sources a password will
be required unless none of the entries in all sources require
authentication. From Radovan Sroka of RedHat
2017-11-15 15:06:45 -07:00
Todd C. Miller
2cbdc26540
When checking the results for "sudo -l" and "sudo -v", keep checking
...
even after we get a match since the value of doauth may depend on
evaluating all the results. From Radovan Sroka of RedHat.
2017-11-15 12:27:39 -07:00
Todd C. Miller
a62cd4b4fe
If passwd_tries is less than 1, check_user() will always return
...
false (since the user didn't authenticate). The normal reason for
this is an authentication error but in this case no authentication
was tries so no warning message has been displayed to the user. If
the user wasn't given a chance to authenticate, set inform_user to
true when calling log_denial() from sudoers_policy_main().
An alternate approach would be for check_user() to return true
in this case but seems more confusing.
2017-11-14 13:58:35 -07:00
Todd C. Miller
4e8c037f22
Document bash shell alias issue with "sudo -i".
2017-10-22 06:54:41 -06:00
Todd C. Miller
53a8ad7120
Return an error if the sudo front end doesn't set the user name, user ID,
...
group ID or host name. Bug #807
2017-10-20 07:55:48 -06:00
Todd C. Miller
2c45774a35
Treat an empty hostname as a failure and return NULL.
2017-10-20 07:37:40 -06:00
Todd C. Miller
740c619d33
Add support for #include and #includedir from Natale Vinto.
2017-10-17 14:28:38 -06:00
Todd C. Miller
c017741589
Minor corrections from Tae Wong
2017-10-14 16:24:10 -06:00
Todd C. Miller
cece54ae85
Add a warning that for "sudo -i command" and "sudo -s command" the
...
shell is not run in interactive mode which may change its behavior.
2017-10-12 10:07:46 -06:00
Todd C. Miller
3b88cdfcd8
Fix stair-stepped output when the output of a sudo command is piped
...
to another command and use_pty is set.
2017-09-26 14:21:11 -06:00
Todd C. Miller
1051cf1e6f
env_keep and env_check are also taken into account with "sudo -i".
...
Bug #806
2017-09-26 13:08:57 -06:00
Todd C. Miller
749cdc9d95
Make PC insults the default and add new configure option,
...
enable-offensive-insults, to enable the offensive insults.
2017-09-18 10:45:02 -06:00
Todd C. Miller
dcb887807e
Add missing translators from recent updates and one name change.
2017-09-14 11:05:41 -06:00
Todd C. Miller
9ab1c9935d
sync with translationproject.org
...
* * *
sync with translationproject.org
2017-09-07 15:47:09 -06:00
Todd C. Miller
7e78fbccfd
More accurately describe the use_pty option now that its behavior
...
has changed with respect to interposition with a pipe.
Also describe some caveats with log_input.
2017-09-07 14:59:37 -06:00
Todd C. Miller
b4f4bb3345
Document changes in use_pty behavior when no terminal is present.
2017-09-07 14:58:34 -06:00
Todd C. Miller
8949992040
Set ec->cmnd_pid to the correct value when receiving the command's
...
process ID from the monitor.
2017-09-07 13:22:10 -06:00
Todd C. Miller
84af812b8c
If /dev/tty is not available and no I/O logging plugins are configured,
...
fall back on exec_nopty() even if the policy plugin requested a pty.
We never allocate a pty when sudo is not run from a terminal anyway.
2017-09-07 11:32:30 -06:00
Todd C. Miller
2c2476f07f
Do not set utmp_user if we did not actually allocate a pty.
2017-09-07 11:00:19 -06:00
Todd C. Miller
87eba6c892
sudo 1.8.21p2
2017-09-06 21:02:11 -06:00
Todd C. Miller
d85056d95f
sudo_terminated() should not return true when SIGCHLD is pending.
...
Bug #801
2017-09-06 16:08:23 -06:00
Todd C. Miller
4b5aeefebc
Set SIGCHLD handler to SIG_DFL before forking the askpass command
...
and restore after. Otherwise, SIGCHLD will end up in the list of
pending signals and sudo_execute() will not execute the command.
2017-09-06 15:59:37 -06:00
Todd C. Miller
fdff345e0f
The read and write sides of signal_pipe[] were swapped, resulting
...
in EBADF reading from and writing to the signal pipe on Linux and
probably others. On systems with bidirectional pipes this was not
an issue.
2017-09-06 12:29:36 -06:00
Todd C. Miller
8e021c39fa
Fix a logic error in 96651906de42 which prevented sudo from using
...
the PAM-supplied prompt. Bug #799
2017-09-05 09:30:19 -06:00
Todd C. Miller
f5425a80a2
Sudo 1.8.21p1
2017-09-01 14:09:43 -06:00
Todd C. Miller
171512b173
The Fedora sudo package uses /etc/ldap.conf not /etc/sudo-ldap.conf.
2017-09-01 13:59:45 -06:00
Todd C. Miller
06d52c97c2
The fix for matching when no sudoRunAsUser is present in a sudoRole
...
was incomplete. If no -g option was specified on the command line
but sudoRunAsGroup is present in a sudoRole, we need to treat the
group match as failed instead of missing.
2017-09-01 11:36:15 -06:00