]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-1.1.6-20020330
authorWietse Venema <wietse@porcupine.org>
Sat, 30 Mar 2002 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:27:52 +0000 (06:27 +0000)
postfix/HISTORY
postfix/RELEASE_NOTES
postfix/src/global/mail_version.h
postfix/src/postqueue/postqueue.c
postfix/src/smtpd/smtpd.c
postfix/src/smtpd/smtpd_sasl_glue.c
postfix/src/util/safe_getenv.c

index 5051f742a1a04a4087f71dbbc242c2e35916e8e3..be56a6a2732e1bf9a01df86ccda2f755e1d5c147 100644 (file)
@@ -6136,10 +6136,6 @@ Apologies for any names omitted.
        accepted in SMTP mail, but they could appear within locally
        submitted mail.  File: bounce/bounce_append_service.c.
 
-       Workaround: exempt processes running with the real userid
-       of root from safe_getenv() restrictions. The super-user
-       is supposed to know what she is doing.
-
 20020318
 
        Workaround: Berkeley DB can't handle null key lookups,
@@ -6215,11 +6211,20 @@ Apologies for any names omitted.
        whitespace. Fix by Victor Duchovni, Morgan Stanley. File:
        cleanup/cleanup_map1n.c.
 
-       Feature: configurable service name for the cleanup service.
-       Files: global/mail_params.[hc].
+       Feature: configurable service name for the internal services:
+       bounce, cleanup, defer, error, flush, pickup, queue, rewrite,
+       showq.  Files: global/mail_params.[hc].
 
        Feature: SASL version 2 support by Jason Hoos.
 
+20020330
+
+       Bugfix: postqueue did not pass on configuration directory
+       settings when running showq while the mail system is down.
+       The super-user is now exempted from environment stripping
+       in postqueue/postqueue.c. Problem reported by Victor
+       Duchovni, Morgan Stanley.
+
 Open problems:
 
        Low: sendmail does not store null command-line recipients.
index 714eeb993608f84945648fee4fb2c80e3b9ca2cc..5090e587d36ad55cfcd44a33d7d7c249d654c71d 100644 (file)
@@ -37,6 +37,11 @@ exceeded $line_length_limit characters (default: 2048).  Both
 behaviors broke MIME encapsulation, causing MIME attachments to
 "disappear" with all previous Postfix versions.
 
+Major changes with Postfix version x.x.x
+========================================
+
+Support for the Cyrus SASL version 2 library.
+
 Incompatible changes with Postfix version 1.1.3 (released 20020201)
 ===================================================================
 
index 6210db5e57669da5a13bce6e57545d6df3c83fe9..ba770aec2c290d7d73d3aed70120fa6ce52eb7e4 100644 (file)
   * release date only, unless they include the same bugfix as a patch release.
   */
 #define VAR_MAIL_VERSION       "mail_version"
-#ifdef SNAPSHOT
-#define DEF_MAIL_VERSION       "1.1.5-$mail_release_date"
-#else
-#define DEF_MAIL_VERSION       "1.1.5"
-#endif
+#define DEF_MAIL_VERSION       "1.1.6-$mail_release_date"
 extern char *var_mail_version;
 
  /*
   * Release date.
   */
 #define VAR_MAIL_RELEASE       "mail_release_date"
-#define DEF_MAIL_RELEASE       "20020311"
+#define DEF_MAIL_RELEASE       "20020330"
 extern char *var_mail_release;
 
 /* LICENSE
index 62107bf2f9a3ea360faea111b3e9ed853cc6590a..80a97aed73177ff8b78412c1eaa3a81a79c184ee 100644 (file)
@@ -340,12 +340,17 @@ int     main(int argc, char **argv)
     mail_conf_read();
 
     /*
-     * Strip the environment so we don't have to trust the C library.
+     * This program is designed to be set-gid, which makes it a potential
+     * target for attack. If not running as root, strip the environment so we
+     * don't have to trust the C library. If running as root, don't strip the
+     * environment so that showq can receive non-default configuration
+     * directory info when the mail system is down.
      */
-    import_env = argv_split(var_import_environ, ", \t\r\n");
-    clean_env(import_env->argv);
-    argv_free(import_env);
-
+    if (geteuid() != 0) {
+       import_env = argv_split(var_import_environ, ", \t\r\n");
+       clean_env(import_env->argv);
+       argv_free(import_env);
+    }
     if (chdir(var_queue_dir))
        msg_fatal_status(EX_UNAVAILABLE, "chdir %s: %m", var_queue_dir);
 
index 38d688727407047a93cc48573c9178876d728d01..1e68eaa4a49510c6295edd5dc190a7c061d38ad2 100644 (file)
@@ -1399,7 +1399,7 @@ static void smtpd_proto(SMTPD_STATE *state)
            }
            if (cmdp->flags & SMTPD_CMD_FLAG_HEADER) {
                msg_warn("%s sent %s header instead of SMTP command: %.100s",
-                   cmdp->name, state->namaddr, vstring_str(state->buffer));
+                   state->namaddr, cmdp->name, vstring_str(state->buffer));
                smtpd_chat_reply(state, "221 Error: I can break rules, too. Goodbye.");
                break;
            }
index 8bf54dc554d0f84d18f77342fff88518bbe91616..a112245e9aa9b5719de554a5e157c8ef5bb419d4 100644 (file)
@@ -225,7 +225,13 @@ void    smtpd_sasl_initialize(void)
 
 void    smtpd_sasl_connect(SMTPD_STATE *state)
 {
+#if SASL_VERSION_MAJOR < 2
     unsigned sasl_mechanism_count;
+
+#else
+    int     sasl_mechanism_count;
+
+#endif
     sasl_security_properties_t sec_props;
     char   *server_address;
     char   *client_address;
index a769d08ed6c213f25ab0c859b3044abe80887946..04ca6593536d7612ea0599f0e54b87c5f89c3a9a 100644 (file)
@@ -10,8 +10,7 @@
 /*     char    *name;
 /* DESCRIPTION
 /*     The \fBsafe_getenv\fR() routine reads the named variable from the
-/*     environment, provided that either the process runs with the real
-/*     and effective user ID of root, or that the unsafe() routine agrees.
+/*     environment, provided that the unsafe() routine agrees.
 /* SEE ALSO
 /*     unsafe(3), detect non-user privileges
 /* LICENSE
@@ -38,6 +37,5 @@
 
 char   *safe_getenv(const char *name)
 {
-    return ((getuid() == 0 && geteuid() == 0) || unsafe() == 0 ?
-           getenv(name) : 0);
+    return (unsafe() == 0 ? getenv(name) : 0);
 }