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?
(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 \
% 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.
</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.
</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.
$(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)
$(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)
$(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)
$(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)
all: $(LIB)
Makefile: Makefile.in
- (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+ (cat ../../conf/makedefs.out $?) >$@
test: $(TESTPROG)
$(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)
$(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)
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)
all: $(LIB)
Makefile: Makefile.in
- (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+ (cat ../../conf/makedefs.out $?) >$@
test: $(TESTPROG)
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
* 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"
$(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)
$(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)
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)
$(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)
$(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)
$(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)
$(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)
$(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)
./$(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)
$(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)
$(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)
$(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)
$(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)
$(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)
$(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)
$(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)
$(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)
$(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)
$(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)
$(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)
$(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)
$(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)
$(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)
$(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)
$(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)
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)
$(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)
all: $(LIB)
Makefile: Makefile.in
- (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+ (cat ../../conf/makedefs.out $?) >$@
test: $(TESTPROG)
/* 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
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
*/
/*
- * 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 */
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 *);
$(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)
all: $(LIB)
Makefile: Makefile.in
- (echo "# DO NOT EDIT"; tail +2 ../../conf/makedefs.out; cat $?) >$@
+ (cat ../../conf/makedefs.out $?) >$@
test: $(TESTPROG)
$(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)
$(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)