]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.7-20220117
authorWietse Venema <wietse@porcupine.org>
Mon, 17 Jan 2022 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Wed, 19 Jan 2022 06:36:08 +0000 (01:36 -0500)
26 files changed:
postfix/HISTORY
postfix/Makefile.in
postfix/WISHLIST
postfix/html/postconf.5.html
postfix/man/man5/postconf.5
postfix/mantools/check-postlink
postfix/mantools/postconf2man
postfix/mantools/srctoman
postfix/proto/postconf.proto
postfix/src/cleanup/cleanup_milter.c
postfix/src/global/mail_version.h
postfix/src/local/mailbox.c
postfix/src/oqmgr/qmgr_feedback.c
postfix/src/postconf/Makefile.in
postfix/src/postconf/test2.ref
postfix/src/postconf/test29.ref
postfix/src/postconf/test41.ref
postfix/src/postconf/test42.ref
postfix/src/postconf/test57.ref
postfix/src/postconf/test58.ref
postfix/src/postconf/test67.ref
postfix/src/proxymap/Makefile.in
postfix/src/qmgr/qmgr_feedback.c
postfix/src/smtp/smtp_connect.c
postfix/src/util/Makefile.in
postfix/src/util/htable.c

index 68f55587055684c983b864b44eb9011f8583173f..f0f6c55facb8cfb668fca962a5fad232da0d9116 100644 (file)
@@ -26022,11 +26022,12 @@ Apologies for any names omitted.
 
 20211220
 
-       Bugfix (introduced: Postfix 2.5): off-by-one error while writing
-       a string terminator. This code had passed all memory corruption
-       tests, presumably because it wrote over an alignment padding byte,
-       or over an adjacent character byte that was never read. Reported
-       by Robert Siemer. Files: *qmgr/qmgr_feedback.c.
+       Bugfix (introduced: Postfix 2.5): off-by-one error while
+       writing a string terminator. This code had passed all memory
+       corruption tests, presumably because it wrote over an
+       alignment padding byte, or over an adjacent character byte
+       that was never read. Reported by Robert Siemer. Files:
+       *qmgr/qmgr_feedback.c.
 
        Typo fixes from Raf, based on manual inspection. Verified
        that the .o files have not changed. Files: conf/main.cf,
@@ -26124,8 +26125,8 @@ Apologies for any names omitted.
 
        Cleanup: added missing _maps parameter names to the
        proxy_read_maps default value, based on output from the
-       mantools/missing-proxy-read-maps script.
-       File: global/mail_params.h.
+       mantools/missing-proxy-read-maps script.  File:
+       global/mail_params.h.
 
        Sanity: added LANG=C to the typo-check scripts to get
        consistent output. Files: mantools/check-spell-proto-html,
@@ -26173,3 +26174,43 @@ Apologies for any names omitted.
        Updated the hash function to make the distance between
        colliding inputs seed-dependent, which is really the only
        property that we needed. File: util/htable.c.
