]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.3-20060604
authorWietse Venema <wietse@porcupine.org>
Sun, 4 Jun 2006 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:32:19 +0000 (06:32 +0000)
16 files changed:
postfix/HISTORY
postfix/README_FILES/TLS_README
postfix/html/TLS_README.html
postfix/proto/TLS_README.html
postfix/src/global/Makefile.in
postfix/src/global/hold_message.c [deleted file]
postfix/src/global/hold_message.h [deleted file]
postfix/src/global/mail_version.h
postfix/src/global/quote_821_local.c
postfix/src/global/quote_822_local.c
postfix/src/master/master_spawn.c
postfix/src/pickup/pickup.c
postfix/src/util/find_inet.c
postfix/src/util/match_ops.c
postfix/src/util/safe_open.c
postfix/src/xsasl/xsasl_cyrus_client.c

index 89683247dd89c45091d19200626750a2670d2353..0f0b58c1617f38f8a7a5a2de1f86bf7342dd7dcb 100644 (file)
@@ -12175,10 +12175,18 @@ Apologies for any names omitted.
        domains without secondary MX records.  Joshua Goodall. File:
        smtpd/smtpd_check.c.
 
+20060604
+
+       Cleanup: minor fluff found with the BEAM source code analyzer.
+       Files: global/quote_821_local.c, global/quote_822_local.c,
+       master/master_spawn.c, pickup/pickup.c, util/match_ops.c,
+       util/safe_open.c, xsasl/xsasl_cyrus_client.c.
+
 Wish list:
 
-       Find out if postfix_tls@aet.tu-cottbus.de is still appropriate,
-       and if not, update TLS_README.
+       Don't lose bits when converting st_dev into maildir file
+       name. It's 64 bits on Linux. Found with the BEAM source
+       code analyzer.
 
        Do or don't introduce unknown_reverse_client_reject_code. 
 
index 533e975cb11c13f69ad898804d7402cd2c6eb770..474fc7577bccdd83bb2acb07c843a92afd2c09dc 100644 (file)
@@ -1056,13 +1056,10 @@ indicates a super-user shell.
 
 R\bRe\bep\bpo\bor\brt\bti\bin\bng\bg p\bpr\bro\bob\bbl\ble\bem\bms\bs
 
-When reporting a problem, please be thorough in the report. Patches, when
-possible, are greatly appreciated too.
-
-Please differentiate when possible between:
-
-  * Problems in the TLS code: <postfix_tls@aet.tu-cottbus.de>
-  * Problems in vanilla Postfix: <postfix-users@postfix.org>
+Problems are preferably reported via <postfix-users@postfix.org>. See http://
+www.postfix.org/lists.html for subscription information. When reporting a
+problem, please be thorough in the report. Patches, when possible, are greatly
+appreciated too.
 
 C\bCo\bom\bmp\bpa\bat\bti\bib\bbi\bil\bli\bit\bty\by w\bwi\bit\bth\bh P\bPo\bos\bst\btf\bfi\bix\bx <\b< 2\b2.\b.2\b2 T\bTL\bLS\bS s\bsu\bup\bpp\bpo\bor\brt\bt
 
index d2e9a3f5290d190c3b95f16e55e8e974924f6de5..748dc3dc933abebde6e576449bdbbbf830f3b305 100644 (file)
@@ -1518,18 +1518,10 @@ super-user privileges. </p>
 
 <h2> <a name="problems"> Reporting problems </a> </h2>
 
-<p> When reporting a problem, please be thorough in the report.
-Patches, when possible, are greatly appreciated too. </p>
-
-<p> Please differentiate when possible between: </p>
-
-<ul>
-
-<li> Problems in the TLS code: &lt;postfix_tls@aet.tu-cottbus.de&gt;
-
-<li> Problems in vanilla Postfix: &lt;postfix-users@postfix.org&gt;
-
-</ul>
+<p> Problems are preferably reported via &lt;postfix-users@postfix.org&gt;.
+See <a href="http://www.postfix.org/lists.html">http://www.postfix.org/lists.html</a> for subscription information.
+When reporting a problem, please be thorough in the report.  Patches,
+when possible, are greatly appreciated too. </p>
 
 <h2><a name="compat">Compatibility with Postfix &lt; 2.2 TLS support</a></h2>
 
