fetchmail 6.3.10 (not yet released):
+# INCOMPATIBLE BUGFIXES
+* Use PS_PROTOCOL (4) rather than PS_SYNTAX (5) exit status when a pre- or
+ post-connect command fails.
+
# BUGFIXES
* Fix misuse of canonical autoconf target as _TARGET when it should have been
_HOST. Report and patch courtesy of Diego E. "Flameeyes" Pettenò.
Michelle Konzack, Debian Bug#508667.
* Do not overlap source and destination fields in snprintf() in interface.c.
Courtesy of Nico Golde, Debian.
+* When a pre- or post-connect command fails, now report the exit status or
+ termination signal properly through sys/wait.h macros.
# CHANGES
* Make the comparison of the SSL fingerprints case insensitive, to
/* execute pre-initialization command, if any */
if (ctl->preconnect && (err = system(ctl->preconnect)))
{
- report(stderr,
- GT_("pre-connection command failed with status %d\n"), err);
- err = PS_SYNTAX;
+ if (WIFSIGNALED(err))
+ report(stderr,
+ GT_("pre-connection command terminated with signal %d\n"), WTERMSIG(err));
+ else
+ report(stderr,
+ GT_("pre-connection command failed with status %d\n"), WEXITSTATUS(err));
+ err = PS_PROTOCOL;
goto closeUp;
}
/* execute wrapup command, if any */
if (ctl->postconnect && (tmperr = system(ctl->postconnect)))
{
- report(stderr, GT_("post-connection command failed with status %d\n"), tmperr);
+ if (WIFSIGNALED(tmperr))
+ report(stderr, GT_("post-connection command terminated with signal %d\n"), WTERMSIG(tmperr));
+ else
+ report(stderr, GT_("post-connection command failed with status %d\n"), WEXITSTATUS(tmperr));
if (err == PS_SUCCESS)
- err = PS_SYNTAX;
+ err = PS_PROTOCOL;
}
set_timeout(0); /* cancel any pending alarm */
standard input attached to a terminal and could not prompt for a
missing password.
.IP 4
-Some sort of fatal protocol error was detected.
+Some sort of fatal protocol error was detected. Since 6.3.10, this
+includes non-zero exit status or signal-triggered termination of a pre-
+or post-connect command.
.IP 5
There was a syntax error in the arguments to
.IR fetchmail .
+Up to and including 6.3.9, this was also used if the pre- or
+post-connect command failed.
.IP 6
The run control file had bad permissions.
.IP 7