+
+20210105
+
+       Cleanup: deleting the \ before \' broke other things. Now
+       we need to escape \ at the start of an nroff input line.
+       Files: mantools/postconf2man, mantools/srctoman.
+
+20220107
+
+       Updated the hash function to avoid losing state when an
+       input byte is 0 (can never happen with a null-terminated
+       string, but makes the hash function usable in other contexts.
+       File: util/htable.c.
+
+20220116
+
+       Added more pre-release checks: missing postlink rules,
+       missing maps in proxy_read_maps. File: Makefile.in.
+
+20220117
+
+       Clenaup: the nullmx_reject_code parameter was removed from
+       Postfix 3.0 before it was released, but the manpage was not
+       updated. File: proto/postconf.proto.
+
+       Cleanup: after seeking past the end of a writable memory-backed
+       VSTREAM (i.e.  backed by a VSTRING), write nulls over the
+       newly allocated bytes. This behavior is compatible with
+       seeking past the end of a writable regular file. File:
+       util/vstream.c.
+
+       Cleanup: unit tests. File: cleanup/cleanup_milter.c.
+
+       Cleamup: disable hash-table seed in unit tests. Many
+       Makefiles, some unit test 'reference' files.
+
+       Bugfix (documented but not implemented since Postfix 2.2):
+       missing support for [address] smtp_bind_address and
+       smtp_bind_address6. Reported by Vincent Pelletier. File:
+       smtp/smtp_connect.c.
index b2ad1842a5f700b2b8bf06439219da0cae6b21c3..3c1071b8ba0f26bda0b528d372c126cd0432ccbb 100644 (file)
@@ -114,6 +114,15 @@ manpages:
         (set -e; echo "[$$i]"; cd $$i; $(MAKE) -f Makefile.in $(OPTS) MAKELEVEL=) || exit 1; \
        done </dev/null
 
+# Some require a statically-linked bin/postconf executable.
+pre-release-checks: typo-check missing-proxy-read-maps-check postlink-check
+
+postlink-check:
+       mantools/check-postlink | diff /dev/null -
+
+missing-proxy-read-maps-check:
+       mantools/missing-proxy-read-maps | diff /dev/null -
+
 typo-check: spell-cc spell-install-proto-text spell-proto-html \
        double-cc double-install-proto-text double-proto-html
 
index 6a817c4956d8602adfdb5ec2f61f1dc293cc20e8..963df3033650adc3f2d9dc4e6bea906256bd58f9 100644 (file)
@@ -2,8 +2,7 @@ Wish list:
 
        Things to do before the stable release:
 
-       make typo-check, HTML validator check,
-       mantools/missing-proxy-read-maps, mantools/check-postlink.
+       make pre-release-check, HTML validator check.
 
        Disable -DSNAPSHOT and -DNONPROD in makedefs.
 
index d6e784c5c9efc3b57132e1919d6fb608d4267b44..7fd51c5c4127dd8add2cd47d47f8a1aed3b16fbe 100644 (file)
@@ -7861,20 +7861,6 @@ Examples:
 </pre>
 
 
-</DD>
-
-<DT><b><a name="nullmx_reject_code">nullmx_reject_code</a>
-(default: 556)</b></DT><DD>
-
-<p> The numerical reply code when the Postfix SMTP server rejects
-a sender or recipient address because its domain has a nullmx DNS
-record (an MX record with an empty hostname). This is one of the
-possible replies from the restrictions <a href="postconf.5.html#reject_unknown_sender_domain">reject_unknown_sender_domain</a>
-and <a href="postconf.5.html#reject_unknown_recipient_domain">reject_unknown_recipient_domain</a>. </p>
-
-<p> This feature is available in Postfix 3.0 and later. </p>
-
-
 </DD>
 
 <DT><b><a name="openssl_path">openssl_path</a>
index 403e96490c56ff18e8f93d6d0365bca33965eb0d..649df2c604f53b46bf1837e68ac06d529c6ca5e0 100644 (file)
@@ -4921,14 +4921,6 @@ notify_classes = 2bounce, resource, software
 .fi
 .ad
 .ft R
-.SH nullmx_reject_code (default: 556)
-The numerical reply code when the Postfix SMTP server rejects
-a sender or recipient address because its domain has a nullmx DNS
-record (an MX record with an empty hostname). This is one of the
-possible replies from the restrictions reject_unknown_sender_domain
-and reject_unknown_recipient_domain.
-.PP
-This feature is available in Postfix 3.0 and later.
 .SH openssl_path (default: openssl)
 The location of the OpenSSL command line program \fBopenssl\fR(1).  This
 is used by the "\fBpostfix tls\fR" command to create private keys,
@@ -13749,7 +13741,7 @@ This feature is available in Postfix 2.3 and later.
 A workaround for implementations that hang Postfix while shutting
 down a TLS session, until Postfix times out. With this enabled,
 Postfix will not wait for the remote TLS peer to respond to a TLS
-'close' notification. This behavior is recommended for TLSv1.0 and
+\&'close' notification. This behavior is recommended for TLSv1.0 and
 later.
 .SH tls_high_cipherlist (default: see "postconf \-d" output)
 The OpenSSL cipherlist for "high" grade ciphers. This defines
index ecddefa00327676c4996854d48124e61f6d111f4..cdb7e079bac2629fb542d8fa0896c8e56ecedc16 100755 (executable)
 
 # Look for missing parameter names in postlink
 
+LANG=C; export LANG
+LC_ALL=C; export LC_ALL
+
 trap 'rm -f postlink.tmp postconf.tmp check-postlink.tmp 2>/dev/null' 0 1 2 3 15
 
-# Extract parameters from postconf.5.html hyperlinks.
+# Extract parameters from postlink script. This also produces names
+# of obsolete parameters, and non-parameter names such as SMTPD
+# access restrictions and mask names.
 
 sed -n '/[     ].*href="postconf\.5\.html#/{
        s/^[^#]*#//
        s/".*//
        p
 }' mantools/postlink | sort > postlink.tmp
-#
-# Extract parameters from postlink script. This also produces names
-# of obsolete parameters, and non-parameter names such as SMTPD
-# access restrictions and mask names.
 
-postconf -d | sed 's/ =.*//' | sort >postconf.tmp
+# Extract parameters from postconf output.
+
+bin/postconf -dHc conf | sort >postconf.tmp
 
 # Filter the output through a whitelist.
 
 cat >check-postlink.tmp <<'EOF'
+error_delivery_slot_cost
+error_delivery_slot_discount
+error_delivery_slot_loan
+error_destination_concurrency_failed_cohort_limit
+error_destination_concurrency_limit
+error_destination_concurrency_negative_feedback
+error_destination_concurrency_positive_feedback
+error_destination_rate_delay
+error_destination_recipient_limit
+error_extra_recipient_limit
+error_initial_destination_concurrency
+error_minimum_delivery_slots
+error_recipient_limit
+error_recipient_refill_delay
+error_recipient_refill_limit
+error_transport_rate_delay
 lmtp_body_checks
 lmtp_cname_overrides_servername
+lmtp_delivery_slot_cost
+lmtp_delivery_slot_discount
+lmtp_delivery_slot_loan
 lmtp_destination_concurrency_failed_cohort_limit
 lmtp_destination_concurrency_negative_feedback
 lmtp_destination_concurrency_positive_feedback
 lmtp_destination_rate_delay
+lmtp_extra_recipient_limit
 lmtp_header_checks
 lmtp_initial_destination_concurrency
 lmtp_mime_header_checks
+lmtp_minimum_delivery_slots
 lmtp_nested_header_checks
+lmtp_recipient_limit
+lmtp_recipient_refill_delay
+lmtp_recipient_refill_limit
+lmtp_transport_rate_delay
+local_delivery_slot_cost
+local_delivery_slot_discount
+local_delivery_slot_loan
 local_destination_concurrency_failed_cohort_limit
 local_destination_concurrency_negative_feedback
 local_destination_concurrency_positive_feedback
 local_destination_rate_delay
+local_extra_recipient_limit
 local_initial_destination_concurrency
+local_minimum_delivery_slots
+local_recipient_limit
+local_recipient_refill_delay
+local_recipient_refill_limit
+local_transport_rate_delay
+relay_delivery_slot_cost
+relay_delivery_slot_discount
+relay_delivery_slot_loan
 relay_destination_concurrency_failed_cohort_limit
 relay_destination_concurrency_negative_feedback
 relay_destination_concurrency_positive_feedback
 relay_destination_rate_delay
+relay_extra_recipient_limit
 relay_initial_destination_concurrency
+relay_minimum_delivery_slots
+relay_recipient_limit
+relay_recipient_refill_delay
+relay_recipient_refill_limit
+relay_transport_rate_delay
+retry_delivery_slot_cost
+retry_delivery_slot_discount
+retry_delivery_slot_loan
+retry_destination_concurrency_failed_cohort_limit
+retry_destination_concurrency_limit
+retry_destination_concurrency_negative_feedback
+retry_destination_concurrency_positive_feedback
+retry_destination_rate_delay
+retry_destination_recipient_limit
+retry_extra_recipient_limit
+retry_initial_destination_concurrency
+retry_minimum_delivery_slots
+retry_recipient_limit
+retry_recipient_refill_delay
+retry_recipient_refill_limit
+retry_transport_rate_delay
+smtp_delivery_slot_cost
+smtp_delivery_slot_discount
+smtp_delivery_slot_loan
 smtp_destination_concurrency_failed_cohort_limit
 smtp_destination_concurrency_negative_feedback
 smtp_destination_concurrency_positive_feedback
 smtp_destination_rate_delay
+smtp_extra_recipient_limit
 smtp_initial_destination_concurrency
+smtp_minimum_delivery_slots
+smtp_recipient_limit
+smtp_recipient_refill_delay
+smtp_recipient_refill_limit
+smtp_transport_rate_delay
 stress
+tlsproxy_client_level
+tlsproxy_client_policy
+virtual_delivery_slot_cost
+virtual_delivery_slot_discount
+virtual_delivery_slot_loan
 virtual_destination_concurrency_failed_cohort_limit
 virtual_destination_concurrency_negative_feedback
 virtual_destination_concurrency_positive_feedback
 virtual_destination_rate_delay
+virtual_extra_recipient_limit
 virtual_initial_destination_concurrency
+virtual_minimum_delivery_slots
+virtual_recipient_limit
+virtual_recipient_refill_delay
+virtual_recipient_refill_limit
+virtual_transport_rate_delay
+
 EOF
 
 comm -23 postconf.tmp postlink.tmp | fgrep -vx -f check-postlink.tmp
index f4bc6fa6fc66b2c054a076c942f23088776bfb74..cf5e16128054ebdc706be7581209066e1ebb29c3 100755 (executable)
@@ -38,6 +38,7 @@ while(<>) {
     # Even \134 comes out as \e. What brain damage is this?
     #$block =~ s/\n\./\n\\\&./g;
     $block =~ s/\n\./\n\134\&./g;
+    $block =~ s/\n'/\n\134\&'/g;
     if ($block =~ /<H2>/) {
        $block =~ s/<H2><a[^>]+>([^<]+)<\/a><\/H2>/\n.SH \1\n/g;
        $block =~ tr/a-z/A-Z/;
index 9ea45cd8d60bc537caf90913a77a6561cb9f4136..9102201c67d426d08866cb2ca4923204d32d1d61 100755 (executable)
@@ -103,6 +103,9 @@ do
     /^\./{
        s/\([^ ]\)-/\1\\-/g
     }
+    /^'"'"'/{
+       s/^/\\\&/
+    }
     /^[^.]/{
        s/-/\\-/g
     }
index 091cb8cf03bbff434428812216352b821dc03e70..e45d4afec7ea16ecd940399dd526c97f70f43642 100644 (file)
@@ -17035,16 +17035,6 @@ header names is limited only by available memory.  </p>
 
 <p> This feature is available in Postfix 3.0 and later. </p>
 
-%PARAM nullmx_reject_code 556
-
-<p> The numerical reply code when the Postfix SMTP server rejects
-a sender or recipient address because its domain has a nullmx DNS
-record (an MX record with an empty hostname). This is one of the
-possible replies from the restrictions reject_unknown_sender_domain
-and reject_unknown_recipient_domain. </p>
-
-<p> This feature is available in Postfix 3.0 and later. </p>
-
 %PARAM smtpd_dns_reply_filter
 
 <p> Optional filter for Postfix SMTP server DNS lookup results.
index fc5486fdc1199779d8ad9f89b143a7bec525905b..05237deb7e497ee916e4276d3908f4da624b84e8 100644 (file)
@@ -2675,10 +2675,13 @@ int     main(int unused_argc, char **argv)
                    msg_warn("open %s file: %m", argv->argv[1]);
                } else {
                    buf = vstring_alloc(100);
-                   cleanup_repl_body(state, MILTER_BODY_START, buf);
+                   cleanup_repl_body(state, MILTER_BODY_START,
+                                     REC_TYPE_NORM, buf);
                    while (vstring_get_nonl(buf, fp) != VSTREAM_EOF)
-                       cleanup_repl_body(state, MILTER_BODY_LINE, buf);
-                   cleanup_repl_body(state, MILTER_BODY_END, buf);
+                       cleanup_repl_body(state, MILTER_BODY_LINE,
+                                         REC_TYPE_NORM, buf);
+                   cleanup_repl_body(state, MILTER_BODY_END,
+                                     REC_TYPE_NORM, buf);
                    vstring_free(buf);
                    vstream_fclose(fp);
                }
index a69e8368324b3d5c6b07afda7338e4ec1f1fc403..ff5c7013c3db293de8d9e17b516badc91c15b64e 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      "20220103"
+#define MAIL_RELEASE_DATE      "20220117"
 #define MAIL_VERSION_NUMBER    "3.7"
 
 #ifdef SNAPSHOT
index d31bc6bd54707d6251004f45e6db19ad5cca63fd..ed552916c2f6278370b2ce992c714be8d02a9fa1 100644 (file)
@@ -153,7 +153,7 @@ static int deliver_mailbox_file(LOCAL_STATE state, USER_ATTR usr_attr)
      * world-writable, deliver as the recipient; if the spool directory is
      * group-writable, use the recipient user id and the mail spool group id.
      * 
-     * Otherwise, use root privileges and chown the mailbox.
+     * Otherwise, use root privileges and chown the mailbox if we create it.
      */
     if (spool_dir == 0
        || stat(spool_dir, &st) < 0
index bf7aebb20354df3b13196d9bf0e832ad7afd27e7..f8019f827aa56e02ce7ba66606e8310ed79d9bab 100644 (file)
 /*     IBM T.J. Watson Research
 /*     P.O. Box 704
 /*     Yorktown Heights, NY 10598, USA
+/*
+/*     Wietse Venema
+/*     Google, Inc.
+/*     111 8th Avenue
+/*     New York, NY 10011, USA
 /*--*/
 
 /* System library. */
index 83b4953ed0a2749098fc8128dc56d2e96d248c09..60c797a73d462084175c9acfe931ec0d11452de4 100644 (file)
@@ -28,6 +28,7 @@ LIBS  = ../../lib/libxsasl.a \
        ../../lib/lib$(LIB_PREFIX)dns$(LIB_SUFFIX) \
        ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
        ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
+HTABLE_FIX = NORANDOMIZE=1
 
 .c.o:; $(CC) $(CFLAGS) -c $*.c
 
@@ -94,7 +95,7 @@ test1:        $(PROG) test1.ref
        echo smtpd_restriction_classes = foo bar >> main.cf
        echo foo = yes >> main.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test1.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test1.tmp 2>&1
        diff test1.ref test1.tmp
        rm -f main.cf master.cf test1.tmp
 
@@ -106,7 +107,7 @@ test2:      $(PROG) test2.ref
        echo restriction_classes = foo bar >> main.cf
        echo foo = yes >> main.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test2.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test2.tmp 2>&1
        diff test2.ref test2.tmp
        rm -f main.cf master.cf test2.tmp
 
@@ -119,7 +120,7 @@ test3:      $(PROG) test3.ref
        echo 'bar = $$foo' >> main.cf
        echo 'always_bcc = $$bar' >> main.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test3.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test3.tmp 2>&1
        diff test3.ref test3.tmp
        rm -f main.cf master.cf test3.tmp
 
@@ -133,7 +134,7 @@ test4:      $(PROG) test4.ref
        echo smtpd unix - n n - 0 smtpd >> master.cf
        echo ' -o always_bcc=$$bar' >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test4.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test4.tmp 2>&1
        diff test4.ref test4.tmp
        rm -f main.cf master.cf test4.tmp
 
@@ -149,7 +150,7 @@ test4b:     $(PROG) test4b.ref
        echo ' -o foo=xxx -o bar=yyy -o baz=zzz' >> master.cf
        echo '#smtpd2 unix - n n - 0 smtpd' >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test4b.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test4b.tmp 2>&1
        diff test4b.ref test4b.tmp
        rm -f main.cf master.cf test4b.tmp
 
@@ -162,7 +163,7 @@ test5:      $(PROG) test5.ref
        echo smtpd unix - n n - 0 smtpd >> master.cf
        echo ' -o bar=yes -o always_bcc=$$bar -o' >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test5.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test5.tmp 2>&1
        diff test5.ref test5.tmp
        rm -f main.cf master.cf test5.tmp
 
@@ -173,7 +174,7 @@ test6:      $(PROG) test6.ref
        touch main.cf master.cf
        echo whatevershebrings unix - n n - 0 pipe >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . 2>&1 | grep whatevershebrings >test6.tmp
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . 2>&1 | grep whatevershebrings >test6.tmp
        diff test6.ref test6.tmp
        rm -f main.cf master.cf test6.tmp
 
@@ -184,7 +185,7 @@ test7:      $(PROG) test7.ref
        touch main.cf master.cf
        echo whatevershebrings unix - n n - 0 spawn >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . 2>&1 | grep whatevershebrings >test7.tmp
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . 2>&1 | grep whatevershebrings >test7.tmp
        diff test7.ref test7.tmp
        rm -f main.cf master.cf test7.tmp
 
@@ -194,7 +195,7 @@ test8:      $(PROG) test8.ref
        echo whatevershebrings inet - n n - 0 spawn >> master.cf
        echo whatevershebrings_time_limit=1 >> main.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . 2>&1 | grep whatevershebrings >test8.tmp
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . 2>&1 | grep whatevershebrings >test8.tmp
        diff test8.ref test8.tmp
        rm -f main.cf master.cf test8.tmp
 
@@ -204,7 +205,7 @@ test9:      $(PROG) test9.ref
        echo foo inet - n n - 0 spawn >> master.cf
        echo bar unix - n n - 0 spawn >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . -M '*'/inet >test9.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . -M '*'/inet >test9.tmp 2>&1
        diff test9.ref test9.tmp
        rm -f main.cf master.cf test9.tmp
 
@@ -214,7 +215,7 @@ test10:     $(PROG) test10.ref
        echo foo inet - n n - 0 spawn >> master.cf
        echo bar unix - n n - 0 spawn >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . -M bar/inet foo/unix >test10.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . -M bar/inet foo/unix >test10.tmp 2>&1
        diff test10.ref test10.tmp
        rm -f main.cf master.cf test10.tmp
 
@@ -224,7 +225,7 @@ test11:     $(PROG) test11.ref
        echo foo inet - n n - 0 spawn >> master.cf
        echo bar unix - n n - 0 spawn >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . -M >test11.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . -M >test11.tmp 2>&1
        diff test11.ref test11.tmp
        rm -f main.cf master.cf test11.tmp
 
@@ -239,7 +240,7 @@ test12:     $(PROG) test12.ref
        echo foo inet - n n - 0 spawn >> master.cf
        echo ' -o always_bcc=$$bar -o' >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . -M >test12.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . -M >test12.tmp 2>&1
        diff test12.ref test12.tmp
        rm -f main.cf master.cf test12.tmp
 
@@ -253,7 +254,7 @@ test13:     $(PROG) test13.ref
        echo foo inet - n n - 0 spawn >> master.cf
        echo ' -o smtpd_restriction_classes=bar' >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test13.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test13.tmp 2>&1
        diff test13.ref test13.tmp
        rm -f main.cf master.cf test13.tmp
 
@@ -266,7 +267,7 @@ test14:     $(PROG) test14.ref
        echo foo inet - n n - 0 spawn >> master.cf
        echo ' -o bar=yes -o baz=xx' >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test14.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test14.tmp 2>&1
        diff test14.ref test14.tmp
        rm -f main.cf master.cf test14.tmp
 
@@ -280,7 +281,7 @@ test15:     $(PROG) test15.ref
        echo foo inet - n n - 0 spawn >> master.cf
        echo ' -o bar=yes -o always_bcc=$$bar$$baz' >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test15.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test15.tmp 2>&1
        diff test15.ref test15.tmp
        rm -f main.cf master.cf test15.tmp
 
@@ -289,14 +290,14 @@ test15:   $(PROG) test15.ref
 test16:        $(PROG) test16.ref
        rm -f main.cf master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test16.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test16.tmp 2>&1
        diff test16.ref test16.tmp
        rm -f main.cf master.cf test16.tmp
 
 test17:        $(PROG) test17.ref
        rm -f main.cf master.cf
        touch -t 197101010000 main.cf
-       -$(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mc . >test17.tmp 2>&1; exit 0
+       -$(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mc . >test17.tmp 2>&1; exit 0
        diff test17.ref test17.tmp
        rm -f main.cf master.cf test17.tmp
 
@@ -308,7 +309,7 @@ test18:     $(PROG) test18.ref
        echo virtual_maps=xxx >> main.cf
        echo smtpd_client_connection_limit_exceptions=yyy >> main.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test18.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test18.tmp 2>&1
        diff test18.ref test18.tmp
        rm -f main.cf master.cf test18.tmp
 
@@ -320,7 +321,7 @@ test19:     $(PROG) test19.ref
        echo forward_path='$$'aaaa >> main.cf
        echo default_rbl_reply='$$'bbbb >> main.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test19.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test19.tmp 2>&1
        diff test19.ref test19.tmp
        rm -f main.cf master.cf test19.tmp
 
@@ -332,7 +333,7 @@ test20:     $(PROG) test20.ref
        echo foo inet - n n - 0 spawn >> master.cf
        echo ' -o always_bcc=$$bar$$baz' >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc . >test20.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc . >test20.tmp 2>&1
        diff test20.ref test20.tmp
        rm -f main.cf master.cf test20.tmp
 
@@ -344,7 +345,7 @@ test21:     $(PROG) test21.ref
        echo forward_path = xxxxxxxxxxxxx xxxxxxxxxxxxxx xxxxxxxxxxxx \
            xxxxxxxxxxxxx xxxxxxxxxxxxxx >> main.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nfc . >test21.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nfc . >test21.tmp 2>&1
        diff test21.ref test21.tmp
        rm -f main.cf master.cf test21.tmp
 
@@ -355,7 +356,7 @@ test22:     $(PROG) test22.ref
        touch main.cf master.cf
        echo whatevershebrings unix - n n - 0 smtp >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . 2>&1 | grep whatevershebrings >test22.tmp
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . 2>&1 | grep whatevershebrings >test22.tmp
        diff test22.ref test22.tmp
        rm -f main.cf master.cf test22.tmp
 
@@ -369,7 +370,7 @@ test23:     $(PROG) test23.ref
        echo whatevershebrings unix - n n - 0 smtp >> master.cf
        echo ' -o always_bcc=$$name' >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . -nC builtin >test23.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . -nC builtin >test23.tmp 2>&1
        diff test23.ref test23.tmp
        rm -f main.cf master.cf test23.tmp
 
@@ -381,7 +382,7 @@ test24:     $(PROG) test24.ref
        echo whatevershebrings unix - n n - 0 smtp >> master.cf
        echo ' -o always_bcc=$$name' >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . -nC user >test24.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . -nC user >test24.tmp 2>&1
        diff test24.ref test24.tmp
        rm -f main.cf master.cf test24.tmp
 
@@ -393,7 +394,7 @@ test25:     $(PROG) test25.ref
        echo whatevershebrings unix - n n - 0 smtp >> master.cf
        echo ' -o always_bcc=$$name' >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . -C service 2>&1 | grep whatevershebrings >test25.tmp
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . -C service 2>&1 | grep whatevershebrings >test25.tmp
        diff test25.ref test25.tmp
        rm -f main.cf master.cf test25.tmp
 
@@ -407,7 +408,7 @@ test26:     $(PROG) test26.ref
        echo whatevershebrings unix - n n - 0 smtp >> master.cf
        echo ' -o always_bcc=$$name' >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . -C all >test26.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . -C all >test26.tmp 2>&1
        diff test26.ref test26.tmp
        rm -f main.cf master.cf test26.tmp
 
@@ -419,7 +420,7 @@ test27:     $(PROG) test27.ref
        echo whatevershebrings unix - n n - 0 smtp >> master.cf
        echo ' -o always_bcc=$$name' >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . -C all 2>&1 | grep whatevershebrings >test27.tmp
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c . -C all 2>&1 | grep whatevershebrings >test27.tmp
        diff test27.ref test27.tmp
        rm -f main.cf master.cf test27.tmp
 
@@ -440,7 +441,7 @@ test28:     $(PROG) test28.ref
        echo 'aap_domain = whatever' >> main.cf
        echo 'aa_domain = whatever' >> main.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test28.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test28.tmp 2>&1
        diff test28.ref test28.tmp
        rm -f main.cf master.cf test28.tmp
 
@@ -465,7 +466,7 @@ test29:     $(PROG) test29.ref
        echo 'memcachefoo_domain = bar' >> main.cf
        echo 'memcachefoo_domainx = bar' >> main.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test29.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test29.tmp 2>&1
        diff test29.ref test29.tmp
        rm -f main.cf master.cf test29.tmp
 
@@ -482,7 +483,7 @@ test30:     $(PROG) test30.ref
        echo ' -oheader_checks=$$p3' >> master.cf
        echo ' -oheaderx_checks=$$p4' >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test30.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test30.tmp 2>&1
        diff test30.ref test30.tmp
        rm -f main.cf master.cf test30.tmp
 
@@ -494,7 +495,7 @@ test31:     $(PROG) test31.ref
        echo 'smtpd_helo_restrictions=whatever' >> main.cf
        echo 'smtpd_sender_restrictions=$$smtpd_helo_restrictions' >> main.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nxc . >test31.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nxc . >test31.tmp 2>&1
        diff test31.ref test31.tmp
        rm -f main.cf master.cf test31.tmp
 
@@ -505,7 +506,7 @@ test32:     $(PROG) test32.ref
        touch main.cf master.cf
        echo 'relay_domains=whatever' >> main.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -xc . fast_flush_domains >test32.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -xc . fast_flush_domains >test32.tmp 2>&1
        diff test32.ref test32.tmp
        rm -f main.cf master.cf test32.tmp
 
@@ -517,7 +518,7 @@ test33:     $(PROG) test33.ref
        echo 'mydestination=whatever' >> main.cf
        echo 'always_bcc=$$relay_domains' >> main.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -xc . always_bcc >test33.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -xc . always_bcc >test33.tmp 2>&1
        diff test33.ref test33.tmp
        rm -f main.cf master.cf test33.tmp
 
@@ -528,7 +529,7 @@ test34:     $(PROG) test34.ref
        echo 'process_name=xxx' >> main.cf
        echo 'process_id=yyy' >> main.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -xc . mydestination process_name >test34.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -xc . mydestination process_name >test34.tmp 2>&1
        diff test34.ref test34.tmp
        rm -f main.cf master.cf test34.tmp
 
@@ -540,7 +541,7 @@ test35:     $(PROG) test35.ref
        echo ' -o process_name=aaa' >> master.cf
        echo ' -o process_id=bbb' >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -xc . process_name >test35.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -xc . process_name >test35.tmp 2>&1
        diff test35.ref test35.tmp
        rm -f main.cf master.cf test35.tmp
 
@@ -550,7 +551,7 @@ test36:     $(PROG) test36.ref
        echo 'mydestination=$$virtual_mapx' >> main.cf
        echo 'virtual_alias_maps=$$virtual_maps' >> main.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nxc . >test36.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nxc . >test36.tmp 2>&1
        diff test36.ref test36.tmp
        rm -f main.cf master.cf test36.tmp
 
@@ -564,7 +565,7 @@ test37: $(PROG) test37.ref
        echo ' -o always_bcc=$$aaa' >> master.cf
        echo ' -o aaa=ccc' >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfxc . >test37.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfxc . >test37.tmp 2>&1
        diff test37.ref test37.tmp
        rm -f main.cf master.cf test37.tmp
 
@@ -575,7 +576,7 @@ test39: $(PROG) test39.ref
        echo bar inet - n n - 0 other >> master.cf
        echo baz unix - n n - 0 other >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc . '*'/unix >test39.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc . '*'/unix >test39.tmp 2>&1
        diff test39.ref test39.tmp
        rm -f main.cf master.cf test39.tmp
 
@@ -587,7 +588,7 @@ test40: $(PROG) test40.ref
        echo ' -vo ccc=$$aaa' >> master.cf
        echo ' -v -oddd=$$ccc' >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfxc . '*'/unix >test40.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfxc . '*'/unix >test40.tmp 2>&1
        diff test40.ref test40.tmp
        rm -f main.cf master.cf test40.tmp
 
@@ -598,11 +599,11 @@ test41: $(PROG) test41.ref
        echo bar unix - n n - 0 other >> master.cf
        echo baz unix - n n - 0 other >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Pc . bar/unix/xxx=yyy bar/unix/aaa=bbb >test41.tmp 2>&1
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >>test41.tmp 2>&1
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Pc . bar/unix/xxx=YYY bar/unix/aaa=BBB >>test41.tmp 2>&1
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >>test41.tmp 2>&1
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Pc . >>test41.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Pc . bar/unix/xxx=yyy bar/unix/aaa=bbb >test41.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >>test41.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Pc . bar/unix/xxx=YYY bar/unix/aaa=BBB >>test41.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >>test41.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Pc . >>test41.tmp 2>&1
        diff test41.ref test41.tmp
        rm -f main.cf master.cf test41.tmp
 
@@ -613,11 +614,11 @@ test42: $(PROG) test42.ref
        echo bar unix - n n - 0 other >> master.cf
        echo baz unix - n n - 0 other >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Pc . bar/unix/xxx=yyy bar/unix/aaa=bbb >test42.tmp 2>&1
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >>test42.tmp 2>&1
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Pc . >>test42.tmp 2>&1
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -PXc. bar/unix/xxx bar/unix/aaa >>test42.tmp 2>&1
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >>test42.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Pc . bar/unix/xxx=yyy bar/unix/aaa=bbb >test42.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >>test42.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Pc . >>test42.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -PXc. bar/unix/xxx bar/unix/aaa >>test42.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >>test42.tmp 2>&1
        diff test42.ref test42.tmp
        rm -f main.cf master.cf test42.tmp
 
@@ -628,8 +629,8 @@ test43: $(PROG) test43.ref
        echo bar unix - n n - 0 other >> master.cf
        echo baz unix - n n - 0 other >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Fc . bar/unix/chroot=y bar/unix/command='aa -stuffobb=cc dd' >test43.tmp 2>&1
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >>test43.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Fc . bar/unix/chroot=y bar/unix/command='aa -stuffobb=cc dd' >test43.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >>test43.tmp 2>&1
        diff test43.ref test43.tmp
        rm -f main.cf master.cf test43.tmp
 
@@ -640,8 +641,8 @@ test44: $(PROG) test44.ref
        echo bar unix - n n - 0 other >> master.cf
        echo baz unix - n n - 0 other >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mc . bar/unix='xx inet - n n - 0 aa -stuffobb=cc dd' >test44.tmp 2>&1
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >>test44.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mc . bar/unix='xx inet - n n - 0 aa -stuffobb=cc dd' >test44.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >>test44.tmp 2>&1
        diff test44.ref test44.tmp
        rm -f main.cf master.cf test44.tmp
 
@@ -652,7 +653,7 @@ test45: $(PROG) test45.ref
        echo bar xxxx - n n - 0 other >> master.cf
        echo baz unix - n n - 0 other >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >test45.tmp 2>&1 || true
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >test45.tmp 2>&1 || true
        diff test45.ref test45.tmp
        rm -f main.cf master.cf test45.tmp
 
@@ -663,7 +664,7 @@ test46: $(PROG) test46.ref
        echo bar inet X n n - 0 other >> master.cf
        echo baz unix - n n - 0 other >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >test46.tmp 2>&1 || true
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >test46.tmp 2>&1 || true
        diff test46.ref test46.tmp
        rm -f main.cf master.cf test46.tmp
 
@@ -674,7 +675,7 @@ test47: $(PROG) test47.ref
        echo bar inet - X n - 0 other >> master.cf
        echo baz unix - n n - 0 other >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >test47.tmp 2>&1 || true
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >test47.tmp 2>&1 || true
        diff test47.ref test47.tmp
        rm -f main.cf master.cf test47.tmp
 
@@ -685,7 +686,7 @@ test48: $(PROG) test48.ref
        echo bar inet - n X - 0 other >> master.cf
        echo baz unix - n n - 0 other >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >test48.tmp 2>&1 || true
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >test48.tmp 2>&1 || true
        diff test48.ref test48.tmp
        rm -f main.cf master.cf test48.tmp
 
@@ -696,7 +697,7 @@ test49: $(PROG) test49.ref
        echo bar inet - n n X 0 other >> master.cf
        echo baz unix - n n - 0 other >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >test49.tmp 2>&1 || true
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >test49.tmp 2>&1 || true
        diff test49.ref test49.tmp
        rm -f main.cf master.cf test49.tmp
 
@@ -707,7 +708,7 @@ test50: $(PROG) test50.ref
        echo bar inet - n n - X other >> master.cf
        echo baz unix - n n - 0 other >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >test50.tmp 2>&1 || true
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >test50.tmp 2>&1 || true
        diff test50.ref test50.tmp
        rm -f main.cf master.cf test50.tmp
 
@@ -718,7 +719,7 @@ test51: $(PROG) test51.ref
        echo bar inet - n n X? 0 other >> master.cf
        echo baz unix - n n 0? 0 other >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >test51.tmp 2>&1 || true
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >test51.tmp 2>&1 || true
        diff test51.ref test51.tmp
        rm -f main.cf master.cf test51.tmp
 
@@ -729,8 +730,8 @@ test52: $(PROG) test52.ref
        echo bar inet - n n 0 0 other >> master.cf
        echo baz unix - n n 0 0 other >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -MXc. bar/inet foo/unix xxx/yyy
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >test52.tmp 2>&1 || true
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -MXc. bar/inet foo/unix xxx/yyy
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >test52.tmp 2>&1 || true
        diff test52.ref test52.tmp
        rm -f main.cf master.cf test52.tmp
 
@@ -741,7 +742,7 @@ test53: $(PROG) test53.ref
        echo bar inet - n n 0 0 other >> master.cf
        echo baz unix - n n 0 0 other >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -M#c. bar/inet xxx/yyy
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -M#c. bar/inet xxx/yyy
        diff test53.ref master.cf
        rm -f main.cf master.cf test53.tmp
 
@@ -752,7 +753,7 @@ test54: $(PROG) test54.ref
        echo bar inet - n n 0 0 other >> master.cf
        echo baz unix - n n 0 0 other >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -M#c. bar/inet foo/unix
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -M#c. bar/inet foo/unix
        diff test54.ref master.cf
        rm -f main.cf master.cf test54.tmp
 
@@ -763,7 +764,7 @@ test55: $(PROG) test55.ref
        echo bar inet - n n 0 0 other >> master.cf
        echo baz unix - n n 0 0 other >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -M#c. bar/inet baz/unix
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -M#c. bar/inet baz/unix
        diff test55.ref master.cf
        rm -f main.cf master.cf test55.tmp
 
@@ -776,7 +777,7 @@ test56: $(PROG) test56.ref
        echo " -o second" >> master.cf
        echo baz unix - n n 0 0 other >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -M#c. bar/inet xxx/yyy
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -M#c. bar/inet xxx/yyy
        diff test56.ref master.cf
        rm -f main.cf master.cf test56.tmp
 
@@ -793,7 +794,7 @@ test57: $(PROG) test57.ref
        echo 't1 = Postfix 2.11 $${{$${x?bug:x}} == {bug}?in}compatible' >> main.cf
        echo 't2 = $$t1' >> main.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nxc. >test57.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nxc. >test57.tmp 2>&1
        diff test57.ref test57.tmp
        rm -f main.cf master.cf test57.tmp
 
@@ -806,7 +807,7 @@ test58: $(PROG) test58.ref
        echo 'yy_backup = bbb' >> main.cf
        echo 'yy_bogus = bbb' >> main.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./postconf -nc. >test58.tmp 2>&1 || true
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./postconf -nc. >test58.tmp 2>&1 || true
        diff test58.ref test58.tmp
        rm -f main.cf master.cf test58.tmp
 
@@ -822,7 +823,7 @@ test59: $(PROG) test59.ref
        echo " { arg3a arg3b " >> master.cf
        echo baz unix - n n 0 0 other >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >test59.tmp 2>&1 || true
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Mfc. >test59.tmp 2>&1 || true
        diff test59.ref test59.tmp
        rm -f main.cf master.cf test59.tmp
 
@@ -832,7 +833,7 @@ test60: $(PROG) test60.ref
        echo foo unix - n n - 0 other >> master.cf
        echo ' -o always_bcc=bar' >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Fhc. >test60.tmp 2>&1 || true
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Fhc. >test60.tmp 2>&1 || true
        diff test60.ref test60.tmp
        rm -f main.cf master.cf test60.tmp
 
@@ -842,7 +843,7 @@ test61: $(PROG) test61.ref
        echo foo unix - n n - 0 other >> master.cf
        echo ' -o always_bcc=bar' >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Phc. >test61.tmp 2>&1 || true
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -Phc. >test61.tmp 2>&1 || true
        diff test61.ref test61.tmp
        rm -f main.cf master.cf test61.tmp
 
@@ -852,7 +853,7 @@ test62: $(PROG) test62.ref
        echo foo unix - n n - 0 other >> master.cf
        echo ' -o always_bcc=bar' >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -FHc. >test62.tmp 2>&1 || true
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -FHc. >test62.tmp 2>&1 || true
        diff test62.ref test62.tmp
        rm -f main.cf master.cf test62.tmp
 
@@ -862,7 +863,7 @@ test63: $(PROG) test63.ref
        echo foo unix - n n - 0 other >> master.cf
        echo ' -o always_bcc=bar' >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -PHc. >test63.tmp 2>&1 || true
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -PHc. >test63.tmp 2>&1 || true
        diff test63.ref test63.tmp
        rm -f main.cf master.cf test63.tmp
 
@@ -873,7 +874,7 @@ test64: $(PROG) test64.ref
        touch main.cf master.cf
        echo 'relayhost = relay-from-main.cf' >> main.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c. relayhost >test64.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c. relayhost >test64.tmp 2>&1
        diff test64.ref test64.tmp
        rm -f main.cf master.cf test64.tmp
 
@@ -884,7 +885,7 @@ test65: $(PROG) test65.ref
        touch main.cf master.cf
        echo 'relayhost = relay-from-main.cf' >> main.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c. -o relayhost=relay-from-cmd-line relayhost >test65.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c. -o relayhost=relay-from-cmd-line relayhost >test65.tmp 2>&1
        diff test65.ref test65.tmp
        rm -f main.cf master.cf test65.tmp
 
@@ -900,7 +901,7 @@ test66: $(PROG) test66.ref
        echo " " memcache:`pwd`/test66.cf >> main.cf
        echo junk = junk >> test66.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c. 2>test66.tmp >/dev/null
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c. 2>test66.tmp >/dev/null
        sed "s;PWD;`pwd`;" test66.ref | diff - test66.tmp
        rm -f main.cf master.cf test66.tmp test66.cf
 
@@ -916,7 +917,7 @@ test67: $(PROG) test67.ref
        echo ' -o test2_process_name=$$process_name' >> master.cf
        echo ' -o test2_service_name=$$service_name' >> master.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -xMfc. >test67.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -xMfc. >test67.tmp 2>&1
        diff test67.ref test67.tmp
        rm -f main.cf master.cf test67.tmp
 
@@ -931,7 +932,7 @@ test68: $(PROG) test68.ref
        echo " " memcache:`pwd`/test68.cf >> main.cf
        echo junk = junk >> test68.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c. 2>test68.tmp >/dev/null
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -c. 2>test68.tmp >/dev/null
        sed "s;PWD;`pwd`;" test68.ref | diff - test68.tmp
        rm -f main.cf master.cf test68.tmp test68.cf
 
@@ -945,7 +946,7 @@ test69:     $(PROG) test69.ref
        echo ' -o body_checks=$$ldap/test69.cf' >> master.cf
        echo junk = junk >> test69.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test69.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test69.tmp 2>&1
        sed "s;PWD;`pwd`;" test69.ref | diff - test69.tmp
        rm -f main.cf master.cf test69.tmp test69.cf
 
@@ -961,7 +962,7 @@ test70:     $(PROG) test70.ref
        echo "used_server_host = 127.0.0.1"  >>main.cf
        echo "unused_server_host = 127.0.0.1"  >>main.cf
        touch -t 197101010000 main.cf
-       $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test70.tmp 2>&1
+       $(HTABLE_FIX) $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -nc . >test70.tmp 2>&1
        diff test70.ref test70.tmp
        rm -f main.cf master.cf test70.tmp test70.cf
 
index 49af249a357028ea9cef4ccaa2b82521ab9685ff..ff25b0bd8de831a423abf6aa96e422e6f6140c88 100644 (file)
@@ -1,3 +1,3 @@
 config_directory = .
-./postconf: warning: ./main.cf: unused parameter: restriction_classes=foo bar
 ./postconf: warning: ./main.cf: unused parameter: foo=yes
+./postconf: warning: ./main.cf: unused parameter: restriction_classes=foo bar
index d44e38dcbc32894f57dfc3ec73e894751b561f50..ce872f5537ca3f412a5fcab4b6650ae1833a1a5f 100644 (file)
@@ -1,16 +1,16 @@
 config_directory = .
+./postconf: warning: ./main.cf: unused parameter: sqlitefoo_domain=bar
+./postconf: warning: ./main.cf: unused parameter: mysqlfoo_domain=bar
 ./postconf: warning: ./main.cf: unused parameter: sqlitexx=proxy:sqlite:sqlitefoo
 ./postconf: warning: ./main.cf: unused parameter: pgsqlxx=proxy:pgsql:pgsqlfoo
+./postconf: warning: ./main.cf: unused parameter: pgsqlfoo_domainx=bar
+./postconf: warning: ./main.cf: unused parameter: memcachexx=proxy:memcache:memcachefoo
+./postconf: warning: ./main.cf: unused parameter: ldapfoo_domainx=bar
 ./postconf: warning: ./main.cf: unused parameter: ldapfoo_domain=bar
 ./postconf: warning: ./main.cf: unused parameter: memcachefoo_domainx=bar
 ./postconf: warning: ./main.cf: unused parameter: sqlitefoo_domainx=bar
-./postconf: warning: ./main.cf: unused parameter: sqlitefoo_domain=bar
-./postconf: warning: ./main.cf: unused parameter: memcachexx=proxy:memcache:memcachefoo
-./postconf: warning: ./main.cf: unused parameter: mysqlxx=proxy:mysql:mysqlfoo
 ./postconf: warning: ./main.cf: unused parameter: ldapxx=proxy:ldap:ldapfoo
-./postconf: warning: ./main.cf: unused parameter: ldapfoo_domainx=bar
 ./postconf: warning: ./main.cf: unused parameter: memcachefoo_domain=bar
-./postconf: warning: ./main.cf: unused parameter: pgsqlfoo_domainx=bar
+./postconf: warning: ./main.cf: unused parameter: mysqlxx=proxy:mysql:mysqlfoo
 ./postconf: warning: ./main.cf: unused parameter: mysqlfoo_domainx=bar
-./postconf: warning: ./main.cf: unused parameter: mysqlfoo_domain=bar
 ./postconf: warning: ./main.cf: unused parameter: pgsqlfoo_domain=bar
index f8200d40146be1e5b3619d2d633749f76419a83d..852d309ee2a57cd61448f855d2db7250f1567f32 100644 (file)
@@ -3,16 +3,16 @@ bar        unix  -       n       n       -       0       other
     -o xxx=yyy
     -o aaa=bbb
 baz        unix  -       n       n       -       0       other
-./postconf: warning: ./master.cf: unused parameter: aaa=bbb
 ./postconf: warning: ./master.cf: unused parameter: xxx=yyy
+./postconf: warning: ./master.cf: unused parameter: aaa=bbb
 foo        unix  -       n       n       -       0       other
 bar        unix  -       n       n       -       0       other
     -o xxx=YYY
     -o aaa=BBB
 baz        unix  -       n       n       -       0       other
-./postconf: warning: ./master.cf: unused parameter: aaa=BBB
 ./postconf: warning: ./master.cf: unused parameter: xxx=YYY
+./postconf: warning: ./master.cf: unused parameter: aaa=BBB
 bar/unix/aaa = BBB
 bar/unix/xxx = YYY
-./postconf: warning: ./master.cf: unused parameter: aaa=BBB
 ./postconf: warning: ./master.cf: unused parameter: xxx=YYY
+./postconf: warning: ./master.cf: unused parameter: aaa=BBB
index 80676f350b8a198732de7508a49b5dfb36b94cc1..98981183a15d9d1a7ff6ed6d614b2393037f0a46 100644 (file)
@@ -3,12 +3,12 @@ bar        unix  -       n       n       -       0       other
     -o xxx=yyy
     -o aaa=bbb
 baz        unix  -       n       n       -       0       other
-./postconf: warning: ./master.cf: unused parameter: aaa=bbb
 ./postconf: warning: ./master.cf: unused parameter: xxx=yyy
+./postconf: warning: ./master.cf: unused parameter: aaa=bbb
 bar/unix/aaa = bbb
 bar/unix/xxx = yyy
-./postconf: warning: ./master.cf: unused parameter: aaa=bbb
 ./postconf: warning: ./master.cf: unused parameter: xxx=yyy
+./postconf: warning: ./master.cf: unused parameter: aaa=bbb
 foo        unix  -       n       n       -       0       other
 bar        unix  -       n       n       -       0       other
 baz        unix  -       n       n       -       0       other
index 362fd167a887177c4afb86c34d06af4d6e2cd066..9bb13926e616a373199c0f5c1f54eb7b22e202c3 100644 (file)
@@ -6,5 +6,5 @@ config_directory = .
 t1 = Postfix 2.11 compatible
 x = x-value
 y = y-value
-./postconf: warning: ./main.cf: unused parameter: t2=$t1
 ./postconf: warning: ./main.cf: unused parameter: foo=$bar$baz
+./postconf: warning: ./main.cf: unused parameter: t2=$t1
index 1e74c4a2e2f33edd336d484e2133d4226b88d462..ac24a4d31b3d5f2f6af99a7761c664c733d34ed4 100644 (file)
@@ -4,5 +4,5 @@ config_directory = .
 mydestination = foo bar pipemap:{ldap:xxx, memcache:yy}x randmap:{xx
 xxx_domain = foo
 yy_backup = bbb
-./postconf: warning: ./main.cf: unused parameter: yy_bogus=bbb
 ./postconf: warning: ./main.cf: unused parameter: xxx_bogus=foo
+./postconf: warning: ./main.cf: unused parameter: yy_bogus=bbb
index 03def6f4600a5d76e45ad337de841219373126c0..1fd053856cdc0718509ba0afc2b0b4370d4a409a 100644 (file)
@@ -4,7 +4,7 @@ smtp       inet  n       -       n       -       -       smtpd
 smtp       unix  n       -       n       -       -       smtp
     -o test2_process_name=smtp
     -o test2_service_name=smtp
-./postconf: warning: ./master.cf: unused parameter: test1_process_name=$process_name
 ./postconf: warning: ./master.cf: unused parameter: test1_service_name=$service_name
+./postconf: warning: ./master.cf: unused parameter: test1_process_name=$process_name
 ./postconf: warning: ./master.cf: unused parameter: test2_process_name=$process_name
 ./postconf: warning: ./master.cf: unused parameter: test2_service_name=$service_name
index bac724748fc52935529c7b3f427d7e0c27c6535e..925f98ffa295668d6d228ac80f4f9008114a090e 100644 (file)
@@ -63,7 +63,9 @@ proxymap.o: ../../include/argv.h
 proxymap.o: ../../include/attr.h
 proxymap.o: ../../include/check_arg.h
 proxymap.o: ../../include/dict.h
+proxymap.o: ../../include/dict_pipe.h
 proxymap.o: ../../include/dict_proxy.h
+proxymap.o: ../../include/dict_union.h
 proxymap.o: ../../include/htable.h
 proxymap.o: ../../include/iostuff.h
 proxymap.o: ../../include/mail_conf.h
index bf7aebb20354df3b13196d9bf0e832ad7afd27e7..f8019f827aa56e02ce7ba66606e8310ed79d9bab 100644 (file)
 /*     IBM T.J. Watson Research
 /*     P.O. Box 704
 /*     Yorktown Heights, NY 10598, USA
+/*
+/*     Wietse Venema
+/*     Google, Inc.
+/*     111 8th Avenue
+/*     New York, NY 10011, USA
 /*--*/
 
 /* System library. */
index a968c83446c8ce920aa382721f4e09a4d8f3adc8..ed58180f6280169967074f7953e35b9a4883b092 100644 (file)
@@ -184,6 +184,8 @@ static SMTP_SESSION *smtp_connect_addr(SMTP_ITERATOR *iter, DSN_BUF *why,
     int     sock;
     char   *bind_addr;
     char   *bind_var;
+    char   *saved_bind_addr = 0;
+    char   *tail;
 
     dsb_reset(why);                            /* Paranoia */
 
@@ -204,6 +206,8 @@ static SMTP_SESSION *smtp_connect_addr(SMTP_ITERATOR *iter, DSN_BUF *why,
        msg_fatal("%s: socket: %m", myname);
 
 #define RETURN_EARLY() do { \
+       if (saved_bind_addr) \
+           myfree(saved_bind_addr); \
        (void) close(sock); \
        return (0); \
     } while (0)
@@ -230,6 +234,13 @@ static SMTP_SESSION *smtp_connect_addr(SMTP_ITERATOR *iter, DSN_BUF *why,
        int     aierr;
        struct addrinfo *res0;
 
+       if (*bind_addr == '[') {
+           saved_bind_addr = mystrdup(bind_addr + 1);
+           if ((tail = split_at(saved_bind_addr, ']')) == 0 || *tail)
+               msg_fatal("%s: malformed %s parameter: %s",
+                         myname, bind_var, bind_addr);
+           bind_addr = saved_bind_addr;
+       }
        if ((aierr = hostaddr_to_sockaddr(bind_addr, (char *) 0, 0, &res0)) != 0)
            msg_fatal("%s: bad %s parameter: %s: %s",
                      myname, bind_var, bind_addr, MAI_STRERROR(aierr));
@@ -242,6 +253,8 @@ static SMTP_SESSION *smtp_connect_addr(SMTP_ITERATOR *iter, DSN_BUF *why,
            }
        } else if (msg_verbose)
            msg_info("%s: bind %s", myname, bind_addr);
+       if (saved_bind_addr)
+           myfree(saved_bind_addr);
        freeaddrinfo(res0);
     }
 
index 5b211b58a08797af30287f73237b205c00cef6d8..3c4736a1ddfda73b82f616022557e9092db4a79a 100644 (file)
@@ -142,7 +142,7 @@ TESTPROG= dict_open dup2_pass_on_exec events exec_command fifo_open \
        vbuf_print split_qnameval vstream msg_logger byte_mask \
        known_tcp_ports dict_stream find_inet
 PLUGIN_MAP_SO = $(LIB_PREFIX)pcre$(LIB_SUFFIX)
-
+HTABLE_FIX = NORANDOMIZE=1
 LIB_DIR        = ../../lib
 INC_DIR        = ../../include
 
@@ -631,12 +631,12 @@ base64_code_test: base64_code
        $(SHLIB_ENV) ${VALGRIND} ./base64_code
 
 attr_scan64_test: attr_print64 attr_scan64 attr_scan64.ref
-       ($(SHLIB_ENV) ${VALGRIND} ./attr_print64 2>&3 | (sleep 1;  $(SHLIB_ENV) ./attr_scan64)) >attr_scan64.tmp 2>&1 3>&1
+       ($(HTABLE_FIX) $(SHLIB_ENV) ${VALGRIND} ./attr_print64 2>&3 | (sleep 1; $(HTABLE_FIX) $(SHLIB_ENV) ./attr_scan64)) >attr_scan64.tmp 2>&1 3>&1
        diff attr_scan64.ref attr_scan64.tmp
        rm -f attr_scan64.tmp
 
 attr_scan0_test: attr_print0 attr_scan0 attr_scan0.ref
-       ($(SHLIB_ENV) ${VALGRIND} ./attr_print0 2>&3 | (sleep 1;  $(SHLIB_ENV) ./attr_scan0)) >attr_scan0.tmp 2>&1 3>&1
+       ($(HTABLE_FIX) $(SHLIB_ENV) ${VALGRIND} ./attr_print0 2>&3 | (sleep 1; $(HTABLE_FIX) $(SHLIB_ENV) ./attr_scan0)) >attr_scan0.tmp 2>&1 3>&1
        diff attr_scan0.ref attr_scan0.tmp
        rm -f attr_scan0.tmp
 
@@ -724,7 +724,7 @@ host_port_test: host_port host_port.in host_port.ref
        rm -f host_port.tmp
 
 attr_scan_plain_test: attr_print_plain attr_scan_plain attr_scan_plain.ref
-       ($(SHLIB_ENV) ${VALGRIND} ./attr_print_plain 2>&3 | (sleep 1;  $(SHLIB_ENV) ./attr_scan_plain)) >attr_scan_plain.tmp 2>&1 3>&1
+       ($(HTABLE_FIX) $(SHLIB_ENV) ${VALGRIND} ./attr_print_plain 2>&3 | (sleep 1; $(HTABLE_FIX) $(SHLIB_ENV) ./attr_scan_plain)) >attr_scan_plain.tmp 2>&1 3>&1
        diff attr_scan_plain.ref attr_scan_plain.tmp
        rm -f attr_scan_plain.tmp
 
index 2f9dabd3e19e1ffba23fca989e6c627dee3e04a5..9842032672c6034b76d6347bb3430419c435265e 100644 (file)
 #include <sys/time.h>
 #include <time.h>
 #include <stdint.h>
+#include <stdlib.h>
 #include <fcntl.h>
 #include <unistd.h>
 
@@ -166,7 +167,7 @@ static size_t htable_seed(void)
     if ((fd = open("/dev/urandom", O_RDONLY)) > 0) {
        count = read(fd, &result, sizeof(result));
        (void) close(fd);
-       if (count == sizeof(result))
+       if (count == sizeof(result) && result != 0)
            return (result);
     }
 
@@ -223,15 +224,11 @@ static size_t htable_hash(const char *s, size_t size)
     /*
      * Initialize.
      */
-    if (seed == 0 && randomize) {
+    while (seed == 0 && randomize) {
        if (getenv("NORANDOMIZE"))
            randomize = 0;
        else
            seed = htable_seed();
-#if 0
-       if (msg_verbose)
-           msg_info("htable_hash: seed=0x%lx", (long) seed);
-#endif
     }
 
     /*
@@ -242,7 +239,7 @@ static size_t htable_hash(const char *s, size_t size)
     h = seed;
     while (*s) {
        g = h & 0xf0000000;
-       h = (h << 4U) ^ (((g >> 28U) + 1) * *(unsigned const char *) s++);
+       h = (h << 4U) ^ (((g >> 28U) + 1) * (*(unsigned const char *) s++) + 1);
     }
     return (h % size);
 }