index 31e2500bca2f21f40cb3ca456f7552aec6df7637..93f0a3c721239c6dba585b12a87592c0bfd96856 100644 (file)
@@ -1518,18 +1518,10 @@ tls_random_source = dev:/dev/urandom
 
 <h2> <a name="problems"> Reporting problems </a> </h2>
 
-<p> When reporting a problem, please be thorough in the report.
-Patches, when possible, are greatly appreciated too. </p>
-
-<p> Please differentiate when possible between: </p>
-
-<ul>
-
-<li> Problems in the TLS code: &lt;postfix_tls@aet.tu-cottbus.de&gt;
-
-<li> Problems in vanilla Postfix: &lt;postfix-users@postfix.org&gt;
-
-</ul>
+<p> Problems are preferably reported via &lt;postfix-users@postfix.org&gt;.
+See http://www.postfix.org/lists.html for subscription information.
+When reporting a problem, please be thorough in the report.  Patches,
+when possible, are greatly appreciated too. </p>
 
 <h2><a name="compat">Compatibility with Postfix &lt; 2.2 TLS support</a></h2>
 
index 9b93f878ef74c7161c88ba1ab1f53273bec0aafd..ddda6cc072534dc95a362bbc6a26642d7be6fcc8 100644 (file)
@@ -5,7 +5,7 @@ SRCS    = abounce.c anvil_clnt.c been_here.c bounce.c bounce_log.c \
        deliver_completed.c deliver_flock.c deliver_pass.c deliver_request.c \
        dict_ldap.c dict_mysql.c dict_pgsql.c dict_proxy.c domain_list.c \
        dot_lockfile.c dot_lockfile_as.c ext_prop.c file_id.c flush_clnt.c \
-       header_opts.c header_token.c hold_message.c input_transp.c \
+       header_opts.c header_token.c input_transp.c \
        is_header.c log_adhoc.c mail_addr.c mail_addr_crunch.c \
        mail_addr_find.c mail_addr_map.c mail_command_client.c \
        mail_command_server.c mail_conf.c mail_conf_bool.c mail_conf_int.c \
@@ -35,7 +35,7 @@ OBJS  = abounce.o anvil_clnt.o been_here.o bounce.o bounce_log.o \
        deliver_completed.o deliver_flock.o deliver_pass.o deliver_request.o \
        dict_ldap.o dict_mysql.o dict_pgsql.o dict_proxy.o domain_list.o \
        dot_lockfile.o dot_lockfile_as.o ext_prop.o file_id.o flush_clnt.o \
-       header_opts.o header_token.o hold_message.o input_transp.o \
+       header_opts.o header_token.o input_transp.o \
        is_header.o log_adhoc.o mail_addr.o mail_addr_crunch.o \
        mail_addr_find.o mail_addr_map.o mail_command_client.o \
        mail_command_server.o mail_conf.o mail_conf_bool.o mail_conf_int.o \
@@ -65,7 +65,7 @@ HDRS  = abounce.h anvil_clnt.h been_here.h bounce.h bounce_log.h \
        deliver_flock.h deliver_pass.h deliver_request.h dict_ldap.h \
        dict_mysql.h dict_pgsql.h dict_proxy.h domain_list.h dot_lockfile.h \
        dot_lockfile_as.h ext_prop.h file_id.h flush_clnt.h header_opts.h \
-       header_token.h hold_message.h input_transp.h is_header.h \
+       header_token.h input_transp.h is_header.h \
        lex_822.h log_adhoc.h mail_addr.h mail_addr_crunch.h \
        mail_addr_find.h mail_addr_map.h mail_conf.h mail_copy.h \
        mail_date.h mail_dict.h mail_error.h mail_flush.h mail_open_ok.h \
