]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.3.9 v2.3.9
authorWietse Venema <wietse@porcupine.org>
Mon, 23 Apr 2007 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Sat, 10 Feb 2018 21:07:13 +0000 (16:07 -0500)
postfix/HISTORY
postfix/conf/postfix-script
postfix/src/cleanup/cleanup_api.c
postfix/src/global/mail_version.h
postfix/src/master/master_sig.c
postfix/src/master/multi_server.c
postfix/src/master/single_server.c
postfix/src/master/trigger_server.c
postfix/src/postdrop/postdrop.c

index b223ac05252bbf1d47a3fd5edbb7944a2740230f..dbebff36112e1c384b133edb3d5410b50036d78d 100644 (file)
@@ -12961,3 +12961,28 @@ Apologies for any names omitted.
        Duchovni, Morgan Stanley. Files: src/smtp/smtp_proto.c,
        src/smtpd/smtpd.c, src/tls/tls.h, src/tls/tls_client.c,
        src/tls/tls_misc.c and src/tls/tls_server.c.
+
+20070306
+
+       Workaround: on some FreeBSD versions, accept(2) can fail
+       with a bogus EINVAL error. We now allow accept(2) to fail
+       for a limited number of times before terminating the process.
+       Files: master/single_server.c, master/multi_server.c.
+       Back-ported from Postfix 2.4.
+
+       Bugfix (introduced with Postfix 2.3 Milter support): postdrop
+       reported "illegal seek" instead of "file too large".  File:
+       postdrop/postdrop.c. Back-ported from Postfix 2.4.
+
+20070331
+
+       Bugfix (introduced Postfix 2.3): segfault with HOLD action
+       in access/header_checks/body_checks on 64-bit platforms.
+       File: cleanup/cleanup_api.c. Back-ported from Postfix 2.4.
+
+20070421
+
+       Workaround: on (Linux) platforms that cripple signal handlers
+       with deadlock, "postfix stop" forcefully stops all processes
+       in the master's process group. Files: conf/postfix-script,
+       master/master_sig.c. Back-ported from Postfix 2.4.
index c7251105ffb4e5a33f3a9f4bb01c0e97a88445d5..e5a5169183b38dd7733cf475c68ab3dedde9ad15 100644 (file)
@@ -129,6 +129,15 @@ stop)
        }
        $INFO stopping the Postfix mail system
        kill `sed 1q pid/master.pid`
+       for i in 5 4 3 2 1
+       do
+           $daemon_directory/master -t && exit 0
+           $INFO waiting for the Postfix mail system to terminate
+           sleep 1
+       done
+       $WARN stopping the Postfix mail system with force
+       pid=`awk '{ print $1; exit 0 } END { exit 1 }' pid/master.pid` && 
+               kill -9 -$pid
        ;;
 
 abort)
