mirror of
https://github.com/vdukhovni/postfix
synced 2025-08-29 21:27:57 +00:00
postfix-2.3-20050313
This commit is contained in:
parent
e52a07aa65
commit
c4c5776091
@ -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?
|
||||
|
@ -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 \
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -74,12 +74,13 @@
|
||||
/* 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.
|
||||
* 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.
|
||||
*/
|
||||
seq_status = dict_seq(cp->db, first_next, &member, &value);
|
||||
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 {
|
||||
}
|
||||
|
||||
/*
|
||||
* Otherwise, clean up if this is not the first iteration.
|
||||
*/
|
||||
else {
|
||||
if (cp->saved_cursor)
|
||||
myfree(cp->saved_cursor);
|
||||
cp->saved_cursor = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Did we find a first or next database entry?
|
||||
* 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 (seq_status != 0)
|
||||
return (0); /* End of list reached */
|
||||
|
||||
/*
|
||||
* Safety against client requests to delete the current first/next entry.
|
||||
*/
|
||||
cp->saved_cursor = mystrdup(member);
|
||||
|
||||
/*
|
||||
* Activate the passivated cache entry and check the version and time
|
||||
* stamp information. Schedule it for deletion if it is bad or too old.
|
||||
*/
|
||||
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 */
|
||||
|
@ -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 *);
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user