]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.3-20050313
authorWietse Venema <wietse@porcupine.org>
Sun, 13 Mar 2005 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:30:52 +0000 (06:30 +0000)
50 files changed:
postfix/HISTORY
postfix/Makefile.in
postfix/README_FILES/INSTALL
postfix/html/INSTALL.html
postfix/proto/INSTALL.html
postfix/src/anvil/Makefile.in
postfix/src/bounce/Makefile.in
postfix/src/cleanup/Makefile.in
postfix/src/discard/Makefile.in
postfix/src/dns/Makefile.in
postfix/src/error/Makefile.in
postfix/src/flush/Makefile.in
postfix/src/fsstone/Makefile.in
postfix/src/global/Makefile.in
postfix/src/global/db_common.c
postfix/src/global/mail_version.h
postfix/src/lmtp/Makefile.in
postfix/src/local/Makefile.in
postfix/src/master/Makefile.in
postfix/src/oqmgr/Makefile.in
postfix/src/pickup/Makefile.in
postfix/src/pipe/Makefile.in
postfix/src/postalias/Makefile.in
postfix/src/postcat/Makefile.in
postfix/src/postconf/Makefile.in
postfix/src/postdrop/Makefile.in
postfix/src/postfix/Makefile.in
postfix/src/postkick/Makefile.in
postfix/src/postlock/Makefile.in
postfix/src/postlog/Makefile.in
postfix/src/postmap/Makefile.in
postfix/src/postqueue/Makefile.in
postfix/src/postsuper/Makefile.in
postfix/src/proxymap/Makefile.in
postfix/src/qmgr/Makefile.in
postfix/src/qmqpd/Makefile.in
postfix/src/scache/Makefile.in
postfix/src/sendmail/Makefile.in
postfix/src/showq/Makefile.in
postfix/src/smtp/Makefile.in
postfix/src/smtpd/Makefile.in
postfix/src/smtpstone/Makefile.in
postfix/src/spawn/Makefile.in
postfix/src/tls/Makefile.in
postfix/src/tls/tls_scache.c
postfix/src/tls/tls_scache.h
postfix/src/trivial-rewrite/Makefile.in
postfix/src/util/Makefile.in
postfix/src/verify/Makefile.in
postfix/src/virtual/Makefile.in

index 72120d6b16a58965f663f708c7bbe5f4bceeabd4..acd8a770398b52eacc6647f786ca3fdf9174ef31 100644 (file)
@@ -10457,6 +10457,24 @@ Apologies for any names omitted.
        is treated as its own MX host; there is no meaningful
        equivalent for NS access control. File: smtpd/smtpd_check.c.
 