@@ -862,17 +862,6 @@ header_token.o: ../../include/vstring.h
 header_token.o: header_token.c
 header_token.o: header_token.h
 header_token.o: lex_822.h
-hold_message.o: ../../include/msg.h
-hold_message.o: ../../include/sane_fsops.h
-hold_message.o: ../../include/set_eugid.h
-hold_message.o: ../../include/sys_defs.h
-hold_message.o: ../../include/vbuf.h
-hold_message.o: ../../include/vstream.h
-hold_message.o: ../../include/vstring.h
-hold_message.o: hold_message.c
-hold_message.o: hold_message.h
-hold_message.o: mail_params.h
-hold_message.o: mail_queue.h
 input_transp.o: ../../include/msg.h
 input_transp.o: ../../include/name_mask.h
 input_transp.o: ../../include/sys_defs.h
diff --git a/postfix/src/global/hold_message.c b/postfix/src/global/hold_message.c
deleted file mode 100644 (file)
index 9a79a1b..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-/*++
-/* NAME
-/*     hold_message 3
-/* SUMMARY
-/*     move message to hold queue
-/* SYNOPSIS
-/*     #include <hold_message.h>
-/*
-/*     int     hold_message(path_buf, queue_name, queue_id)
-/*     VSTRING *path_buf;
-/*     const char *queue_name;
-/*     const char *queue_id;
-/* DESCRIPTION
-/*     The \fBhold_message\fR() routine moves the specified
-/*     queue file to the \fBhold\fR queue, where it will sit
-/*     until someone either destroys it or releases it.
-/*
-/*     Arguments:
-/* .IP path_buf
-/*     A null pointer, or storage for the new pathname.
-/* .IP queue_name
-/*     Queue name with the message that needs to be placed on hold.
-/* .IP queue_id
-/*     Queue file name with the message that needs to be placed on hold.
-/* DIAGNOSTICS
-/*     The result is -1 in case of failure, 0 in case of success.
-/* LICENSE
-/* .ad
-/* .fi
-/*     The Secure Mailer license must be distributed with this software.
-/* AUTHOR(S)
-/*     Wietse Venema
-/*     IBM T.J. Watson Research
-/*     P.O. Box 704
-/*     Yorktown Heights, NY 10598, USA
-/*--*/
-
-/* System library. */
-
-#include <sys_defs.h>
-#include <stdio.h>                     /* rename() */
-#include <stdlib.h>
-#include <unistd.h>
-#include <errno.h>
-
-/* Utility library. */
-
-#include <msg.h>
-#include <set_eugid.h>
-#include <sane_fsops.h>
-
-/* Global library. */
-
-#include <mail_queue.h>
-#include <mail_params.h>
-#include <hold_message.h>
-
-#define STR(x) vstring_str(x)
-
-/* hold_message - move message to hold queue */
-
-int     hold_message(VSTRING *path_buf, const char *queue_name,
-                            const char *queue_id)
-{
-    VSTRING *old_path = vstring_alloc(100);
-    VSTRING *new_path = 0;
-    uid_t   saved_uid;
-    gid_t   saved_gid;
-    int     err;
-
-    /*
-     * If not running as the mail system, change privileges first.
-     */
-    if ((saved_uid = geteuid()) != var_owner_uid) {
-       saved_gid = getegid();
-       set_eugid(var_owner_uid, var_owner_gid);
-    }
-
-    /*
-     * Your buffer or mine?
-     */
-    if (path_buf == 0)
-       new_path = path_buf = vstring_alloc(100);
-
-    /*
-     * This code duplicates mail_queue_rename(), except that it also returns
-     * the result pathname to the caller.
-     */
-    (void) mail_queue_path(old_path, queue_name, queue_id);
-    (void) mail_queue_path(path_buf, MAIL_QUEUE_HOLD, queue_id);
-    if ((err = sane_rename(STR(old_path), STR(path_buf))) == 0
-       || ((err = mail_queue_mkdirs(STR(path_buf)) == 0)
-           && (err = sane_rename(STR(old_path), STR(path_buf))) == 0)) {
-       if (msg_verbose)
-           msg_info("%s: placed on hold", queue_id);
-    }
-
-    /*
-     * Restore privileges.
-     */
-    if (saved_uid != var_owner_uid)
-       set_eugid(saved_uid, saved_gid);
-
-    /*
-     * Cleanup.
-     */
-    vstring_free(old_path);
-    if (new_path)
-       vstring_free(new_path);
-
-    return (err);
-}
diff --git a/postfix/src/global/hold_message.h b/postfix/src/global/hold_message.h
deleted file mode 100644 (file)
index ff0728b..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef _HOLD_MESSAGE_H_INCLUDED_
-#define _HOLD_MESSAGE_H_INCLUDED_
-
-/*++
-/* NAME
-/*     hold_message 3h
-/* SUMMARY
-/*     mark queue file as corrupt
-/* SYNOPSIS
-/*     #include <hold_message.h>
-/* DESCRIPTION
-/* .nf
-
- /*
-  * External interface.
-  */
-extern int hold_message(VSTRING *, const char *, const char *);
-
-/* LICENSE
-/* .ad
-/* .fi
-/*     The Secure Mailer license must be distributed with this software.
-/* AUTHOR(S)
-/*     Wietse Venema
-/*     IBM T.J. Watson Research
-/*     P.O. Box 704
-/*     Yorktown Heights, NY 10598, USA
-/*--*/
-
-#endif
index 8aca55168789c43fa71229d1fa22debdb2cd4780..97688435afd3646acd15acbb603f87d77e0feb92 100644 (file)
@@ -20,7 +20,7 @@
   * Patches change both the patchlevel and the release date. Snapshots have no
   * patchlevel; they change the release date only.
   */
