diff options
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | daemon.c | 2 | ||||
-rw-r--r-- | fetchmail.c | 8 | ||||
-rw-r--r-- | imap.c | 15 |
4 files changed, 19 insertions, 10 deletions
@@ -8,6 +8,10 @@ Release Notes: +fetchmail-5.0.8 (): +* Todd Sabin's patch to accept spaces in CRAM-MD5 names. +* Fix to endianness patch, by Dan Root via Lawrence Rogers. + fetchmail-5.0.7 (Sat Aug 21 04:26:13 EDT 1999): * RPA support works again. * Added debian_rc startup/shutdown script to contrib/. @@ -56,6 +56,7 @@ RETSIGTYPE sigchld_handler (int sig) /* process SIGCHLD to obtain the exit code of the terminating process */ { + extern volatile int lastsig; /* last signal received */ pid_t pid; #if defined(HAVE_WAITPID) /* the POSIX way */ @@ -77,6 +78,7 @@ sigchld_handler (int sig) wait(&status); #endif + lastsig = SIGCHLD; } int diff --git a/fetchmail.c b/fetchmail.c index ee790597..28c7515c 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -72,6 +72,7 @@ char *home; /* invoking user's home directory */ char *program_name; /* the name to prefix error messages with */ flag configdump; /* dump control blocks for configurator */ const char *fetchmailhost; /* either `localhost' or the host's FQDN */ +volatile int lastsig; /* last signal received */ #if NET_SECURITY void *request = NULL; @@ -81,7 +82,6 @@ int requestlen = 0; static char *lockfile; /* name of lockfile */ static int querystatus; /* status of query */ static int successes; /* count number of successful polls */ -static int lastsig; /* last signal received */ static struct runctl cmd_run; /* global options set from command line */ static void termhook(int); /* forward declaration of exit hook */ @@ -757,8 +757,10 @@ int main(int argc, char **argv) timeout.tv_sec = run.poll_interval; timeout.tv_usec = 0; - lastsig = 0; - select(0,0,0,0, &timeout); + do { + lastsig = 0; + select(0,0,0,0, &timeout); + } while (lastsig == SIGCHLD); #endif #else /* EMX */ alarm_latch = FALSE; @@ -261,7 +261,14 @@ static int do_rfc1731(int sock, char *truename) return result; } - /* this patch by Dan Root <dar@thekeep.org> solves an endianess problem. */ + len = from64tobits(challenge1.cstr, buf1); + if (len < 0) { + report(stderr, _("could not decode initial BASE64 challenge\n")); + return PS_AUTHFAIL; + } + + /* this patch by Dan Root <dar@thekeep.org> solves an endianess + * problem. */ { char tmp[4]; @@ -269,12 +276,6 @@ static int do_rfc1731(int sock, char *truename) memcpy(challenge1.cstr, tmp, sizeof(tmp)); } - len = from64tobits(challenge1.cstr, buf1); - if (len < 0) { - report(stderr, _("could not decode initial BASE64 challenge\n")); - return PS_AUTHFAIL; - } - /* Client responds with a Kerberos ticket and an authenticator for * the principal "imap.hostname@realm" where "hostname" is the * first component of the host name of the server with all letters |