+20050310
+
+       Bugfix: the AIX and SUN compilers rightfully complained
+       about non-portable code in the "new" LDAP/SQL client. File:
+       global/db_common.c.
+
+       Workaround: some systems no longer recognize "tail +2" as
+       valid command syntax. Instead they require "improved" syntax
+       that is not valid on several other systems that Postfix
+       builds on.  So we have to stop using the tail command.
+       Files: Makefile.in, src/*/Makefile.in.
+
+20050312
+
+       Bugfix: the TLS session cache cleaning code didn't always
+       delete the right entry. Problem found by Victor Duchovni,
+       more problems found by Wietse. File: tls/tls_scache.c.
+
 Open problems:
 
        Med: disable header address rewriting after XCLIENT?
index 22b3fa19dd66f1a3028b058601522ad913e457c7..fde9ca2a25fd885ddfa9d8129e9f19bcf98ec899 100644 (file)
@@ -20,7 +20,7 @@ makefiles Makefiles:
         (set -e; echo "[$$i]"; cd $$i; rm -f Makefile; \
         $(MAKE) -f Makefile.in Makefile MAKELEVEL=) || exit 1; \
        done;
-       rm -f Makefile; (tail +2 conf/makedefs.out; cat Makefile.in) >Makefile
+       rm -f Makefile; (cat conf/makedefs.out Makefile.in) >Makefile
 
 update printfck tests:
        set -e; for i in $(DIRS); do \
index 94bea91962687f5041f2b7187a176ecd4257ea1a..202ed4d463e4145c76eb6d0edaef7228ce6f97c9 100644 (file)
@@ -67,7 +67,7 @@ path.
     % export MANPATH; MANPATH="`pwd`/man:$MANPATH"
     % setenv MANPATH "`pwd`/man:$MANPATH"
 
-Of particular interest is the postconf(5) manual page that lists all the 300+
+Of particular interest is the postconf(5) manual page that lists all the 400+
 configuration parameters. The HTML version of this text makes it easy to
 navigate around.
 
index 185fb37b6494a83a48c1765fad0630640c293f46..8d82a147f51722cde0d6e70eb24f1f3a6045cd9f 100644 (file)
@@ -126,7 +126,7 @@ be sure to use an absolute path.  </p>
 </blockquote>
 
 <p> Of particular interest is the <a href="postconf.5.html">postconf(5)</a> manual page that
-lists all the 300+ configuration parameters. The HTML version of
+lists all the 400+ configuration parameters. The HTML version of
 this text makes it easy to navigate around.  </p>
 
 <p> All Postfix source files have their own built-in manual page.
index fe706d2cf4b221b4c6710cd9e89a31f458a12dc8..2c21927e24a0241f9a0596d3cc6cd6b505ae4cfb 100644 (file)
@@ -126,7 +126,7 @@ be sure to use an absolute path.  </p>
 </blockquote>
 
 <p> Of particular interest is the postconf(5) manual page that
-lists all the 300+ configuration parameters. The HTML version of
+lists all the 400+ configuration parameters. The HTML version of
 this text makes it easy to navigate around.  </p>
 
 <p> All Postfix source files have their own built-in manual page.
index 911e49ef319163c982a5a82188e961402b785f39..5e4035fb1bfe790fc4b01e20fbba71dc807dbfa1 100644 (file)
@@ -16,7 +16,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 64c4c4b5cfd8fd7dbfb76da3a73e50307c106006..7c802a6da8015167dca3849f9226ad8ed81ce18e 100644 (file)
@@ -20,7 +20,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index d2d4025bb63c01e1e7ac1ac0732b690f7bf04deb..233baab1677a4d314853a18bfb7f4df0bd1b4d3b 100644 (file)
@@ -24,7 +24,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index d59a3cf51a928c74d2d8c339b53ccdbdc7e00da1..9f87480a1144bfa4e9268fd454985be4635f4a23 100644 (file)
@@ -16,7 +16,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 4ce89ec9481be759384719c2d0c121ba845ae9f5..d18adf4507a140b6d25e6388e5bd39482e8cc651 100644 (file)
@@ -19,7 +19,7 @@ INC_DIR       = ../../include
 all: $(LIB)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 166f7084d59971ddefe7b148beb7f443de0d0c8f..8bacb92b9d47c51f0ba43e67efa14f20ce45a12d 100644 (file)
@@ -16,7 +16,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 2092d48e5e34123ed11aa998fdc0543df0d6e1eb..21603b9e885e0e1d8f1342d65620b6da19f06395 100644 (file)
@@ -16,7 +16,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index a7f491a62bf3daa798136b65a6a487a71e99f847..a04617a03a98759bc1a00ec288e4948e5233a8ee 100644 (file)
@@ -15,7 +15,7 @@ LIBS  = ../../lib/libglobal.a ../../lib/libutil.a
 all:   $(PROG)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 fsstone: fsstone.o $(LIBS)
        $(CC) $(CFLAGS) -o $@ fsstone.o $(LIBS) $(SYSLIBS)
index 1ff165321835086fa74a0dfbc350da0b37cb75b5..e15cbca8be3b09d25604676bc0ec0b6aa32e9f1d 100644 (file)
@@ -98,7 +98,7 @@ MAKES =
 all: $(LIB)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index c694caa1a2d78e9a3267e539a11ab9d06a94432c..1522711d92ffd14a56e23962d1208579d0166842 100644 (file)
@@ -300,8 +300,12 @@ int db_common_expand(void *ctxArg, const char *format, const char *value,
     if (VSTRING_LEN(result) > 0)
        VSTRING_ADDCH(result, ',');
 
-#define QUOTE_VAL(d, q, v, buf) \
-    (q ? q(d, v, buf) : vstring_strcat(buf, v))
+#define QUOTE_VAL(d, q, v, buf) do { \
+       if (q) \
+           q(d, v, buf); \
+       else \
+           vstring_strcat(buf, v); \
+    } while (0)
 
     /*
      * Replace all instances of %s with the address to look up. Replace
index a1766cde0db7c9055e8e4f5a9f87d26fac805e4f..2c0bc7fb7c78fe2c113d8baf19f19a5185ebbf97 100644 (file)
@@ -20,7 +20,7 @@
   * Patches change the patchlevel and the release date. Snapshots change the
   * release date only.
   */
