Age | Commit message (Collapse) | Author |
|
Ignored signals, such as SIGPIPE in Mutt, are inherited by child
processes. This can cause incorrect behavior in filter-like programs
that expect SIGPIPE to be the default value of "Term".
A couple other places in Mutt already reset SIGTERM, SIGTSTP, and
SIGCONT, with a comment mentioning it really wasn't necessary. Since
I don't much like messing with signals, I'll leave those resets in.
Extract those plus SIGPIPE into a new function,
mutt_reset_child_signals() and add that before each exec call.
Thanks to Vincent Lefèvre for reporting the issue and for the initial
patch, which this commit is based upon.
|
|
|
|
The config variable is to resolve an ambiguity in Mutt about whether
using $tunnel is secure.
On the one hand, the examples in the manual show using ssh or a direct
pipe to a program. Many users do this to connect to an IMAP server
with PREAUTH configured, relying on the tunnel to be secured by ssh or
by the fact that it's a local pipe.
On the other hand, the Mutt connection code still respects
$ssl_starttls and $ssl_force_tls, as if the $tunnel connection were
not already secured.
After some discussion on mutt-dev, it seemed the best idea to assume
the connection is secure by default, in order to not break IMAP
PREAUTH connections, but to provide a configuration variable in case
there are situations where it is not.
Thanks to Aaron Schrab for the original idea of setting conn->ssf for
$tunnel in his patch to ticket 250.
|
|
Change the tunnel_socket_read() and tunnel_socket_write() as the raw
sockets were adjusted in the previous commit. Retry on EINTR, and
complete a full write so all the implementations have the same behavior.
|
|
This will be used in the next commit to add a timeout when polling for
new mail.
|
|
The documentation implies that all children processes will be affected
by the setenv command, so convert all the exec calls to use
mutt_envlist().
The setenv("GPG_TTY") call is no longer needed so remove it.
With that removed, there are no other setenv calls in mutt, so remove
the autoconf check and replacement function.
|
|
Free the conn->sockdata on failure. conn->fd is not set until the
bottom, and before it is set, conn->conn_close() will not be called.
Close the pin pipe if the pout pipe fails.
Call mutt_perror first on a fork failure. Calling after the close()
may cause errno to be changed on a close failure.
|
|
Instead of closing stderr, redirect it to /dev/null in
tunnel_socket_open(). Otherwise a program can accidentally open a
file into handle 2 and then unknowingly use that when trying to print
to stderr.
Thanks to lotheac for the original patch, which I just modified
slightly.
|
|
After renaming all internal macros from M_* to MUTT_*, the
sys_socket.h workaround is no longer necessary.
|
|
(closes #3833)
Solaris includes "sys/stream.h" inside their "sys/socket.h". This
include file adds many non-reserved macros to Mutt's namespace, two of
which conflict with existing Mutt macros.
The simplest fix would be to rename those macros in Mutt, however this
will cause difficulty with out-of-tree patches. This fix creates a
wrapper include file that preserves those existing macros and prevents
the Solaris values from entering Mutt's namespace.
|
|
|
|
|
|
|
|
|
|
where standard open/close/read/write functions are implemented with macros.
Thanks to Aaron Crane and others for their input about the problem.
|
|
Remove it from mutt.h
|
|
|
|
|
|
|
|
|
|
|