-#define MAIL_RELEASE_DATE      "20060601"
+#define MAIL_RELEASE_DATE      "20060604"
 #define MAIL_VERSION_NUMBER    "2.3"
 
 #ifdef SNAPSHOT
index 1a0964cb604ea3d90bf37f18d9b66935f0f15322..8cd9b2e04878dd8b15aca7e043865f4f8797b897 100644 (file)
@@ -119,7 +119,7 @@ static VSTRING *make_821_quoted_string(VSTRING *dst, const char *local_part,
      * that need quoting when they occur in a quoted-string.
      */
     VSTRING_ADDCH(dst, '"');
-    for (cp = local_part; cp < end && (ch = *cp) != 0; cp++) {
+    for (cp = local_part; cp < end && (ch = *(unsigned char *) cp) != 0; cp++) {
        if ((ch > 127 && !(flags & QUOTE_FLAG_8BITCLEAN))
            || ch == '\r' || ch == '\n' || ch == '"' || ch == '\\')
            VSTRING_ADDCH(dst, '\\');
index a16149d2bccd8f9d1cb475c9bd5e69dc73f64dbf..9292252b4a76ba14305ba252856b3715acb46019 100644 (file)
@@ -132,7 +132,7 @@ static VSTRING *make_822_quoted_string(VSTRING *dst, const char *local_part,
      * that need quoting when they occur in a quoted-string.
      */
     VSTRING_ADDCH(dst, '"');
-    for (cp = local_part; cp < end && (ch = *cp) != 0; cp++) {
+    for (cp = local_part; cp < end && (ch = *(unsigned char *) cp) != 0; cp++) {
        if ((ch > 127 && !(flags & QUOTE_FLAG_8BITCLEAN))
            || ch == '"' || ch == '\\' || ch == '\r')
            VSTRING_ADDCH(dst, '\\');
index 1f112bc62279aefa8177a737ca528411a5196fe2..41fe033926a68b0a77c9e5eaa3a819ea11e0e632 100644 (file)
@@ -219,7 +219,6 @@ void    master_spawn(MASTER_SERV *serv)
 
        execvp(serv->path, serv->args->argv);
        msg_fatal("%s: exec %s: %m", myname, serv->path);
-       exit(1);
        /* NOTREACHED */
 
        /*
@@ -292,10 +291,8 @@ void    master_reap_child(void)
        if (msg_verbose)
            msg_info("master_reap_child: pid %d", pid);
        if ((proc = (MASTER_PROC *) binhash_find(master_child_table,
-                                       (char *) &pid, sizeof(pid))) == 0) {
+                                       (char *) &pid, sizeof(pid))) == 0)
            msg_panic("master_reap: unknown pid: %d", pid);
-           continue;
-       }
        serv = proc->serv;
        if (!NORMAL_EXIT_STATUS(status)) {
            if (WIFEXITED(status))
index 01473a8034ab30a98df709224ee9080f7ce16f88..750215b6dba8643abdfc21e8a7bf5b38af22d6fb 100644 (file)
@@ -306,7 +306,7 @@ static int pickup_copy(VSTREAM *qfile, VSTREAM *cleanup,
        info->st.st_mtime = now;
     } else if (info->st.st_mtime < now - DAY_SECONDS) {
        msg_warn("%s: message has been queued for %d days",
-                info->id, (int) (now - info->st.st_mtime) / DAY_SECONDS);
+                info->id, (int) ((now - info->st.st_mtime) / DAY_SECONDS));
     }
 
     /*
index f3118b491d300161c1da2aa1dffe159af58c0787..7ea1de31ec1ec2624119920ac0c63ecf1ca0574d 100644 (file)
@@ -85,6 +85,8 @@ int     find_inet_port(const char *service, const char *protocol)
     int     port;
 
     if (alldig(service) && (port = atoi(service)) != 0) {
+       if (port < 0 || port > 65535)
+           msg_fatal("bad port number: %s", service);
        return (htons(port));
     } else {
        if ((sp = getservbyname(service, protocol)) == 0)
index 3f9f20eea002c0763721065bdefc06c13bb359b0..e05450185c35c136e3ae131e27a469786d99584a 100644 (file)
@@ -219,7 +219,7 @@ int     match_hostaddr(int unused_flags, const char *addr, const char *pattern)
        if (strcasecmp(addr, pattern) == 0)
            return (1);
     } else {
-       ssize_t addr_len = strlen(addr);
+       size_t addr_len = strlen(addr);
 
        if (strncasecmp(addr, pattern + 1, addr_len) == 0
            && strcmp(pattern + 1 + addr_len, "]") == 0)
index 1ecabecf2a4400d831e182a13324619b9e8776d3..c825493caad28a0a98f49009a9ba051270b7a9a4 100644 (file)
@@ -188,6 +188,12 @@ static VSTREAM *safe_open_create(const char *path, int flags, mode_t mode,
        return (0);
     }
 
+    /*
+     * Optionally look up the file attributes.
+     */
+    if (st != 0 && fstat(vstream_fileno(fp), st) < 0)
+       msg_fatal("%s: bad open file status: %m", path);
+
     /*
      * Optionally change ownership after creating a new file. If there is a
      * problem we should not attempt to delete the file. Something else may
@@ -200,12 +206,6 @@ static VSTREAM *safe_open_create(const char *path, int flags, mode_t mode,
        msg_warn("%s: cannot change file ownership: %m", path);
     }
 
-    /*
-     * Optionally look up the file attributes.
-     */
-    if (st != 0 && fstat(vstream_fileno(fp), st) < 0)
-       msg_fatal("%s: bad open file status: %m", path);
-
     /*
      * We are almost there...
      */
index b42065e8752e452689c6a48921d44e1f74aae6ac..4dbf2242d2df7afa0ee8a91a7d960e7e2c735bfc 100644 (file)
@@ -379,7 +379,7 @@ static int xsasl_cyrus_client_set_security(XSASL_CLIENT *xp,
      * Per-session security properties. XXX This routine is not sufficiently
      * documented. What is the purpose of all this?
      */
-    memset(&sec_props, 0L, sizeof(sec_props));
+    memset(&sec_props, 0, sizeof(sec_props));
     sec_props.min_ssf = 0;
     sec_props.max_ssf = 0;                     /* don't allow real SASL
                                                 * security layer */