-#define MAIL_RELEASE_DATE      "20050309"
+#define MAIL_RELEASE_DATE      "20050313"
 #define MAIL_VERSION_NUMBER    "2.3"
 
 #define VAR_MAIL_VERSION       "mail_version"
index 416ce71ed8dc38cb1eef52cd0ac5798cc874d6ca..24aad7250e128f0b1a533f72650a0ff7455ca9a2 100644 (file)
@@ -20,7 +20,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 36feee0d1a5d988c2b779a6a85c4a99dc15ae427..fb439cde6a6720fbdd4fd9893e662b3fd19e48d3 100644 (file)
@@ -22,7 +22,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 1b4ba914543f09b6e80927b99031f1e59d0304c0..d21f674c8a034d93c921ea79f91137914e1d079f 100644 (file)
@@ -25,7 +25,7 @@ BIN_DIR       = ../../libexec
 all:   $(PROG) $(LIB)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
index 2a78eba16add858cfb374c85792f3795ed6a535b..509875b755b3974bbb38e37dc6f909eeaf57e372 100644 (file)
@@ -20,7 +20,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 57282f9acf6dfc57d143d805305c4e4d111e0fb2..5e74360295e77c4aec44cf9e651c7ea22e971745 100644 (file)
@@ -16,7 +16,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index affdcd9e5991bcb2cb8a3cc9601dd9894248dab4..6a676ed8f4fb98f2f672c91fb9ba7079d5c1c34a 100644 (file)
@@ -16,7 +16,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 217e98e4734d31824d036e0b989de37d13d4845a..2e414ad780eed6ff1e35e875c4b57a74c26c3c3f 100644 (file)
@@ -16,7 +16,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 update: ../../bin/$(PROG)
 
index 2d9fd3464aefa44300609fa2e99e0dd012c4c6bd..4cce48332d868ba5cfdef7439e30ee276fc73730 100644 (file)
@@ -16,7 +16,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index b7f93e86ec35cfec5cff825370aeee660f3a1abb..069f951b088e2ef58f808813a173544927b77114 100644 (file)
@@ -26,7 +26,7 @@ $(PROG): $(OBJS) $(LIBS)
         ./$(PROG) -d) |egrep -v '^(myhostname|mydomain|mynetworks) ' >$@
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 06f79c548a6299f567f79c5e67b172a33219b310..6ddcf835edbb6e24272e9b3e6546ee16371e2c94 100644 (file)
@@ -16,7 +16,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 31615b51bb0e7e0e7bf62954045d66af00e6d220..dad1be2c3059eac8dc3b154b66e424ecf08d2800 100644 (file)
@@ -17,7 +17,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index a5cc48b047fe17a1afb244847cc4cd403a04f228..568edf654eee159b1a00f05638e7e19c29595a28 100644 (file)
@@ -16,7 +16,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 071fe26aa8a09bc970b7077f3326775e4c9f867e..48853df79196876144f92e8ea5728a760c7f54ef 100644 (file)
@@ -16,7 +16,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 586aa61097adb434882a1ceaaaa68716b8d0c903..64f32b5d4ad9334eb01db96586d07efcd5c0914f 100644 (file)
@@ -17,7 +17,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 3f0798af68d1ea9e3c998743810cdba7c9971813..7761292e48aed532a55bfaa22abb21051457647a 100644 (file)
@@ -16,7 +16,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 update: ../../bin/$(PROG)
 
