diff --git a/postfix/HISTORY b/postfix/HISTORY
index 2aa23d9d5..dc1eec044 100644
--- a/postfix/HISTORY
+++ b/postfix/HISTORY
@@ -24839,3 +24839,31 @@ Apologies for any names omitted.
agent visible, where it would otherwise have remained
invisible, which would complicate troubleshooting. File:
global/deliver_pass.c.
+
+20200610
+
+ Respectful code: replace 'slave' in internal identifiers
+ and comments, and make the master(5) description more
+ consistent with that in master(8). Postfix does not have a
+ master/slave architecture, and these identifiers and comments
+ were just poorly worded. Files: conf/postmulti-script,
+ html/master.5.html, man/man5/master.5, proto/master,
+ global/dsb_scan.c, global/dsb_scan.h, global/dsn_print.c,
+ global/dsn_print.h, global/msg_stats.h, global/msg_stats_print.c,
+ global/msg_stats_scan.c, global/rcpt_buf.c, global/rcpt_buf.h,
+ global/rcpt_print.c, global/rcpt_print.h, milter/milter.h,
+ milter/milter_macros.c, tls/tls_proxy.h,
+ tls/tls_proxy_client_print.c, tls/tls_proxy_client_scan.c,
+ tls/tls_proxy_context_print.c, tls/tls_proxy_context_scan.c,
+ tls/tls_proxy_server_print.c, tls/tls_proxy_server_scan.c,
+ util/argv_attr.h, util/argv_attr_print.c, util/argv_attr_scan.c,
+ util/attr.h, util/attr_print0.c, util/attr_print64.c,
+ util/attr_print_plain.c, util/attr_scan0.c, util/attr_scan64.c,
+ util/attr_scan_plain.c.
+
+ Bugfix (introduced: Postfix 3.4): in the Postfix SMTP server,
+ the SNI callback reported an error when it was called a
+ second time. This happened after the server-side TLS engine
+ sent a TLSv1.3 HelloRetryRequest (HRR) to a remote SMTP
+ client. Reported by Ján Máté, fixed by Viktor Dukhovni.
+ File: tls/tls_misc.c.
diff --git a/postfix/conf/postmulti-script b/postfix/conf/postmulti-script
index b1aea8e0e..934228d16 100644
--- a/postfix/conf/postmulti-script
+++ b/postfix/conf/postmulti-script
@@ -219,7 +219,7 @@ create|import)
# and drop from alternate_config_directories
#
# XXX: Must happen before set-permissions below, otherwise instance
- # is treated as a non-slave instance by post-install via postfix(1).
+ # is treated as an independent instance by post-install via postfix(1).
#
update_cfdirs del $config_directory || exit 1
@@ -227,7 +227,7 @@ create|import)
# queue_directory and data_directory, ...
#
# XXX: Must happen after instance list updates above, otherwise instance
- # is treated as a non-slave instance by post-install via postfix(1).
+ # is treated as an independent instance by post-install via postfix(1).
#
postfix -c $config_directory set-permissions || exit 1
;;
diff --git a/postfix/html/master.5.html b/postfix/html/master.5.html
index 4e488fc02..4e25297e5 100644
--- a/postfix/html/master.5.html
+++ b/postfix/html/master.5.html
@@ -15,41 +15,41 @@ MASTER(5) MASTER(5)
services that run in the background.
Postfix services are implemented by daemon processes. These run in the
- background under control of the master(8) process. The master.cf con-
- figuration file defines how a client program connects to a service, and
- what daemon program runs when a service is requested. Most daemon pro-
- cesses are short-lived and terminate voluntarily after serving max_use
- clients, or after inactivity for max_idle or more units of time.
+ background, started on-demand by the master(8) process. The master.cf
+ configuration file defines how a client program connects to a service,
+ and what daemon program runs when a service is requested. Most daemon
+ processes are short-lived and terminate voluntarily after serving
+ max_use clients, or after inactivity for max_idle or more units of
+ time.
- All daemons specified here must speak a Postfix-internal protocol. In
- order to execute non-Postfix software use the local(8), pipe(8) or
- spawn(8) services, or run the server under control by inetd(8) or
- equivalent.
+ All daemons specified here must speak a Postfix-internal protocol. In
+ order to execute non-Postfix software use the local(8), pipe(8) or
+ spawn(8) services, or execute the software with inetd(8) or equivalent.
- After changing master.cf you must execute "postfix reload" to reload
+ After changing master.cf you must execute "postfix reload" to reload
the configuration.
SYNTAX
The general format of the master.cf file is as follows:
- o Empty lines and whitespace-only lines are ignored, as are lines
+ o Empty lines and whitespace-only lines are ignored, as are lines
whose first non-whitespace character is a `#'.
- o A logical line starts with non-whitespace text. A line that
+ o A logical line starts with non-whitespace text. A line that
starts with whitespace continues a logical line.
- o Each logical line defines a single Postfix service. Each ser-
- vice is identified by its name and type as described below.
+ o Each logical line defines a single Postfix service. Each ser-
+ vice is identified by its name and type as described below.
When multiple lines specify the same service name and type, only
- the last one is remembered. Otherwise, the order of master.cf
+ the last one is remembered. Otherwise, the order of master.cf
service definitions does not matter.
- Each logical line consists of eight fields separated by whitespace.
- These are described below in the order as they appear in the master.cf
+ Each logical line consists of eight fields separated by whitespace.
+ These are described below in the order as they appear in the master.cf
file.
- Where applicable a field of "-" requests that the built-in default
- value be used. For boolean fields specify "y" or "n" to override the
+ Where applicable a field of "-" requests that the built-in default
+ value be used. For boolean fields specify "y" or "n" to override the
default value.
Service name
@@ -59,70 +59,70 @@ MASTER(5) MASTER(5)
Service type
Specify one of the following service types:
- inet The service listens on a TCP/IP socket and is accessible
+ inet The service listens on a TCP/IP socket and is accessible
via the network.
- The service name is specified as host:port, denoting the
- host and port on which new connections should be
- accepted. The host part (and colon) may be omitted.
- Either host or port may be given in symbolic form (see
- hosts(5) or services(5)) or in numeric form (IP address
+ The service name is specified as host:port, denoting the
+ host and port on which new connections should be
+ accepted. The host part (and colon) may be omitted.
+ Either host or port may be given in symbolic form (see
+ hosts(5) or services(5)) or in numeric form (IP address
or port number). Host information may be enclosed inside
"[]"; this form is necessary only with IPv6 addresses.
- Examples: a service named 127.0.0.1:smtp or ::1:smtp
+ Examples: a service named 127.0.0.1:smtp or ::1:smtp
receives mail via the loopback interface only; and a ser-
- vice named 10025 accepts connections on TCP port 10025
- via all interfaces configured with the inet_interfaces
+ vice named 10025 accepts connections on TCP port 10025
+ via all interfaces configured with the inet_interfaces
parameter.
- Note: with Postfix version 2.2 and later specify
- "inet_interfaces = loopback-only" in main.cf, instead of
- hard-coding loopback IP address information in master.cf
+ Note: with Postfix version 2.2 and later specify
+ "inet_interfaces = loopback-only" in main.cf, instead of
+ hard-coding loopback IP address information in master.cf
or in main.cf.
unix The service listens on a UNIX-domain stream socket and is
accessible for local clients only.
- The service name is a pathname relative to the Postfix
- queue directory (pathname controlled with the
+ The service name is a pathname relative to the Postfix
+ queue directory (pathname controlled with the
queue_directory configuration parameter in main.cf).
- On Solaris 8 and earlier systems the unix type is imple-
+ On Solaris 8 and earlier systems the unix type is imple-
mented with streams sockets.
unix-dgram
- The service listens on a UNIX-domain datagram socket and
+ The service listens on a UNIX-domain datagram socket and
is accessible for local clients only.
- The service name is a pathname relative to the Postfix
- queue directory (pathname controlled with the
- queue_directory configuration parameter in main.cf).
-
- fifo (obsolete)
- The service listens on a FIFO (named pipe) and is acces-
- sible for local clients only.
-
The service name is a pathname relative to the Postfix
queue directory (pathname controlled with the
queue_directory configuration parameter in main.cf).
- pass The service listens on a UNIX-domain stream socket, and
- is accessible to local clients only. It receives one open
- connection (file descriptor passing) per connection
- request.
+ fifo (obsolete)
+ The service listens on a FIFO (named pipe) and is acces-
+ sible for local clients only.
The service name is a pathname relative to the Postfix
queue directory (pathname controlled with the
queue_directory configuration parameter in main.cf).
- On Solaris 8 and earlier systems the pass type is imple-
+ pass The service listens on a UNIX-domain stream socket, and
+ is accessible to local clients only. It receives one open
+ connection (file descriptor passing) per connection
+ request.
+
+ The service name is a pathname relative to the Postfix
+ queue directory (pathname controlled with the
+ queue_directory configuration parameter in main.cf).
+
+ On Solaris 8 and earlier systems the pass type is imple-
mented with streams sockets.
This feature is available as of Postfix version 2.5.
Private (default: y)
- Whether or not access is restricted to the mail system. Inter-
+ Whether or not access is restricted to the mail system. Inter-
net (type inet) services can't be private.
Unprivileged (default: y)
@@ -130,80 +130,80 @@ MASTER(5) MASTER(5)
the Postfix system (the owner name is controlled by the
mail_owner configuration variable in the main.cf file).
- The local(8), pipe(8), spawn(8), and virtual(8) daemons require
+ The local(8), pipe(8), spawn(8), and virtual(8) daemons require
privileges.
Chroot (default: Postfix >= 3.0: n, Postfix <3.0: y)
- Whether or not the service runs chrooted to the mail queue
+ Whether or not the service runs chrooted to the mail queue
directory (pathname is controlled by the queue_directory config-
uration variable in the main.cf file).
- Chroot should not be used with the local(8), pipe(8), spawn(8),
+ Chroot should not be used with the local(8), pipe(8), spawn(8),
and virtual(8) daemons. Although the proxymap(8) server can run
- chrooted, doing so defeats most of the purpose of having that
+ chrooted, doing so defeats most of the purpose of having that
service in the first place.
The files in the examples/chroot-setup subdirectory of the Post-
- fix source show how to set up a Postfix chroot environment on a
- variety of systems. See also BASIC_CONFIGURATION_README for
+ fix source show how to set up a Postfix chroot environment on a
+ variety of systems. See also BASIC_CONFIGURATION_README for
issues related to running daemons chrooted.
Wake up time (default: 0)
Automatically wake up the named service after the specified num-
- ber of seconds. The wake up is implemented by connecting to the
- service and sending a wake up request. A ? at the end of the
- wake-up time field requests that no wake up events be sent
+ ber of seconds. The wake up is implemented by connecting to the
+ service and sending a wake up request. A ? at the end of the
+ wake-up time field requests that no wake up events be sent
before the first time a service is used. Specify 0 for no auto-
matic wake up.
- The pickup(8), qmgr(8) and flush(8) daemons require a wake up
+ The pickup(8), qmgr(8) and flush(8) daemons require a wake up
timer.
Process limit (default: $default_process_limit)
- The maximum number of processes that may execute this service
+ The maximum number of processes that may execute this service
simultaneously. Specify 0 for no process count limit.
- NOTE: Some Postfix services must be configured as a sin-
- gle-process service (for example, qmgr(8)) and some services
- must be configured with no process limit (for example,
+ NOTE: Some Postfix services must be configured as a sin-
+ gle-process service (for example, qmgr(8)) and some services
+ must be configured with no process limit (for example,
cleanup(8)). These limits must not be changed.
Command name + arguments
- The command to be executed. Characters that are special to the
- shell such as ">" or "|" have no special meaning here, and
- quotes cannot be used to protect arguments containing white-
- space. To protect whitespace, use "{" and "}" as described
+ The command to be executed. Characters that are special to the
+ shell such as ">" or "|" have no special meaning here, and
+ quotes cannot be used to protect arguments containing white-
+ space. To protect whitespace, use "{" and "}" as described
below.
- The command name is relative to the Postfix daemon directory
- (pathname is controlled by the daemon_directory configuration
+ The command name is relative to the Postfix daemon directory
+ (pathname is controlled by the daemon_directory configuration
variable).
- The command argument syntax for specific commands is specified
+ The command argument syntax for specific commands is specified
in the respective daemon manual page.
- The following command-line options have the same effect for all
+ The following command-line options have the same effect for all
daemon programs:
- -D Run the daemon under control by the command specified
+ -D Run the daemon under control by the command specified
with the debugger_command variable in the main.cf config-
uration file. See DEBUG_README for hints and tips.
-o { name = value } (long form, Postfix >= 3.0)
-o name=value (short form)
- Override the named main.cf configuration parameter. The
- parameter value can refer to other parameters as $name
- etc., just like in main.cf. See postconf(5) for syntax.
+ Override the named main.cf configuration parameter. The
+ parameter value can refer to other parameters as $name
+ etc., just like in main.cf. See postconf(5) for syntax.
- NOTE 1: With the "long form" shown above, whitespace
- after "{", around "=", and before "}" is ignored, and
+ NOTE 1: With the "long form" shown above, whitespace
+ after "{", around "=", and before "}" is ignored, and
whitespace within the parameter value is preserved.
NOTE 2: with the "short form" shown above, do not specify
- whitespace around the "=" or in parameter values. To
- specify a parameter value that contains whitespace, use
- the long form described above, or use commas instead of
+ whitespace around the "=" or in parameter values. To
+ specify a parameter value that contains whitespace, use
+ the long form described above, or use commas instead of
spaces, or specify the value in main.cf. Example:
/etc/postfix/master.cf:
@@ -214,18 +214,18 @@ MASTER(5) MASTER(5)
submission_xxx_yyy = text with whitespace...
NOTE 3: Over-zealous use of parameter overrides makes the
- Postfix configuration hard to understand and maintain.
- At a certain point, it might be easier to configure mul-
+ Postfix configuration hard to understand and maintain.
+ At a certain point, it might be easier to configure mul-
tiple instances of Postfix, instead of configuring multi-
ple personalities via master.cf.
- -v Increase the verbose logging level. Specify multiple -v
- options to make a Postfix daemon process increasingly
+ -v Increase the verbose logging level. Specify multiple -v
+ options to make a Postfix daemon process increasingly
verbose.
Other command-line arguments
Specify "{" and "}" around command arguments that contain
- whitespace (Postfix 3.0 and later). Whitespace after "{"
+ whitespace (Postfix 3.0 and later). Whitespace after "{"
and before "}" is ignored.
SEE ALSO
diff --git a/postfix/man/man5/master.5 b/postfix/man/man5/master.5
index 008181f84..14e436bb8 100644
--- a/postfix/man/man5/master.5
+++ b/postfix/man/man5/master.5
@@ -13,7 +13,7 @@ The Postfix mail system is implemented by small number of
a larger number of services that run in the background.
Postfix services are implemented by daemon processes. These
-run in the background under control of the \fBmaster\fR(8)
+run in the background, started on\-demand by the \fBmaster\fR(8)
process. The master.cf configuration file defines how a
client program connects to a service, and what daemon
program runs when a service is requested. Most daemon
@@ -24,7 +24,7 @@ serving \fBmax_use\fR clients, or after inactivity for
All daemons specified here must speak a Postfix\-internal
protocol. In order to execute non\-Postfix software use the
\fBlocal\fR(8), \fBpipe\fR(8) or \fBspawn\fR(8) services, or
-run the server under control by \fBinetd\fR(8) or equivalent.
+execute the software with \fBinetd\fR(8) or equivalent.
.PP
After changing master.cf you must execute "\fBpostfix reload\fR"
to reload the configuration.
diff --git a/postfix/proto/master b/postfix/proto/master
index 670b800a1..64fb1211a 100644
--- a/postfix/proto/master
+++ b/postfix/proto/master
@@ -9,7 +9,7 @@
# a larger number of services that run in the background.
#
# Postfix services are implemented by daemon processes. These
-# run in the background under control of the \fBmaster\fR(8)
+# run in the background, started on-demand by the \fBmaster\fR(8)
# process. The master.cf configuration file defines how a
# client program connects to a service, and what daemon
# program runs when a service is requested. Most daemon
@@ -20,7 +20,7 @@
# All daemons specified here must speak a Postfix-internal
# protocol. In order to execute non-Postfix software use the
# \fBlocal\fR(8), \fBpipe\fR(8) or \fBspawn\fR(8) services, or
-# run the server under control by \fBinetd\fR(8) or equivalent.
+# execute the software with \fBinetd\fR(8) or equivalent.
# .PP
# After changing master.cf you must execute "\fBpostfix reload\fR"
# to reload the configuration.
diff --git a/postfix/src/global/dsb_scan.c b/postfix/src/global/dsb_scan.c
index e99c4436b..4d668f1c2 100644
--- a/postfix/src/global/dsb_scan.c
+++ b/postfix/src/global/dsb_scan.c
@@ -7,7 +7,7 @@
/* #include
/*
/* int dsb_scan(scan_fn, stream, flags, ptr)
-/* ATTR_SCAN_MASTER_FN scan_fn;
+/* ATTR_SCAN_COMMON_FN scan_fn;
/* VSTREAM *stream;
/* int flags;
/* void *ptr;
@@ -45,7 +45,7 @@
/* dsb_scan - read DSN_BUF from stream */
-int dsb_scan(ATTR_SCAN_MASTER_FN scan_fn, VSTREAM *fp,
+int dsb_scan(ATTR_SCAN_COMMON_FN scan_fn, VSTREAM *fp,
int flags, void *ptr)
{
DSN_BUF *dsb = (DSN_BUF *) ptr;
diff --git a/postfix/src/global/dsb_scan.h b/postfix/src/global/dsb_scan.h
index 397f86bc3..99485bd8c 100644
--- a/postfix/src/global/dsb_scan.h
+++ b/postfix/src/global/dsb_scan.h
@@ -25,7 +25,7 @@
/*
* External interface.
*/
-extern int dsb_scan(ATTR_SCAN_MASTER_FN, VSTREAM *, int, void *);
+extern int dsb_scan(ATTR_SCAN_COMMON_FN, VSTREAM *, int, void *);
/* LICENSE
/* .ad
diff --git a/postfix/src/global/dsn_print.c b/postfix/src/global/dsn_print.c
index 369804839..26dcb2134 100644
--- a/postfix/src/global/dsn_print.c
+++ b/postfix/src/global/dsn_print.c
@@ -7,7 +7,7 @@
/* #include
/*
/* int dsn_print(print_fn, stream, flags, ptr)
-/* ATTR_PRINT_MASTER_FN print_fn;
+/* ATTR_PRINT_COMMON_FN print_fn;
/* VSTREAM *stream;
/* int flags;
/* void *ptr;
@@ -45,7 +45,7 @@
/* dsn_print - write DSN to stream */
-int dsn_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
+int dsn_print(ATTR_PRINT_COMMON_FN print_fn, VSTREAM *fp,
int flags, void *ptr)
{
DSN *dsn = (DSN *) ptr;
diff --git a/postfix/src/global/dsn_print.h b/postfix/src/global/dsn_print.h
index 4b2c9fa84..3e831debd 100644
--- a/postfix/src/global/dsn_print.h
+++ b/postfix/src/global/dsn_print.h
@@ -25,7 +25,7 @@
/*
* External interface.
*/
-extern int dsn_print(ATTR_PRINT_MASTER_FN, VSTREAM *, int, void *);
+extern int dsn_print(ATTR_PRINT_COMMON_FN, VSTREAM *, int, void *);
/* LICENSE
/* .ad
diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h
index 41ff81483..f04aa4dfd 100644
--- a/postfix/src/global/mail_version.h
+++ b/postfix/src/global/mail_version.h
@@ -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 "20200531"
+#define MAIL_RELEASE_DATE "20200610"
#define MAIL_VERSION_NUMBER "3.6"
#ifdef SNAPSHOT
diff --git a/postfix/src/global/msg_stats.h b/postfix/src/global/msg_stats.h
index f71406cd6..335faf4f1 100644
--- a/postfix/src/global/msg_stats.h
+++ b/postfix/src/global/msg_stats.h
@@ -82,8 +82,8 @@ typedef struct {
(st) \
)
-extern int msg_stats_scan(ATTR_SCAN_MASTER_FN, VSTREAM *, int, void *);
-extern int msg_stats_print(ATTR_PRINT_MASTER_FN, VSTREAM *, int, void *);
+extern int msg_stats_scan(ATTR_SCAN_COMMON_FN, VSTREAM *, int, void *);
+extern int msg_stats_print(ATTR_PRINT_COMMON_FN, VSTREAM *, int, void *);
/* LICENSE
/* .ad
diff --git a/postfix/src/global/msg_stats_print.c b/postfix/src/global/msg_stats_print.c
index 18d2ee26d..f899aef6d 100644
--- a/postfix/src/global/msg_stats_print.c
+++ b/postfix/src/global/msg_stats_print.c
@@ -7,7 +7,7 @@
/* #include
/*
/* int msg_stats_print(print_fn, stream, flags, ptr)
-/* ATTR_PRINT_MASTER_FN print_fn;
+/* ATTR_PRINT_COMMON_FN print_fn;
/* VSTREAM *stream;
/* int flags;
/* void *ptr;
@@ -46,7 +46,7 @@
/* msg_stats_print - write MSG_STATS to stream */
-int msg_stats_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
+int msg_stats_print(ATTR_PRINT_COMMON_FN print_fn, VSTREAM *fp,
int flags, void *ptr)
{
int ret;
diff --git a/postfix/src/global/msg_stats_scan.c b/postfix/src/global/msg_stats_scan.c
index 280d32107..c4b4f8942 100644
--- a/postfix/src/global/msg_stats_scan.c
+++ b/postfix/src/global/msg_stats_scan.c
@@ -7,7 +7,7 @@
/* #include
/*
/* int msg_stats_scan(scan_fn, stream, flags, ptr)
-/* ATTR_SCAN_MASTER_FN scan_fn;
+/* ATTR_SCAN_COMMON_FN scan_fn;
/* VSTREAM *stream;
/* int flags;
/* void *ptr;
@@ -53,7 +53,7 @@
/* msg_stats_scan - read MSG_STATS from stream */
-int msg_stats_scan(ATTR_SCAN_MASTER_FN scan_fn, VSTREAM *fp,
+int msg_stats_scan(ATTR_SCAN_COMMON_FN scan_fn, VSTREAM *fp,
int flags, void *ptr)
{
MSG_STATS *stats = (MSG_STATS *) ptr;
diff --git a/postfix/src/global/rcpt_buf.c b/postfix/src/global/rcpt_buf.c
index d67905027..ba9164ee0 100644
--- a/postfix/src/global/rcpt_buf.c
+++ b/postfix/src/global/rcpt_buf.c
@@ -29,7 +29,7 @@
/* RCPT_BUF *rcpb;
/*
/* int rcpb_scan(scan_fn, stream, flags, ptr)
-/* ATTR_SCAN_MASTER_FN scan_fn;
+/* ATTR_SCAN_COMMON_FN scan_fn;
/* VSTREAM *stream;
/* int flags;
/* void *ptr;
@@ -115,7 +115,7 @@ void rcpb_free(RCPT_BUF *rcpt)
/* rcpb_scan - receive recipient buffer */
-int rcpb_scan(ATTR_SCAN_MASTER_FN scan_fn, VSTREAM *fp,
+int rcpb_scan(ATTR_SCAN_COMMON_FN scan_fn, VSTREAM *fp,
int flags, void *ptr)
{
RCPT_BUF *rcpt = (RCPT_BUF *) ptr;
diff --git a/postfix/src/global/rcpt_buf.h b/postfix/src/global/rcpt_buf.h
index 9b2994c0a..c474af3b5 100644
--- a/postfix/src/global/rcpt_buf.h
+++ b/postfix/src/global/rcpt_buf.h
@@ -38,7 +38,7 @@ typedef struct {
extern RCPT_BUF *rcpb_create(void);
extern void rcpb_reset(RCPT_BUF *);
extern void rcpb_free(RCPT_BUF *);
-extern int rcpb_scan(ATTR_SCAN_MASTER_FN, VSTREAM *, int, void *);
+extern int rcpb_scan(ATTR_SCAN_COMMON_FN, VSTREAM *, int, void *);
#define RECIPIENT_FROM_RCPT_BUF(buf) \
((buf)->rcpt.address = vstring_str((buf)->address), \
diff --git a/postfix/src/global/rcpt_print.c b/postfix/src/global/rcpt_print.c
index 60d9d30a3..6baabf16c 100644
--- a/postfix/src/global/rcpt_print.c
+++ b/postfix/src/global/rcpt_print.c
@@ -7,7 +7,7 @@
/* #include
/*
/* int rcpt_print(print_fn, stream, flags, ptr)
-/* ATTR_PRINT_MASTER_FN print_fn;
+/* ATTR_PRINT_COMMON_FN print_fn;
/* VSTREAM *stream;
/* int flags;
/* void *ptr;
@@ -48,7 +48,7 @@
/* rcpt_print - write recipient to stream */
-int rcpt_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
+int rcpt_print(ATTR_PRINT_COMMON_FN print_fn, VSTREAM *fp,
int flags, void *ptr)
{
RECIPIENT *rcpt = (RECIPIENT *) ptr;
diff --git a/postfix/src/global/rcpt_print.h b/postfix/src/global/rcpt_print.h
index ef46ad1a9..9ddb3b24e 100644
--- a/postfix/src/global/rcpt_print.h
+++ b/postfix/src/global/rcpt_print.h
@@ -25,7 +25,7 @@
/*
* External interface.
*/
-extern int rcpt_print(ATTR_SCAN_MASTER_FN, VSTREAM *, int, void *);
+extern int rcpt_print(ATTR_SCAN_COMMON_FN, VSTREAM *, int, void *);
/* LICENSE
/* .ad
diff --git a/postfix/src/milter/milter.h b/postfix/src/milter/milter.h
index 951744fdb..8f672c304 100644
--- a/postfix/src/milter/milter.h
+++ b/postfix/src/milter/milter.h
@@ -79,8 +79,8 @@ extern MILTER_MACROS *milter_macros_create(const char *, const char *,
const char *, const char *);
extern MILTER_MACROS *milter_macros_alloc(int);
extern void milter_macros_free(MILTER_MACROS *);
-extern int milter_macros_print(ATTR_PRINT_MASTER_FN, VSTREAM *, int, void *);
-extern int milter_macros_scan(ATTR_SCAN_MASTER_FN, VSTREAM *, int, void *);
+extern int milter_macros_print(ATTR_PRINT_COMMON_FN, VSTREAM *, int, void *);
+extern int milter_macros_scan(ATTR_SCAN_COMMON_FN, VSTREAM *, int, void *);
#define MILTER_MACROS_ALLOC_ZERO 1 /* null pointer */
#define MILTER_MACROS_ALLOC_EMPTY 2 /* mystrdup(""); */
diff --git a/postfix/src/milter/milter_macros.c b/postfix/src/milter/milter_macros.c
index 95126b1ed..a1ddf968c 100644
--- a/postfix/src/milter/milter_macros.c
+++ b/postfix/src/milter/milter_macros.c
@@ -26,13 +26,13 @@
/* MILTER_MACROS *mp;
/*
/* int milter_macros_print(print_fn, stream, flags, ptr)
-/* ATTR_PRINT_MASTER_FN print_fn;
+/* ATTR_PRINT_COMMON_FN print_fn;
/* VSTREAM *stream;
/* int flags;
/* void *ptr;
/*
/* int milter_macros_scan(scan_fn, fp, flags, ptr)
-/* ATTR_SCAN_MASTER_FN scan_fn;
+/* ATTR_SCAN_COMMON_FN scan_fn;
/* VSTREAM *fp;
/* int flags;
/* void *ptr;
@@ -130,7 +130,7 @@
/* milter_macros_print - write macros structure to stream */
-int milter_macros_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
+int milter_macros_print(ATTR_PRINT_COMMON_FN print_fn, VSTREAM *fp,
int flags, void *ptr)
{
MILTER_MACROS *mp = (MILTER_MACROS *) ptr;
@@ -155,7 +155,7 @@ int milter_macros_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
/* milter_macros_scan - receive macros structure from stream */
-int milter_macros_scan(ATTR_SCAN_MASTER_FN scan_fn, VSTREAM *fp,
+int milter_macros_scan(ATTR_SCAN_COMMON_FN scan_fn, VSTREAM *fp,
int flags, void *ptr)
{
MILTER_MACROS *mp = (MILTER_MACROS *) ptr;
diff --git a/postfix/src/tls/tls_misc.c b/postfix/src/tls/tls_misc.c
index 527233dfe..24d8be5c7 100644
--- a/postfix/src/tls/tls_misc.c
+++ b/postfix/src/tls/tls_misc.c
@@ -686,6 +686,27 @@ static int server_sni_callback(SSL *ssl, int *alert, void *arg)
TLScontext->namaddr, sni);
return SSL_TLSEXT_ERR_NOACK;
}
+
+ /*
+ * With TLS 1.3, when the client's proposed key share is not supported by
+ * the server, the server may issue a HelloRetryRequest (HRR), and the
+ * client will then retry with a new key share on a curve supported by
+ * the server. This results in the SNI callback running twice for the
+ * same connection.
+ *
+ * When that happens, The client MUST send the essentially the same hello
+ * message, including the SNI name, and since we've already loaded our
+ * certificate chain, we don't need to do it again! Therefore, if we've
+ * already recorded the peer SNI name, just check that it has not
+ * changed, and return success.
+ */
+ if (TLScontext->peer_sni) {
+ if (strcmp(sni, TLScontext->peer_sni) == 0)
+ return SSL_TLSEXT_ERR_OK;
+ msg_warn("TLS SNI changed from %s initially %s, %s after hello retry",
+ TLScontext->namaddr, TLScontext->peer_sni, sni);
+ return SSL_TLSEXT_ERR_NOACK;
+ }
do {
/* Don't silently skip maps opened with the wrong flags. */
pem = maps_file_find(tls_server_sni_maps, cp, 0);
diff --git a/postfix/src/tls/tls_proxy.h b/postfix/src/tls/tls_proxy.h
index 3a899b954..45058c356 100644
--- a/postfix/src/tls/tls_proxy.h
+++ b/postfix/src/tls/tls_proxy.h
@@ -79,9 +79,9 @@ typedef struct TLS_CLIENT_PARAMS {
extern TLS_CLIENT_PARAMS *tls_proxy_client_param_from_config(TLS_CLIENT_PARAMS *);
extern char *tls_proxy_client_param_to_string(VSTRING *, TLS_CLIENT_PARAMS *);
extern char *tls_proxy_client_param_with_names_to_string(VSTRING *, TLS_CLIENT_PARAMS *);
-extern int tls_proxy_client_param_print(ATTR_PRINT_MASTER_FN, VSTREAM *, int, void *);
+extern int tls_proxy_client_param_print(ATTR_PRINT_COMMON_FN, VSTREAM *, int, void *);
extern void tls_proxy_client_param_free(TLS_CLIENT_PARAMS *);
-extern int tls_proxy_client_param_scan(ATTR_SCAN_MASTER_FN, VSTREAM *, int, void *);
+extern int tls_proxy_client_param_scan(ATTR_SCAN_COMMON_FN, VSTREAM *, int, void *);
/*
* Functions that handle TLS_XXX_INIT_PROPS and TLS_XXX_START_PROPS. These
@@ -114,25 +114,25 @@ extern VSTREAM *tls_proxy_open(const char *, int, VSTREAM *, const char *,
extern TLS_SESS_STATE *tls_proxy_context_receive(VSTREAM *);
extern void tls_proxy_context_free(TLS_SESS_STATE *);
-extern int tls_proxy_context_print(ATTR_PRINT_MASTER_FN, VSTREAM *, int, void *);
-extern int tls_proxy_context_scan(ATTR_SCAN_MASTER_FN, VSTREAM *, int, void *);
+extern int tls_proxy_context_print(ATTR_PRINT_COMMON_FN, VSTREAM *, int, void *);
+extern int tls_proxy_context_scan(ATTR_SCAN_COMMON_FN, VSTREAM *, int, void *);
-extern int tls_proxy_client_init_print(ATTR_PRINT_MASTER_FN, VSTREAM *, int, void *);
-extern int tls_proxy_client_init_scan(ATTR_SCAN_MASTER_FN, VSTREAM *, int, void *);
+extern int tls_proxy_client_init_print(ATTR_PRINT_COMMON_FN, VSTREAM *, int, void *);
+extern int tls_proxy_client_init_scan(ATTR_SCAN_COMMON_FN, VSTREAM *, int, void *);
extern void tls_proxy_client_init_free(TLS_CLIENT_INIT_PROPS *);
extern char *tls_proxy_client_init_to_string(VSTRING *, TLS_CLIENT_INIT_PROPS *);
extern char *tls_proxy_client_init_with_names_to_string(VSTRING *, TLS_CLIENT_INIT_PROPS *);
-extern int tls_proxy_client_start_print(ATTR_PRINT_MASTER_FN, VSTREAM *, int, void *);
-extern int tls_proxy_client_start_scan(ATTR_SCAN_MASTER_FN, VSTREAM *, int, void *);
+extern int tls_proxy_client_start_print(ATTR_PRINT_COMMON_FN, VSTREAM *, int, void *);
+extern int tls_proxy_client_start_scan(ATTR_SCAN_COMMON_FN, VSTREAM *, int, void *);
extern void tls_proxy_client_start_free(TLS_CLIENT_START_PROPS *);
-extern int tls_proxy_server_init_print(ATTR_PRINT_MASTER_FN, VSTREAM *, int, void *);
-extern int tls_proxy_server_init_scan(ATTR_SCAN_MASTER_FN, VSTREAM *, int, void *);
+extern int tls_proxy_server_init_print(ATTR_PRINT_COMMON_FN, VSTREAM *, int, void *);
+extern int tls_proxy_server_init_scan(ATTR_SCAN_COMMON_FN, VSTREAM *, int, void *);
extern void tls_proxy_server_init_free(TLS_SERVER_INIT_PROPS *);
-extern int tls_proxy_server_start_print(ATTR_PRINT_MASTER_FN, VSTREAM *, int, void *);
-extern int tls_proxy_server_start_scan(ATTR_SCAN_MASTER_FN, VSTREAM *, int, void *);
+extern int tls_proxy_server_start_print(ATTR_PRINT_COMMON_FN, VSTREAM *, int, void *);
+extern int tls_proxy_server_start_scan(ATTR_SCAN_COMMON_FN, VSTREAM *, int, void *);
extern void tls_proxy_server_start_free(TLS_SERVER_START_PROPS *);
diff --git a/postfix/src/tls/tls_proxy_client_print.c b/postfix/src/tls/tls_proxy_client_print.c
index 68fb56b17..8caf70511 100644
--- a/postfix/src/tls/tls_proxy_client_print.c
+++ b/postfix/src/tls/tls_proxy_client_print.c
@@ -7,19 +7,19 @@
/* #include
/*
/* int tls_proxy_client_param_print(print_fn, stream, flags, ptr)
-/* ATTR_PRINT_MASTER_FN print_fn;
+/* ATTR_PRINT_COMMON_FN print_fn;
/* VSTREAM *stream;
/* int flags;
/* void *ptr;
/*
/* int tls_proxy_client_init_print(print_fn, stream, flags, ptr)
-/* ATTR_PRINT_MASTER_FN print_fn;
+/* ATTR_PRINT_COMMON_FN print_fn;
/* VSTREAM *stream;
/* int flags;
/* void *ptr;
/*
/* int tls_proxy_client_start_print(print_fn, stream, flags, ptr)
-/* ATTR_PRINT_MASTER_FN print_fn;
+/* ATTR_PRINT_COMMON_FN print_fn;
/* VSTREAM *stream;
/* int flags;
/* void *ptr;
@@ -85,7 +85,7 @@
/* tls_proxy_client_param_print - send TLS_CLIENT_PARAMS over stream */
-int tls_proxy_client_param_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
+int tls_proxy_client_param_print(ATTR_PRINT_COMMON_FN print_fn, VSTREAM *fp,
int flags, void *ptr)
{
TLS_CLIENT_PARAMS *params = (TLS_CLIENT_PARAMS *) ptr;
@@ -134,7 +134,7 @@ int tls_proxy_client_param_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
/* tls_proxy_client_init_print - send TLS_CLIENT_INIT_PROPS over stream */
-int tls_proxy_client_init_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
+int tls_proxy_client_init_print(ATTR_PRINT_COMMON_FN print_fn, VSTREAM *fp,
int flags, void *ptr)
{
TLS_CLIENT_INIT_PROPS *props = (TLS_CLIENT_INIT_PROPS *) ptr;
@@ -182,7 +182,7 @@ int tls_proxy_client_init_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
/* tls_proxy_client_certs_print - send x509 certificates over stream */
-static int tls_proxy_client_certs_print(ATTR_PRINT_MASTER_FN print_fn,
+static int tls_proxy_client_certs_print(ATTR_PRINT_COMMON_FN print_fn,
VSTREAM *fp, int flags, void *ptr)
{
TLS_CERTS *tls_certs = (TLS_CERTS *) ptr;
@@ -227,7 +227,7 @@ static int tls_proxy_client_certs_print(ATTR_PRINT_MASTER_FN print_fn,
/* tls_proxy_client_pkeys_print - send public keys over stream */
-static int tls_proxy_client_pkeys_print(ATTR_PRINT_MASTER_FN print_fn,
+static int tls_proxy_client_pkeys_print(ATTR_PRINT_COMMON_FN print_fn,
VSTREAM *fp, int flags, void *ptr)
{
TLS_PKEYS *tls_pkeys = (TLS_PKEYS *) ptr;
@@ -272,7 +272,7 @@ static int tls_proxy_client_pkeys_print(ATTR_PRINT_MASTER_FN print_fn,
/* tls_proxy_client_tlsa_print - send TLS_TLSA over stream */
-static int tls_proxy_client_tlsa_print(ATTR_PRINT_MASTER_FN print_fn,
+static int tls_proxy_client_tlsa_print(ATTR_PRINT_COMMON_FN print_fn,
VSTREAM *fp, int flags, void *ptr)
{
TLS_TLSA *tls_tlsa = (TLS_TLSA *) ptr;
@@ -310,7 +310,7 @@ static int tls_proxy_client_tlsa_print(ATTR_PRINT_MASTER_FN print_fn,
/* tls_proxy_client_dane_print - send TLS_DANE over stream */
-static int tls_proxy_client_dane_print(ATTR_PRINT_MASTER_FN print_fn,
+static int tls_proxy_client_dane_print(ATTR_PRINT_COMMON_FN print_fn,
VSTREAM *fp, int flags, void *ptr)
{
TLS_DANE *dane = (TLS_DANE *) ptr;
@@ -346,7 +346,7 @@ static int tls_proxy_client_dane_print(ATTR_PRINT_MASTER_FN print_fn,
/* tls_proxy_client_start_print - send TLS_CLIENT_START_PROPS over stream */
-int tls_proxy_client_start_print(ATTR_PRINT_MASTER_FN print_fn,
+int tls_proxy_client_start_print(ATTR_PRINT_COMMON_FN print_fn,
VSTREAM *fp, int flags, void *ptr)
{
TLS_CLIENT_START_PROPS *props = (TLS_CLIENT_START_PROPS *) ptr;
diff --git a/postfix/src/tls/tls_proxy_client_scan.c b/postfix/src/tls/tls_proxy_client_scan.c
index 4c748ae3c..0d2b43b2d 100644
--- a/postfix/src/tls/tls_proxy_client_scan.c
+++ b/postfix/src/tls/tls_proxy_client_scan.c
@@ -7,7 +7,7 @@
/* #include
/*
/* int tls_proxy_client_param_scan(scan_fn, stream, flags, ptr)
-/* ATTR_SCAN_MASTER_FN scan_fn;
+/* ATTR_SCAN_COMMON_FN scan_fn;
/* VSTREAM *stream;
/* int flags;
/* void *ptr;
@@ -16,7 +16,7 @@
/* TLS_CLIENT_PARAMS *params;
/*
/* int tls_proxy_client_init_scan(scan_fn, stream, flags, ptr)
-/* ATTR_SCAN_MASTER_FN scan_fn;
+/* ATTR_SCAN_COMMON_FN scan_fn;
/* VSTREAM *stream;
/* int flags;
/* void *ptr;
@@ -25,7 +25,7 @@
/* TLS_CLIENT_INIT_PROPS *init_props;
/*
/* int tls_proxy_client_start_scan(scan_fn, stream, flags, ptr)
-/* ATTR_SCAN_MASTER_FN scan_fn;
+/* ATTR_SCAN_COMMON_FN scan_fn;
/* VSTREAM *stream;
/* int flags;
/* void *ptr;
@@ -138,7 +138,7 @@ void tls_proxy_client_param_free(TLS_CLIENT_PARAMS *params)
/* tls_proxy_client_param_scan - receive TLS_CLIENT_PARAMS from stream */
-int tls_proxy_client_param_scan(ATTR_SCAN_MASTER_FN scan_fn, VSTREAM *fp,
+int tls_proxy_client_param_scan(ATTR_SCAN_COMMON_FN scan_fn, VSTREAM *fp,
int flags, void *ptr)
{
TLS_CLIENT_PARAMS *params
@@ -238,7 +238,7 @@ void tls_proxy_client_init_free(TLS_CLIENT_INIT_PROPS *props)
/* tls_proxy_client_init_scan - receive TLS_CLIENT_INIT_PROPS from stream */
-int tls_proxy_client_init_scan(ATTR_SCAN_MASTER_FN scan_fn, VSTREAM *fp,
+int tls_proxy_client_init_scan(ATTR_SCAN_COMMON_FN scan_fn, VSTREAM *fp,
int flags, void *ptr)
{
TLS_CLIENT_INIT_PROPS *props
@@ -382,7 +382,7 @@ void tls_proxy_client_start_free(TLS_CLIENT_START_PROPS *props)
/* tls_proxy_client_certs_scan - receive TLS_CERTS from stream */
-static int tls_proxy_client_certs_scan(ATTR_SCAN_MASTER_FN scan_fn,
+static int tls_proxy_client_certs_scan(ATTR_SCAN_COMMON_FN scan_fn,
VSTREAM *fp, int flags, void *ptr)
{
int ret;
@@ -441,7 +441,7 @@ static int tls_proxy_client_certs_scan(ATTR_SCAN_MASTER_FN scan_fn,
/* tls_proxy_client_pkeys_scan - receive TLS_PKEYS from stream */
-static int tls_proxy_client_pkeys_scan(ATTR_SCAN_MASTER_FN scan_fn,
+static int tls_proxy_client_pkeys_scan(ATTR_SCAN_COMMON_FN scan_fn,
VSTREAM *fp, int flags, void *ptr)
{
int ret;
@@ -500,7 +500,7 @@ static int tls_proxy_client_pkeys_scan(ATTR_SCAN_MASTER_FN scan_fn,
/* tls_proxy_client_tlsa_scan - receive TLS_TLSA from stream */
-static int tls_proxy_client_tlsa_scan(ATTR_SCAN_MASTER_FN scan_fn,
+static int tls_proxy_client_tlsa_scan(ATTR_SCAN_COMMON_FN scan_fn,
VSTREAM *fp, int flags, void *ptr)
{
int ret;
@@ -549,7 +549,7 @@ static int tls_proxy_client_tlsa_scan(ATTR_SCAN_MASTER_FN scan_fn,
/* tls_proxy_client_dane_scan - receive TLS_DANE from stream */
-static int tls_proxy_client_dane_scan(ATTR_SCAN_MASTER_FN scan_fn,
+static int tls_proxy_client_dane_scan(ATTR_SCAN_COMMON_FN scan_fn,
VSTREAM *fp, int flags, void *ptr)
{
TLS_DANE *dane = 0;
@@ -610,7 +610,7 @@ static int tls_proxy_client_dane_scan(ATTR_SCAN_MASTER_FN scan_fn,
/* tls_proxy_client_start_scan - receive TLS_CLIENT_START_PROPS from stream */
-int tls_proxy_client_start_scan(ATTR_SCAN_MASTER_FN scan_fn, VSTREAM *fp,
+int tls_proxy_client_start_scan(ATTR_SCAN_COMMON_FN scan_fn, VSTREAM *fp,
int flags, void *ptr)
{
TLS_CLIENT_START_PROPS *props
diff --git a/postfix/src/tls/tls_proxy_context_print.c b/postfix/src/tls/tls_proxy_context_print.c
index a9cbc5c17..dadd64f81 100644
--- a/postfix/src/tls/tls_proxy_context_print.c
+++ b/postfix/src/tls/tls_proxy_context_print.c
@@ -7,7 +7,7 @@
/* #include
/*
/* int tls_proxy_context_print(print_fn, stream, flags, ptr)
-/* ATTR_PRINT_MASTER_FN print_fn;
+/* ATTR_PRINT_COMMON_FN print_fn;
/* VSTREAM *stream;
/* int flags;
/* void *ptr;
@@ -53,7 +53,7 @@
/* tls_proxy_context_print - send TLS session state over stream */
-int tls_proxy_context_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
+int tls_proxy_context_print(ATTR_PRINT_COMMON_FN print_fn, VSTREAM *fp,
int flags, void *ptr)
{
TLS_SESS_STATE *tp = (TLS_SESS_STATE *) ptr;
diff --git a/postfix/src/tls/tls_proxy_context_scan.c b/postfix/src/tls/tls_proxy_context_scan.c
index 96afddaba..af216ac36 100644
--- a/postfix/src/tls/tls_proxy_context_scan.c
+++ b/postfix/src/tls/tls_proxy_context_scan.c
@@ -7,7 +7,7 @@
/* #include
/*
/* int tls_proxy_context_scan(scan_fn, stream, flags, ptr)
-/* ATTR_SCAN_MASTER_FN scan_fn;
+/* ATTR_SCAN_COMMON_FN scan_fn;
/* VSTREAM *stream;
/* int flags;
/* void *ptr;
@@ -66,7 +66,7 @@
/* tls_proxy_context_scan - receive TLS session state from stream */
-int tls_proxy_context_scan(ATTR_SCAN_MASTER_FN scan_fn, VSTREAM *fp,
+int tls_proxy_context_scan(ATTR_SCAN_COMMON_FN scan_fn, VSTREAM *fp,
int flags, void *ptr)
{
TLS_SESS_STATE *tls_context
diff --git a/postfix/src/tls/tls_proxy_server_print.c b/postfix/src/tls/tls_proxy_server_print.c
index a0a567f73..c49f67052 100644
--- a/postfix/src/tls/tls_proxy_server_print.c
+++ b/postfix/src/tls/tls_proxy_server_print.c
@@ -7,13 +7,13 @@
/* #include
/*
/* int tls_proxy_server_init_print(print_fn, stream, flags, ptr)
-/* ATTR_PRINT_MASTER_FN print_fn;
+/* ATTR_PRINT_COMMON_FN print_fn;
/* VSTREAM *stream;
/* int flags;
/* void *ptr;
/*
/* int tls_proxy_server_start_print(print_fn, stream, flags, ptr)
-/* ATTR_PRINT_MASTER_FN print_fn;
+/* ATTR_PRINT_COMMON_FN print_fn;
/* VSTREAM *stream;
/* int flags;
/* void *ptr;
@@ -61,7 +61,7 @@
/* tls_proxy_server_init_print - send TLS_SERVER_INIT_PROPS over stream */
-int tls_proxy_server_init_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
+int tls_proxy_server_init_print(ATTR_PRINT_COMMON_FN print_fn, VSTREAM *fp,
int flags, void *ptr)
{
TLS_SERVER_INIT_PROPS *props = (TLS_SERVER_INIT_PROPS *) ptr;
@@ -114,7 +114,7 @@ int tls_proxy_server_init_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
/* tls_proxy_server_start_print - send TLS_SERVER_START_PROPS over stream */
-int tls_proxy_server_start_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
+int tls_proxy_server_start_print(ATTR_PRINT_COMMON_FN print_fn, VSTREAM *fp,
int flags, void *ptr)
{
TLS_SERVER_START_PROPS *props = (TLS_SERVER_START_PROPS *) ptr;
diff --git a/postfix/src/tls/tls_proxy_server_scan.c b/postfix/src/tls/tls_proxy_server_scan.c
index f7b3fb6d4..92da66cf8 100644
--- a/postfix/src/tls/tls_proxy_server_scan.c
+++ b/postfix/src/tls/tls_proxy_server_scan.c
@@ -7,7 +7,7 @@
/* #include
/*
/* int tls_proxy_server_init_scan(scan_fn, stream, flags, ptr)
-/* ATTR_SCAN_MASTER_FN scan_fn;
+/* ATTR_SCAN_COMMON_FN scan_fn;
/* VSTREAM *stream;
/* int flags;
/* void *ptr;
@@ -16,7 +16,7 @@
/* TLS_SERVER_INIT_PROPS *init_props;
/*
/* int tls_proxy_server_start_scan(scan_fn, stream, flags, ptr)
-/* ATTR_SCAN_MASTER_FN scan_fn;
+/* ATTR_SCAN_COMMON_FN scan_fn;
/* VSTREAM *stream;
/* int flags;
/* void *ptr;
@@ -83,7 +83,7 @@
/* tls_proxy_server_init_scan - receive TLS_SERVER_INIT_PROPS from stream */
-int tls_proxy_server_init_scan(ATTR_SCAN_MASTER_FN scan_fn, VSTREAM *fp,
+int tls_proxy_server_init_scan(ATTR_SCAN_COMMON_FN scan_fn, VSTREAM *fp,
int flags, void *ptr)
{
TLS_SERVER_INIT_PROPS *props
@@ -186,7 +186,7 @@ void tls_proxy_server_init_free(TLS_SERVER_INIT_PROPS *props)
/* tls_proxy_server_start_scan - receive TLS_SERVER_START_PROPS from stream */
-int tls_proxy_server_start_scan(ATTR_SCAN_MASTER_FN scan_fn, VSTREAM *fp,
+int tls_proxy_server_start_scan(ATTR_SCAN_COMMON_FN scan_fn, VSTREAM *fp,
int flags, void *ptr)
{
TLS_SERVER_START_PROPS *props
diff --git a/postfix/src/util/argv_attr.h b/postfix/src/util/argv_attr.h
index 65cfa5541..670b05662 100644
--- a/postfix/src/util/argv_attr.h
+++ b/postfix/src/util/argv_attr.h
@@ -26,8 +26,8 @@
#define ARGV_ATTR_VALUE "argv_value"
#define ARGV_ATTR_MAX 1024
-extern int argv_attr_print(ATTR_PRINT_MASTER_FN, VSTREAM *, int, void *);
-extern int argv_attr_scan(ATTR_SCAN_MASTER_FN, VSTREAM *, int, void *);
+extern int argv_attr_print(ATTR_PRINT_COMMON_FN, VSTREAM *, int, void *);
+extern int argv_attr_scan(ATTR_SCAN_COMMON_FN, VSTREAM *, int, void *);
/* LICENSE
/* .ad
diff --git a/postfix/src/util/argv_attr_print.c b/postfix/src/util/argv_attr_print.c
index 87b086a9b..c30e77b54 100644
--- a/postfix/src/util/argv_attr_print.c
+++ b/postfix/src/util/argv_attr_print.c
@@ -7,7 +7,7 @@
/* #include
/*
/* int argv_attr_print(print_fn, stream, flags, ptr)
-/* ATTR_PRINT_MASTER_FN print_fn;
+/* ATTR_PRINT_COMMON_FN print_fn;
/* VSTREAM *stream;
/* int flags;
/* void *ptr;
@@ -49,7 +49,7 @@
/* argv_attr_print - write ARGV to stream */
-int argv_attr_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
+int argv_attr_print(ATTR_PRINT_COMMON_FN print_fn, VSTREAM *fp,
int flags, void *ptr)
{
ARGV *argv = (ARGV *) ptr;
diff --git a/postfix/src/util/argv_attr_scan.c b/postfix/src/util/argv_attr_scan.c
index 3005cb2dd..0987bf8af 100644
--- a/postfix/src/util/argv_attr_scan.c
+++ b/postfix/src/util/argv_attr_scan.c
@@ -7,7 +7,7 @@
/* #include
/*
/* int argv_attr_scan(scan_fn, stream, flags, ptr)
-/* ATTR_SCAN_MASTER_FN scan_fn;
+/* ATTR_SCAN_COMMON_FN scan_fn;
/* VSTREAM *stream;
/* int flags;
/* void *ptr;
@@ -56,7 +56,7 @@
/* argv_attr_scan - write ARGV to stream */
-int argv_attr_scan(ATTR_PRINT_MASTER_FN scan_fn, VSTREAM *fp,
+int argv_attr_scan(ATTR_PRINT_COMMON_FN scan_fn, VSTREAM *fp,
int flags, void *ptr)
{
ARGV *argv = 0;
diff --git a/postfix/src/util/attr.h b/postfix/src/util/attr.h
index dc6f9f753..754e1259f 100644
--- a/postfix/src/util/attr.h
+++ b/postfix/src/util/attr.h
@@ -28,10 +28,10 @@
/*
* Delegation for better data abstraction.
*/
-typedef int (*ATTR_SCAN_MASTER_FN) (VSTREAM *, int,...);
-typedef int (*ATTR_SCAN_SLAVE_FN) (ATTR_SCAN_MASTER_FN, VSTREAM *, int, void *);
-typedef int (*ATTR_PRINT_MASTER_FN) (VSTREAM *, int,...);
-typedef int (*ATTR_PRINT_SLAVE_FN) (ATTR_PRINT_MASTER_FN, VSTREAM *, int, void *);
+typedef int (*ATTR_SCAN_COMMON_FN) (VSTREAM *, int,...);
+typedef int (*ATTR_SCAN_CUSTOM_FN) (ATTR_SCAN_COMMON_FN, VSTREAM *, int, void *);
+typedef int (*ATTR_PRINT_COMMON_FN) (VSTREAM *, int,...);
+typedef int (*ATTR_PRINT_CUSTOM_FN) (ATTR_PRINT_COMMON_FN, VSTREAM *, int, void *);
/*
* Attribute types. See attr_scan(3) for documentation.
@@ -66,7 +66,7 @@ typedef int (*ATTR_PRINT_SLAVE_FN) (ATTR_PRINT_MASTER_FN, VSTREAM *, int, void *
#define SEND_ATTR_NV(val) ATTR_TYPE_NV, CHECK_CPTR(ATTR, NVTABLE, (val))
#define SEND_ATTR_LONG(name, val) ATTR_TYPE_LONG, CHECK_CPTR(ATTR, char, (name)), CHECK_VAL(ATTR, long, (val))
#define SEND_ATTR_DATA(name, len, val) ATTR_TYPE_DATA, CHECK_CPTR(ATTR, char, (name)), CHECK_VAL(ATTR, ssize_t, (len)), CHECK_CPTR(ATTR, void, (val))
-#define SEND_ATTR_FUNC(func, val) ATTR_TYPE_FUNC, CHECK_VAL(ATTR, ATTR_PRINT_SLAVE_FN, (func)), CHECK_CPTR(ATTR, void, (val))
+#define SEND_ATTR_FUNC(func, val) ATTR_TYPE_FUNC, CHECK_VAL(ATTR, ATTR_PRINT_CUSTOM_FN, (func)), CHECK_CPTR(ATTR, void, (val))
#define RECV_ATTR_INT(name, val) ATTR_TYPE_INT, CHECK_CPTR(ATTR, char, (name)), CHECK_PTR(ATTR, int, (val))
#define RECV_ATTR_STR(name, val) ATTR_TYPE_STR, CHECK_CPTR(ATTR, char, (name)), CHECK_PTR(ATTR, VSTRING, (val))
@@ -74,7 +74,7 @@ typedef int (*ATTR_PRINT_SLAVE_FN) (ATTR_PRINT_MASTER_FN, VSTREAM *, int, void *
#define RECV_ATTR_NV(val) ATTR_TYPE_NV, CHECK_PTR(ATTR, NVTABLE, (val))
#define RECV_ATTR_LONG(name, val) ATTR_TYPE_LONG, CHECK_CPTR(ATTR, char, (name)), CHECK_PTR(ATTR, long, (val))
#define RECV_ATTR_DATA(name, val) ATTR_TYPE_DATA, CHECK_CPTR(ATTR, char, (name)), CHECK_PTR(ATTR, VSTRING, (val))
-#define RECV_ATTR_FUNC(func, val) ATTR_TYPE_FUNC, CHECK_VAL(ATTR, ATTR_SCAN_SLAVE_FN, (func)), CHECK_PTR(ATTR, void, (val))
+#define RECV_ATTR_FUNC(func, val) ATTR_TYPE_FUNC, CHECK_VAL(ATTR, ATTR_SCAN_CUSTOM_FN, (func)), CHECK_PTR(ATTR, void, (val))
CHECK_VAL_HELPER_DCL(ATTR, ssize_t);
CHECK_VAL_HELPER_DCL(ATTR, long);
@@ -89,8 +89,8 @@ CHECK_CPTR_HELPER_DCL(ATTR, void);
CHECK_CPTR_HELPER_DCL(ATTR, char);
CHECK_CPTR_HELPER_DCL(ATTR, NVTABLE);
CHECK_CPTR_HELPER_DCL(ATTR, HTABLE);
-CHECK_VAL_HELPER_DCL(ATTR, ATTR_PRINT_SLAVE_FN);
-CHECK_VAL_HELPER_DCL(ATTR, ATTR_SCAN_SLAVE_FN);
+CHECK_VAL_HELPER_DCL(ATTR, ATTR_PRINT_CUSTOM_FN);
+CHECK_VAL_HELPER_DCL(ATTR, ATTR_SCAN_CUSTOM_FN);
/*
* Flags that control processing. See attr_scan(3) for documentation.
diff --git a/postfix/src/util/attr_print0.c b/postfix/src/util/attr_print0.c
index 27fb7beac..20c2c5a1e 100644
--- a/postfix/src/util/attr_print0.c
+++ b/postfix/src/util/attr_print0.c
@@ -53,7 +53,7 @@
/* .IP "SEND_ATTR_DATA(const char *name, ssize_t len, const void *value)"
/* The arguments are an attribute name, an attribute value
/* length, and an attribute value pointer.
-/* .IP "SEND_ATTR_FUNC(ATTR_PRINT_SLAVE_FN, const void *value)"
+/* .IP "SEND_ATTR_FUNC(ATTR_PRINT_CUSTOM_FN, const void *value)"
/* The arguments are a function pointer and generic data
/* pointer. The caller-specified function returns whatever the
/* specified attribute printing function returns.
@@ -119,7 +119,7 @@ int attr_vprint0(VSTREAM *fp, int flags, va_list ap)
HTABLE_INFO **ht;
ssize_t len_val;
static VSTRING *base64_buf;
- ATTR_PRINT_SLAVE_FN print_fn;
+ ATTR_PRINT_CUSTOM_FN print_fn;
void *print_arg;
/*
@@ -174,7 +174,7 @@ int attr_vprint0(VSTREAM *fp, int flags, va_list ap)
attr_name, (long) len_val);
break;
case ATTR_TYPE_FUNC:
- print_fn = va_arg(ap, ATTR_PRINT_SLAVE_FN);
+ print_fn = va_arg(ap, ATTR_PRINT_CUSTOM_FN);
print_arg = va_arg(ap, void *);
print_fn(attr_print0, fp, flags | ATTR_FLAG_MORE, print_arg);
break;
diff --git a/postfix/src/util/attr_print64.c b/postfix/src/util/attr_print64.c
index b2181d740..1008979aa 100644
--- a/postfix/src/util/attr_print64.c
+++ b/postfix/src/util/attr_print64.c
@@ -53,7 +53,7 @@
/* .IP "SEND_ATTR_DATA(const char *name, ssize_t len, const void *value)"
/* The arguments are an attribute name, an attribute value
/* length, and an attribute value pointer.
-/* .IP "SEND_ATTR_FUNC(ATTR_PRINT_SLAVE_FN, const void *value)"
+/* .IP "SEND_ATTR_FUNC(ATTR_PRINT_CUSTOM_FN, const void *value)"
/* The arguments are a function pointer and generic data
/* pointer. The caller-specified function returns whatever the
/* specified attribute printing function returns.
@@ -153,7 +153,7 @@ int attr_vprint64(VSTREAM *fp, int flags, va_list ap)
HTABLE_INFO **ht_info_list;
HTABLE_INFO **ht;
ssize_t len_val;
- ATTR_PRINT_SLAVE_FN print_fn;
+ ATTR_PRINT_CUSTOM_FN print_fn;
void *print_arg;
/*
@@ -211,7 +211,7 @@ int attr_vprint64(VSTREAM *fp, int flags, va_list ap)
attr_name, (long) len_val);
break;
case ATTR_TYPE_FUNC:
- print_fn = va_arg(ap, ATTR_PRINT_SLAVE_FN);
+ print_fn = va_arg(ap, ATTR_PRINT_CUSTOM_FN);
print_arg = va_arg(ap, void *);
print_fn(attr_print64, fp, flags | ATTR_FLAG_MORE, print_arg);
break;
diff --git a/postfix/src/util/attr_print_plain.c b/postfix/src/util/attr_print_plain.c
index fef0def3d..7ef03be8e 100644
--- a/postfix/src/util/attr_print_plain.c
+++ b/postfix/src/util/attr_print_plain.c
@@ -53,7 +53,7 @@
/* .IP "SEND_ATTR_DATA(const char *name, ssize_t len, const void *value)"
/* The arguments are an attribute name, an attribute value
/* length, and an attribute value pointer.
-/* .IP "SEND_ATTR_FUNC(ATTR_PRINT_SLAVE_FN, const void *value)"
+/* .IP "SEND_ATTR_FUNC(ATTR_PRINT_CUSTOM_FN, const void *value)"
/* The arguments are a function pointer and generic data
/* pointer. The caller-specified function returns whatever the
/* specified attribute printing function returns.
@@ -120,7 +120,7 @@ int attr_vprint_plain(VSTREAM *fp, int flags, va_list ap)
HTABLE_INFO **ht;
static VSTRING *base64_buf;
ssize_t len_val;
- ATTR_PRINT_SLAVE_FN print_fn;
+ ATTR_PRINT_CUSTOM_FN print_fn;
void *print_arg;
/*
@@ -169,7 +169,7 @@ int attr_vprint_plain(VSTREAM *fp, int flags, va_list ap)
attr_name, (long) len_val);
break;
case ATTR_TYPE_FUNC:
- print_fn = va_arg(ap, ATTR_PRINT_SLAVE_FN);
+ print_fn = va_arg(ap, ATTR_PRINT_CUSTOM_FN);
print_arg = va_arg(ap, void *);
print_fn(attr_print_plain, fp, flags | ATTR_FLAG_MORE, print_arg);
break;
diff --git a/postfix/src/util/attr_scan0.c b/postfix/src/util/attr_scan0.c
index f465de917..6dd154877 100644
--- a/postfix/src/util/attr_scan0.c
+++ b/postfix/src/util/attr_scan0.c
@@ -102,7 +102,7 @@
/* This argument is followed by an attribute name and a VSTRING pointer.
/* .IP "RECV_ATTR_DATA(const char *name, VSTRING *vp)"
/* This argument is followed by an attribute name and a VSTRING pointer.
-/* .IP "RECV_ATTR_FUNC(ATTR_SCAN_SLAVE_FN, void *data)"
+/* .IP "RECV_ATTR_FUNC(ATTR_SCAN_CUSTOM_FN, void *data)"
/* This argument is followed by a function pointer and a generic data
/* pointer. The caller-specified function returns < 0 in case of
/* error.
@@ -276,7 +276,7 @@ int attr_vscan0(VSTREAM *fp, int flags, va_list ap)
HTABLE *hash_table;
int ch;
int conversions;
- ATTR_SCAN_SLAVE_FN scan_fn;
+ ATTR_SCAN_CUSTOM_FN scan_fn;
void *scan_arg;
/*
@@ -416,7 +416,7 @@ int attr_vscan0(VSTREAM *fp, int flags, va_list ap)
return (-1);
break;
case ATTR_TYPE_FUNC:
- scan_fn = va_arg(ap, ATTR_SCAN_SLAVE_FN);
+ scan_fn = va_arg(ap, ATTR_SCAN_CUSTOM_FN);
scan_arg = va_arg(ap, void *);
if (scan_fn(attr_scan0, fp, flags | ATTR_FLAG_MORE, scan_arg) < 0)
return (-1);
diff --git a/postfix/src/util/attr_scan64.c b/postfix/src/util/attr_scan64.c
index bb8ba3e6b..4ea1e2874 100644
--- a/postfix/src/util/attr_scan64.c
+++ b/postfix/src/util/attr_scan64.c
@@ -104,7 +104,7 @@
/* This argument is followed by an attribute name and a VSTRING pointer.
/* .IP "RECV_ATTR_DATA(const char *name, VSTRING *vp)"
/* This argument is followed by an attribute name and a VSTRING pointer.
-/* .IP "RECV_ATTR_FUNC(ATTR_SCAN_SLAVE_FN, void *data)"
+/* .IP "RECV_ATTR_FUNC(ATTR_SCAN_CUSTOM_FN, void *data)"
/* This argument is followed by a function pointer and a generic data
/* pointer. The caller-specified function returns < 0 in case of
/* error.
@@ -279,7 +279,7 @@ int attr_vscan64(VSTREAM *fp, int flags, va_list ap)
HTABLE *hash_table;
int ch;
int conversions;
- ATTR_SCAN_SLAVE_FN scan_fn;
+ ATTR_SCAN_CUSTOM_FN scan_fn;
void *scan_arg;
/*
@@ -465,7 +465,7 @@ int attr_vscan64(VSTREAM *fp, int flags, va_list ap)
}
break;
case ATTR_TYPE_FUNC:
- scan_fn = va_arg(ap, ATTR_SCAN_SLAVE_FN);
+ scan_fn = va_arg(ap, ATTR_SCAN_CUSTOM_FN);
scan_arg = va_arg(ap, void *);
if (scan_fn(attr_scan64, fp, flags | ATTR_FLAG_MORE, scan_arg) < 0)
return (-1);
diff --git a/postfix/src/util/attr_scan_plain.c b/postfix/src/util/attr_scan_plain.c
index 97499d320..41cfc8d4d 100644
--- a/postfix/src/util/attr_scan_plain.c
+++ b/postfix/src/util/attr_scan_plain.c
@@ -102,7 +102,7 @@
/* This argument is followed by an attribute name and a VSTRING pointer.
/* .IP "RECV_ATTR_DATA(const char *name, VSTRING *vp)"
/* This argument is followed by an attribute name and a VSTRING pointer.
-/* .IP "RECV_ATTR_FUNC(ATTR_SCAN_SLAVE_FN, void *data)"
+/* .IP "RECV_ATTR_FUNC(ATTR_SCAN_CUSTOM_FN, void *data)"
/* This argument is followed by a function pointer and a generic data
/* pointer. The caller-specified function returns < 0 in case of
/* error.
@@ -292,7 +292,7 @@ int attr_vscan_plain(VSTREAM *fp, int flags, va_list ap)
HTABLE *hash_table;
int ch;
int conversions;
- ATTR_SCAN_SLAVE_FN scan_fn;
+ ATTR_SCAN_CUSTOM_FN scan_fn;
void *scan_arg;
/*
@@ -453,7 +453,7 @@ int attr_vscan_plain(VSTREAM *fp, int flags, va_list ap)
return (-1);
break;
case ATTR_TYPE_FUNC:
- scan_fn = va_arg(ap, ATTR_SCAN_SLAVE_FN);
+ scan_fn = va_arg(ap, ATTR_SCAN_CUSTOM_FN);
scan_arg = va_arg(ap, void *);
if (scan_fn(attr_scan_plain, fp, flags | ATTR_FLAG_MORE, scan_arg) < 0)
return (-1);