index 4769289b80c061c65972c81f935334cfa9fdc146..88bf17e4e6b7a2aa6fb83e71022d3fbcd0a44d6c 100644 (file)
@@ -289,8 +289,8 @@ int     cleanup_flush(CLEANUP_STATE *state)
 #endif
            mail_stream_ctl(state->handle,
                            MAIL_STREAM_CTL_QUEUE, state->queue_name,
-                           MAIL_STREAM_CTL_CLASS, 0,
-                           MAIL_STREAM_CTL_SERVICE, 0,
+                           MAIL_STREAM_CTL_CLASS, (char *) 0,
+                           MAIL_STREAM_CTL_SERVICE, (char *) 0,
 #ifdef DELAY_ACTION
                            MAIL_STREAM_CTL_DELAY, state->defer_delay,
 #endif
index e23209e83b7b5319b61c6b5e32163da0bbcf387e..50054d400271c1fe02aaa0d20adfc8839d1e3122 100644 (file)
@@ -20,8 +20,8 @@
   * Patches change both the patchlevel and the release date. Snapshots have no
   * patchlevel; they change the release date only.
   */
-#define MAIL_RELEASE_DATE      "20070301"
-#define MAIL_VERSION_NUMBER    "2.3.8"
+#define MAIL_RELEASE_DATE      "20070423"
+#define MAIL_VERSION_NUMBER    "2.3.9"
 
 #ifdef SNAPSHOT
 # define MAIL_VERSION_DATE     "-" MAIL_RELEASE_DATE
index fc76efe0d96887eb663028878b3091bea8737eea..a8890b1cefdac7b70182ab91701695979722b86a 100644 (file)
@@ -172,13 +172,6 @@ static void master_sigdeath(int sig)
     struct sigaction action;
     pid_t   pid = getpid();
 
-    /*
-     * XXX We're running from a signal handler, and really should not call
-     * any msg() routines at all, but it would be even worse to silently
-     * terminate without informing the sysadmin.
-     */
-    msg_info("terminating on signal %d", sig);
-
     /*
      * Terminate all processes in our process group, except ourselves.
      */
@@ -190,6 +183,13 @@ static void master_sigdeath(int sig)
     if (kill(-pid, SIGTERM) < 0)
        msg_fatal("%s: kill process group: %m", myname);
 
+    /*
+     * XXX We're running from a signal handler, and really should not call
+     * any msg() routines at all, but it would be even worse to silently
+     * terminate without informing the sysadmin.
+     */
+    msg_info("terminating on signal %d", sig);
+
     /*
      * Deliver the signal to ourselves and clean up. XXX We're running as a
      * signal handler and really should not be doing complicated things...
index 1330b23e619717cf9f632b6efe1524fe117ec98f..25d3f339f09d22d8603b38aff567a0153c8a8fb2 100644 (file)
@@ -372,7 +372,7 @@ static void multi_server_accept_local(int unused_event, char *context)
        msg_fatal("select unlock: %m");
     if (fd < 0) {
        if (errno != EAGAIN)
-           msg_fatal("accept connection: %m");
+           msg_error("accept connection: %m");
        if (time_left >= 0)
            event_request_timer(multi_server_timeout, (char *) 0, time_left);
        return;
@@ -409,7 +409,7 @@ static void multi_server_accept_pass(int unused_event, char *context)
        msg_fatal("select unlock: %m");
     if (fd < 0) {
        if (errno != EAGAIN)
-           msg_fatal("accept connection: %m");
+           msg_error("accept connection: %m");
        if (time_left >= 0)
            event_request_timer(multi_server_timeout, (char *) 0, time_left);
        return;
@@ -446,7 +446,7 @@ static void multi_server_accept_inet(int unused_event, char *context)
        msg_fatal("select unlock: %m");
     if (fd < 0) {
        if (errno != EAGAIN)
-           msg_fatal("accept connection: %m");
+           msg_error("accept connection: %m");
        if (time_left >= 0)
            event_request_timer(multi_server_timeout, (char *) 0, time_left);
        return;
index 82fec73d11c481f7dbebb85435afeda43248ae0f..f0675f7eb7d5a4f73da30df121c5a385230168fc 100644 (file)
@@ -290,7 +290,7 @@ static void single_server_accept_local(int unused_event, char *context)
        msg_fatal("select unlock: %m");
     if (fd < 0) {
        if (errno != EAGAIN)
-           msg_fatal("accept connection: %m");
+           msg_error("accept connection: %m");
        if (time_left >= 0)
            event_request_timer(single_server_timeout, (char *) 0, time_left);
        return;
@@ -326,7 +326,7 @@ static void single_server_accept_pass(int unused_event, char *context)
        msg_fatal("select unlock: %m");
     if (fd < 0) {
        if (errno != EAGAIN)
-           msg_fatal("accept connection: %m");
+           msg_error("accept connection: %m");
        if (time_left >= 0)
            event_request_timer(single_server_timeout, (char *) 0, time_left);
        return;
@@ -362,7 +362,7 @@ static void single_server_accept_inet(int unused_event, char *context)
        msg_fatal("select unlock: %m");
     if (fd < 0) {
        if (errno != EAGAIN)
-           msg_fatal("accept connection: %m");
+           msg_error("accept connection: %m");
        if (time_left >= 0)
            event_request_timer(single_server_timeout, (char *) 0, time_left);
        return;
index bdf042d615fa34ca11313cca4cf9b7c373560a66..082f8bcc5faccbeef92371a0d0fedfa0ac2c1539 100644 (file)
@@ -313,7 +313,7 @@ static void trigger_server_accept_local(int unused_event, char *context)
        msg_fatal("select unlock: %m");
     if (fd < 0) {
        if (errno != EAGAIN)
-           msg_fatal("accept connection: %m");
+           msg_error("accept connection: %m");
        if (time_left >= 0)
            event_request_timer(trigger_server_timeout, (char *) 0, time_left);
        return;
@@ -359,7 +359,7 @@ static void trigger_server_accept_pass(int unused_event, char *context)
        msg_fatal("select unlock: %m");
     if (fd < 0) {
        if (errno != EAGAIN)
-           msg_fatal("accept connection: %m");
+           msg_error("accept connection: %m");
        if (time_left >= 0)
            event_request_timer(trigger_server_timeout, (char *) 0, time_left);
        return;
index aa064c8287ad25851e4c1fa244155df8cd599cda..ad01f14df0aa567a66d51de9c71eb6933b84bf50 100644 (file)
@@ -229,6 +229,7 @@ int     main(int argc, char **argv)
     const char *errstr;
     char   *junk;
     struct timeval start;
+    int     saved_errno;
 
     /*
      * Be consistent with file permissions.
@@ -425,9 +426,12 @@ int     main(int argc, char **argv)
            continue;
        }
        if (REC_PUT_BUF(dst->stream, rec_type, buf) < 0) {
-           while ((rec_type = rec_get(VSTREAM_IN, buf, var_line_limit)) > 0
-                  && rec_type != REC_TYPE_END)
+           /* rec_get() errors must not clobber errno. */
+           saved_errno = errno;
+           while (rec_get_raw(VSTREAM_IN, buf, var_line_limit,
+                              REC_FLAG_NONE) > 0)
                 /* void */ ;
+           errno = saved_errno;
            break;
        }
        if (rec_type == REC_TYPE_END)
@@ -439,8 +443,8 @@ int     main(int argc, char **argv)
      * Finish the file.
      */
     if ((status = mail_stream_finish(dst, (VSTRING *) 0)) != 0) {
-       postdrop_cleanup();
        msg_warn("uid=%ld: %m", (long) uid);
+       postdrop_cleanup();
     }
 
     /*