index 98ba568f74bfec485c16855aebcd9a62efb30439..f3a523b5e62367bc5f68b3479a88df23033423bb 100644 (file)
@@ -16,7 +16,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 1930af83d0f614ccae34b4dc2274bdafdf7aa231..df0dfa08ab0013dd218adfa298f7e9142b6abf04 100644 (file)
@@ -16,7 +16,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 96c3b65b03c54cd8ca425ae618e2a9a493c71403..deb28075c4c7aeaf0cfab5b68e66652f845ca57b 100644 (file)
@@ -16,7 +16,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 0a7e2caadcedeb1da41b3811021d713a453c1c4c..91f19f17690a8b6c34ac6273ab5d96445af681ba 100644 (file)
@@ -22,7 +22,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index e1b3250a2ed593b2414743a41ad2907805642c88..b610438404ce76787ed7df12e3857a5f79057b00 100644 (file)
@@ -16,7 +16,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 4d54015b43f0b690a834cbd9d1d3d8403f409d41..9ce8504943dbc88181fa833574844b13ab5b8f3b 100644 (file)
@@ -16,7 +16,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 751db318a679d9d42ae961edeb74bc7716b5233d..364e6a15aedfa1afd897127ce027329e4475e197 100644 (file)
@@ -16,7 +16,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 66ed58fdc9fb762d418816b5c12d146e50946789..285d77adc0e953a6b9557639d3bc174349fddda9 100644 (file)
@@ -16,7 +16,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 79b8aeead41e12e492fdd77cc9fc87bbe8e809c8..16cae7bd2d9c38df638aae7a39d70d0272e02b02 100644 (file)
@@ -21,7 +21,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index ea4aba91307afc25d105491785978e9d489cb350..88a8dbe9b06a759d1f19b409010506ab8b520b00 100644 (file)
@@ -22,7 +22,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 7091a797a48aea310314786ff53effd60a05c55c..e05b1bc02971fd4a175058830d925d6201b710ac 100644 (file)
@@ -15,7 +15,7 @@ LIBS  = ../../lib/libglobal.a ../../lib/libutil.a
 all:   $(PROG)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 smtp-sink: smtp-sink.o $(LIBS)
        $(CC) $(CFLAGS) -o $@ smtp-sink.o $(LIBS) $(SYSLIBS)
index 06b0d8234e596e40458f018570194f7cfbc3763e..a755e3610b233cd2e8047648e91f7640e8ae6642 100644 (file)
@@ -16,7 +16,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 0ef0419d42ed9a59fb9ff20c91cd0531e99bd6cf..d524015fa42dc3d6570f96fef155ce576abcb7d5 100644 (file)
@@ -25,7 +25,7 @@ MAKES =
 all: $(LIB)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index e3144e865459dc616de27d9517f40c092b8bf66c..c00789cc37641f2e900790baaf442a4c970a0ac9 100644 (file)
 /*     tls_scache_update() updates the specified TLS session cache
 /*     with the specified session information.
 /*
-/*     tls_scache_sequence() iterates over the specified TLS
-/*     session cache and either returns the first or next entry
-/*     that matches the session timeout, OpenSSL version and flags
-/*     restrictions, or returns no data.  Entries that don't
-/*     satisfy the requirements
-/*     are silently deleted.  Specify TLS_SCACHE_SEQUENCE_NOTHING
+/*     tls_scache_sequence() iterates over the specified TLS session
+/*     cache and looks up the first or next entry. If that entry
+/*     matches the session timeout, OpenSSL version and flags
+/*     restrictions, tls_scache_sequence() saves the entry by
+/*     updating the result parameters; otherwise it deletes the
+/*     entry and does not update the result parameters.  Specify
+/*     TLS_SCACHE_SEQUENCE_NOTHING
 /*     as the third and last argument to disable OpenSSL version
 /*     and flags restrictions, and to disable saving of cache
 /*     entry content or cache entry ID information.  This is useful
@@ -450,7 +451,9 @@ int     tls_scache_sequence(TLS_SCACHE *cp, int first_next,
     const char *member;
     const char *value;
     char   *saved_cursor;
-    int     seq_status;
+    int     found_entry;
+    int     keep_entry;
+    char   *saved_member;
 
     /*
      * XXX Deleting entries while enumerating a map can he tricky. Some map
@@ -464,52 +467,63 @@ int     tls_scache_sequence(TLS_SCACHE *cp, int first_next,
      */
 
     /*
-     * Find the first or next database entry.
-     */
-    seq_status = dict_seq(cp->db, first_next, &member, &value);
+     * Find the first or next database entry. Activate the passivated entry
+     * and check the version, time stamp and flags information. Schedule the
+     * entry for deletion if it is bad or too old.
+     * 
+     * Save the member (cache id) so that it will not be clobbered by the
+     * tls_scache_lookup() call below.
+     */
+    found_entry = (dict_seq(cp->db, first_next, &member, &value) == 0);
+    if (found_entry) {
+       keep_entry = tls_scache_decode(cp, member, value, strlen(value),
+                                      openssl_version, flags,
+                                      out_openssl_version,
+                                      out_flags, out_session);
+       if (keep_entry && out_cache_id)
+           *out_cache_id = mystrdup(member);
+       saved_member = mystrdup(member);
+    }
 
     /*
      * Delete behind. This is a no-op if an expired cache entry was updated
-     * in the mean time.
+     * in the mean time. Use the saved lookup criteria so that the "delete
+     * behind" operation works as promised.
      */
-    if (cp->flags & TLS_SCACHE_FLAG_DEL_CURSOR) {
-       cp->flags &= ~TLS_SCACHE_FLAG_DEL_CURSOR;
+    if (cp->flags & TLS_SCACHE_FLAG_DEL_SAVED_CURSOR) {
+       cp->flags &= ~TLS_SCACHE_FLAG_DEL_SAVED_CURSOR;
        saved_cursor = cp->saved_cursor;
        cp->saved_cursor = 0;
-       tls_scache_lookup(cp, saved_cursor, TLS_SCACHE_ANY_OPENSSL_VSN,
-                         TLS_SCACHE_ANY_FLAGS, (long *) 0, (int *) 0,
+       tls_scache_lookup(cp, saved_cursor, cp->saved_openssl_version,
+                         cp->saved_flags, (long *) 0, (int *) 0,
                          (VSTRING *) 0);
        myfree(saved_cursor);
-    } else {
-       if (cp->saved_cursor)
-           myfree(cp->saved_cursor);
-       cp->saved_cursor = 0;
     }
 
     /*
-     * Did we find a first or next database entry?
-     */
-    if (seq_status != 0)
-       return (0);                             /* End of list reached */
-
-    /*
-     * Safety against client requests to delete the current first/next entry.
+     * Otherwise, clean up if this is not the first iteration.
      */
-    cp->saved_cursor = mystrdup(member);
+    else {
+       if (cp->saved_cursor)
+           myfree(cp->saved_cursor);
+       cp->saved_cursor = 0;
+    }
 
     /*
-     * Activate the passivated cache entry and check the version and time
-     * stamp information. Schedule it for deletion if it is bad or too old.
+     * Protect the current first/next entry against explicit or implied
+     * client delete requests, and schedule a bad or expired entry for
+     * deletion. Save the lookup criteria so that the "delete behind"
+     * operation will work as promised.
      */
-    if (tls_scache_decode(cp, member, value, strlen(value), openssl_version,
-                         flags, out_openssl_version, out_flags,
-                         out_session) == 0) {
-       cp->flags |= TLS_SCACHE_FLAG_DEL_CURSOR;
-    } else {
-       if (out_cache_id)
-           *out_cache_id = mystrdup(member);
+    if (found_entry) {
+       cp->saved_cursor = saved_member;
+       if (keep_entry == 0) {
+           cp->flags |= TLS_SCACHE_FLAG_DEL_SAVED_CURSOR;
+           cp->saved_openssl_version = openssl_version;
+           cp->saved_flags = flags;
+       }
     }
-    return (1);
+    return (found_entry);
 }
 
 /* tls_scache_delete - delete session from cache */
index 2c828e9cc35223f279357243705c067193d8233f..2e51d2803bc1c7db700830017604c245fc5fe72a 100644 (file)
@@ -27,9 +27,11 @@ typedef struct {
     int     log_level;                 /* smtp(d)_tls_log_level */
     int     timeout;                   /* smtp(d)_tls_session_cache_timeout */
     char   *saved_cursor;              /* cursor cache ID */
+    long    saved_openssl_version;     /* cursor OpenSSL version */
+    int     saved_flags;               /* cursor lookup flags */
 } TLS_SCACHE;
 
-#define TLS_SCACHE_FLAG_DEL_CURSOR     (1<<0)
+#define TLS_SCACHE_FLAG_DEL_SAVED_CURSOR       (1<<0)
 
 extern TLS_SCACHE *tls_scache_open(const char *, const char *, int, int);
 extern void tls_scache_close(TLS_SCACHE *);
index b2dc22a75f01edd8d361881903a2d63d8346f538..dfe21f6e2e7e39e351a326443f9c7d6ed13ff8b4 100644 (file)
@@ -21,7 +21,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index f27c6d2f8c4c281d251160040b1190b114e74ccb..ea4c68980491e9f261a1d14de4345674580b6b69 100644 (file)
@@ -110,7 +110,7 @@ INC_DIR     = ../../include
 all: $(LIB)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 25e8859ab1525f190470318c1d09ba5ed48c34ad..39215f5435e29857ebccbd83496ee4f78c89185a 100644 (file)
@@ -16,7 +16,7 @@ $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)
 
index 60c562e72c5d0f89c2fba55ac7bf88be267974b1..d0e7bca7d879a381c3409a2e803397a855cd8bf3 100644 (file)
@@ -16,7 +16,7 @@ $(PROG):      $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
 Makefile: Makefile.in
-       (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+       (cat ../../conf/makedefs.out $?) >$@
 
 test:  $(TESTPROG)