it's slightly different: ca is for "crypto agent" unsure if there's really an interest in renaming internally, furthermore there's a separate crypto API for encrypted queue so not distinguishing between crypto api and crypto agent might be confusing.
Gilles December 27, 2020 5:43 PM, "Martijn van Duren" <[email protected]> wrote: > This one reads OK to me, with one minor bikeshed: > You rename klondike to crypto, but the internals still refer to CA > everywhere. Wouldn't it be cleaner to leave klondike in step one and do > a s/CA/CRYPTO/ in a second step so everything is in concent? > Personally I prefer the name crypto over ca. > > martijn@ > > On Sat, 2020-12-19 at 23:21 +0000, [email protected] wrote: > >> December 19, 2020 11:26 PM, "Martijn van Duren" >> <[email protected]> wrote: >> >> Personally I'd rather wait to keep the names in sync, especially since >> it's an easy 2 line diff that can easily be incorperated in the bigger >> thing. But it's not something I'm going to loose sleep over if others >> thing it can go in right now. >> >> Fair enough :-) >> >> Below is the diff that changes all references to pony into dispatcher. >> >> I didn't rename pony.c to dispatcher.c as this would break the diff, but if >> this gets >> committed I'll submit a diff for the rename + Makefile bit >> >> diff --git a/usr.sbin/smtpd/bounce.c b/usr.sbin/smtpd/bounce.c >> index e6fc55780a1..455da6ff8b1 100644 >> --- a/usr.sbin/smtpd/bounce.c >> +++ b/usr.sbin/smtpd/bounce.c >> @@ -290,7 +290,7 @@ bounce_drain() >> } >> >> log_debug("debug: bounce: requesting new enqueue socket..."); >> - m_compose(p_pony, IMSG_QUEUE_SMTP_SESSION, 0, 0, -1, NULL, >> 0); >> + m_compose(p_dispatcher, IMSG_QUEUE_SMTP_SESSION, 0, 0, -1, >> NULL, 0); >> >> running += 1; >> } >> diff --git a/usr.sbin/smtpd/ca.c b/usr.sbin/smtpd/ca.c >> index fdc177e28b3..0299ee6cecc 100644 >> --- a/usr.sbin/smtpd/ca.c >> +++ b/usr.sbin/smtpd/ca.c >> @@ -110,10 +110,10 @@ ca(void) >> >> config_peer(PROC_CONTROL); >> config_peer(PROC_PARENT); >> - config_peer(PROC_PONY); >> + config_peer(PROC_DISPATCHER); >> >> /* Ignore them until we get our config */ >> - mproc_disable(p_pony); >> + mproc_disable(p_dispatcher); >> >> if (pledge("stdio", NULL) == -1) >> err(1, "pledge"); >> @@ -246,7 +246,7 @@ ca_imsg(struct mproc *p, struct imsg *imsg) >> ca_init(); >> >> /* Start fulfilling requests */ >> - mproc_enable(p_pony); >> + mproc_enable(p_dispatcher); >> return; >> >> case IMSG_CTL_VERBOSE: >> @@ -385,7 +385,7 @@ rsae_send_imsg(int flen, const unsigned char *from, >> unsigned char *to, >> if (n == 0) >> break; >> >> - log_imsg(PROC_PONY, PROC_CA, &imsg); >> + log_imsg(PROC_DISPATCHER, PROC_CA, &imsg); >> >> switch (imsg.hdr.type) { >> case IMSG_CA_RSA_PRIVENC: >> @@ -393,7 +393,7 @@ rsae_send_imsg(int flen, const unsigned char *from, >> unsigned char *to, >> break; >> default: >> /* Another imsg is queued up in the buffer */ >> - pony_imsg(p_ca, &imsg); >> + dispatcher_imsg(p_ca, &imsg); >> imsg_free(&imsg); >> continue; >> } >> @@ -569,14 +569,14 @@ ecdsae_send_enc_imsg(const unsigned char *dgst, int >> dgst_len, >> if (n == 0) >> break; >> >> - log_imsg(PROC_PONY, PROC_CA, &imsg); >> + log_imsg(PROC_DISPATCHER, PROC_CA, &imsg); >> >> switch (imsg.hdr.type) { >> case IMSG_CA_ECDSA_SIGN: >> break; >> default: >> /* Another imsg is queued up in the buffer */ >> - pony_imsg(p_ca, &imsg); >> + dispatcher_imsg(p_ca, &imsg); >> imsg_free(&imsg); >> continue; >> } >> diff --git a/usr.sbin/smtpd/config.c b/usr.sbin/smtpd/config.c >> index 529420ac0f2..2882349ceba 100644 >> --- a/usr.sbin/smtpd/config.c >> +++ b/usr.sbin/smtpd/config.c >> @@ -325,8 +325,8 @@ config_peer(enum smtp_proc_type proc) >> p = p_queue; >> else if (proc == PROC_SCHEDULER) >> p = p_scheduler; >> - else if (proc == PROC_PONY) >> - p = p_pony; >> + else if (proc == PROC_DISPATCHER) >> + p = p_dispatcher; >> else if (proc == PROC_CA) >> p = p_ca; >> else >> diff --git a/usr.sbin/smtpd/control.c b/usr.sbin/smtpd/control.c >> index 6ea52b62cfb..e9e19cd1870 100644 >> --- a/usr.sbin/smtpd/control.c >> +++ b/usr.sbin/smtpd/control.c >> @@ -248,7 +248,7 @@ control(void) >> config_peer(PROC_QUEUE); >> config_peer(PROC_PARENT); >> config_peer(PROC_LKA); >> - config_peer(PROC_PONY); >> + config_peer(PROC_DISPATCHER); >> config_peer(PROC_CA); >> >> control_listen(); >> @@ -450,7 +450,7 @@ control_dispatch_ext(struct mproc *p, struct imsg *imsg) >> m_compose(p, IMSG_CTL_FAIL, 0, 0, -1, NULL, 0); >> return; >> } >> - m_compose(p_pony, IMSG_CTL_SMTP_SESSION, c->id, 0, -1, >> + m_compose(p_dispatcher, IMSG_CTL_SMTP_SESSION, c->id, 0, -1, >> &c->euid, sizeof(c->euid)); >> return; >> >> @@ -597,7 +597,7 @@ control_dispatch_ext(struct mproc *p, struct imsg *imsg) >> } >> log_info("info: smtp paused"); >> env->sc_flags |= SMTPD_SMTP_PAUSED; >> - m_compose(p_pony, IMSG_CTL_PAUSE_SMTP, 0, 0, -1, NULL, 0); >> + m_compose(p_dispatcher, IMSG_CTL_PAUSE_SMTP, 0, 0, -1, NULL, >> 0); >> m_compose(p, IMSG_CTL_OK, 0, 0, -1, NULL, 0); >> return; >> >> @@ -647,7 +647,7 @@ control_dispatch_ext(struct mproc *p, struct imsg *imsg) >> } >> log_info("info: smtp resumed"); >> env->sc_flags &= ~SMTPD_SMTP_PAUSED; >> - m_forward(p_pony, imsg); >> + m_forward(p_dispatcher, imsg); >> m_compose(p, IMSG_CTL_OK, 0, 0, -1, NULL, 0); >> return; >> >> @@ -655,7 +655,7 @@ control_dispatch_ext(struct mproc *p, struct imsg *imsg) >> if (c->euid) >> goto badcred; >> >> - m_forward(p_pony, imsg); >> + m_forward(p_dispatcher, imsg); >> m_compose(p, IMSG_CTL_OK, 0, 0, -1, NULL, 0); >> return; >> >> @@ -682,7 +682,7 @@ control_dispatch_ext(struct mproc *p, struct imsg *imsg) >> goto badcred; >> >> imsg->hdr.peerid = c->id; >> - m_forward(p_pony, imsg); >> + m_forward(p_dispatcher, imsg); >> return; >> >> case IMSG_CTL_SHOW_STATUS: >> @@ -701,10 +701,10 @@ control_dispatch_ext(struct mproc *p, struct imsg >> *imsg) >> if (imsg->hdr.len - IMSG_HEADER_SIZE <= sizeof(ss)) >> goto invalid; >> memmove(&ss, imsg->data, sizeof(ss)); >> - m_create(p_pony, imsg->hdr.type, c->id, 0, -1); >> - m_add_sockaddr(p_pony, (struct sockaddr *)&ss); >> - m_add_string(p_pony, (char *)imsg->data + sizeof(ss)); >> - m_close(p_pony); >> + m_create(p_dispatcher, imsg->hdr.type, c->id, 0, -1); >> + m_add_sockaddr(p_dispatcher, (struct sockaddr *)&ss); >> + m_add_string(p_dispatcher, (char *)imsg->data + sizeof(ss)); >> + m_close(p_dispatcher); >> return; >> >> case IMSG_CTL_SCHEDULE: >> @@ -780,9 +780,9 @@ control_broadcast_verbose(int msg, int v) >> m_add_int(p_lka, v); >> m_close(p_lka); >> >> - m_create(p_pony, msg, 0, 0, -1); >> - m_add_int(p_pony, v); >> - m_close(p_pony); >> + m_create(p_dispatcher, msg, 0, 0, -1); >> + m_add_int(p_dispatcher, v); >> + m_close(p_dispatcher); >> >> m_create(p_queue, msg, 0, 0, -1); >> m_add_int(p_queue, v); >> diff --git a/usr.sbin/smtpd/lka.c b/usr.sbin/smtpd/lka.c >> index aa9f233536c..24a748e9de4 100644 >> --- a/usr.sbin/smtpd/lka.c >> +++ b/usr.sbin/smtpd/lka.c >> @@ -334,7 +334,7 @@ lka_imsg(struct mproc *p, struct imsg *imsg) >> >> case IMSG_LKA_AUTHENTICATE: >> imsg->hdr.type = IMSG_SMTP_AUTHENTICATE; >> - m_forward(p_pony, imsg); >> + m_forward(p_dispatcher, imsg); >> return; >> >> case IMSG_CTL_VERBOSE: >> @@ -701,10 +701,10 @@ lka(void) >> config_peer(PROC_PARENT); >> config_peer(PROC_QUEUE); >> config_peer(PROC_CONTROL); >> - config_peer(PROC_PONY); >> + config_peer(PROC_DISPATCHER); >> >> /* Ignore them until we get our config */ >> - mproc_disable(p_pony); >> + mproc_disable(p_dispatcher); >> >> lka_report_init(); >> lka_filter_init(); >> @@ -729,7 +729,7 @@ proc_timeout(int fd, short event, void *p) >> goto reset; >> >> lka_filter_ready(); >> - mproc_enable(p_pony); >> + mproc_enable(p_dispatcher); >> return; >> >> reset: >> diff --git a/usr.sbin/smtpd/lka_filter.c b/usr.sbin/smtpd/lka_filter.c >> index 9891e6140a3..6771d2fe8a6 100644 >> --- a/usr.sbin/smtpd/lka_filter.c >> +++ b/usr.sbin/smtpd/lka_filter.c >> @@ -558,10 +558,10 @@ lka_filter_data_begin(uint64_t reqid) >> io_set_callback(fs->io, filter_session_io, fs); >> >> end: >> - m_create(p_pony, IMSG_FILTER_SMTP_DATA_BEGIN, 0, 0, fd); >> - m_add_id(p_pony, reqid); >> - m_add_int(p_pony, fd != -1 ? 1 : 0); >> - m_close(p_pony); >> + m_create(p_dispatcher, IMSG_FILTER_SMTP_DATA_BEGIN, 0, 0, fd); >> + m_add_id(p_dispatcher, reqid); >> + m_add_int(p_dispatcher, fd != -1 ? 1 : 0); >> + m_close(p_dispatcher); >> log_trace(TRACE_FILTERS, "%016"PRIx64" filters data-begin fd=%d", reqid, fd); >> } >> >> @@ -985,49 +985,49 @@ filter_data_query(struct filter *filter, uint64_t >> token, uint64_t reqid, >> const c >> static void >> filter_result_proceed(uint64_t reqid) >> { >> - m_create(p_pony, IMSG_FILTER_SMTP_PROTOCOL, 0, 0, -1); >> - m_add_id(p_pony, reqid); >> - m_add_int(p_pony, FILTER_PROCEED); >> - m_close(p_pony); >> + m_create(p_dispatcher, IMSG_FILTER_SMTP_PROTOCOL, 0, 0, -1); >> + m_add_id(p_dispatcher, reqid); >> + m_add_int(p_dispatcher, FILTER_PROCEED); >> + m_close(p_dispatcher); >> } >> >> static void >> filter_result_junk(uint64_t reqid) >> { >> - m_create(p_pony, IMSG_FILTER_SMTP_PROTOCOL, 0, 0, -1); >> - m_add_id(p_pony, reqid); >> - m_add_int(p_pony, FILTER_JUNK); >> - m_close(p_pony); >> + m_create(p_dispatcher, IMSG_FILTER_SMTP_PROTOCOL, 0, 0, -1); >> + m_add_id(p_dispatcher, reqid); >> + m_add_int(p_dispatcher, FILTER_JUNK); >> + m_close(p_dispatcher); >> } >> >> static void >> filter_result_rewrite(uint64_t reqid, const char *param) >> { >> - m_create(p_pony, IMSG_FILTER_SMTP_PROTOCOL, 0, 0, -1); >> - m_add_id(p_pony, reqid); >> - m_add_int(p_pony, FILTER_REWRITE); >> - m_add_string(p_pony, param); >> - m_close(p_pony); >> + m_create(p_dispatcher, IMSG_FILTER_SMTP_PROTOCOL, 0, 0, -1); >> + m_add_id(p_dispatcher, reqid); >> + m_add_int(p_dispatcher, FILTER_REWRITE); >> + m_add_string(p_dispatcher, param); >> + m_close(p_dispatcher); >> } >> >> static void >> filter_result_reject(uint64_t reqid, const char *message) >> { >> - m_create(p_pony, IMSG_FILTER_SMTP_PROTOCOL, 0, 0, -1); >> - m_add_id(p_pony, reqid); >> - m_add_int(p_pony, FILTER_REJECT); >> - m_add_string(p_pony, message); >> - m_close(p_pony); >> + m_create(p_dispatcher, IMSG_FILTER_SMTP_PROTOCOL, 0, 0, -1); >> + m_add_id(p_dispatcher, reqid); >> + m_add_int(p_dispatcher, FILTER_REJECT); >> + m_add_string(p_dispatcher, message); >> + m_close(p_dispatcher); >> } >> >> static void >> filter_result_disconnect(uint64_t reqid, const char *message) >> { >> - m_create(p_pony, IMSG_FILTER_SMTP_PROTOCOL, 0, 0, -1); >> - m_add_id(p_pony, reqid); >> - m_add_int(p_pony, FILTER_DISCONNECT); >> - m_add_string(p_pony, message); >> - m_close(p_pony); >> + m_create(p_dispatcher, IMSG_FILTER_SMTP_PROTOCOL, 0, 0, -1); >> + m_add_id(p_dispatcher, reqid); >> + m_add_int(p_dispatcher, FILTER_DISCONNECT); >> + m_add_string(p_dispatcher, message); >> + m_close(p_dispatcher); >> } >> >> diff --git a/usr.sbin/smtpd/lka_session.c b/usr.sbin/smtpd/lka_session.c >> index ed1fd36fafd..4eb55c04689 100644 >> --- a/usr.sbin/smtpd/lka_session.c >> +++ b/usr.sbin/smtpd/lka_session.c >> @@ -215,20 +215,20 @@ lka_resume(struct lka_session *lks) >> } >> error: >> if (lks->error) { >> - m_create(p_pony, IMSG_SMTP_EXPAND_RCPT, 0, 0, -1); >> - m_add_id(p_pony, lks->id); >> - m_add_int(p_pony, lks->error); >> + m_create(p_dispatcher, IMSG_SMTP_EXPAND_RCPT, 0, 0, -1); >> + m_add_id(p_dispatcher, lks->id); >> + m_add_int(p_dispatcher, lks->error); >> >> if (lks->errormsg) >> - m_add_string(p_pony, lks->errormsg); >> + m_add_string(p_dispatcher, lks->errormsg); >> else { >> if (lks->error == LKA_PERMFAIL) >> - m_add_string(p_pony, "550 Invalid >> recipient"); >> + m_add_string(p_dispatcher, "550 Invalid >> recipient"); >> else if (lks->error == LKA_TEMPFAIL) >> - m_add_string(p_pony, "451 Temporary >> failure"); >> + m_add_string(p_dispatcher, "451 Temporary >> failure"); >> } >> >> - m_close(p_pony); >> + m_close(p_dispatcher); >> while ((ep = TAILQ_FIRST(&lks->deliverylist)) != NULL) { >> TAILQ_REMOVE(&lks->deliverylist, ep, entry); >> free(ep); >> diff --git a/usr.sbin/smtpd/parse.y b/usr.sbin/smtpd/parse.y >> index 9f1cb52ec98..b748fabd9ea 100644 >> --- a/usr.sbin/smtpd/parse.y >> +++ b/usr.sbin/smtpd/parse.y >> @@ -103,7 +103,7 @@ struct mta_limits *limits; >> static struct pki *pki; >> static struct ca *sca; >> >> -struct dispatcher *dispatcher; >> +struct dispatcher *dsp; >> struct rule *rule; >> struct filter_proc *processor; >> struct filter_config *filter_config; >> @@ -582,37 +582,37 @@ SRS KEY STRING { >> >> dispatcher_local_option: >> USER STRING { >> - if (dispatcher->u.local.is_mbox) { >> + if (dsp->u.local.is_mbox) { >> yyerror("user may not be specified for this dispatcher"); >> YYERROR; >> } >> >> - if (dispatcher->u.local.forward_only) { >> + if (dsp->u.local.forward_only) { >> yyerror("user may not be specified for forward-only"); >> YYERROR; >> } >> >> - if (dispatcher->u.local.expand_only) { >> + if (dsp->u.local.expand_only) { >> yyerror("user may not be specified for expand-only"); >> YYERROR; >> } >> >> - if (dispatcher->u.local.user) { >> + if (dsp->u.local.user) { >> yyerror("user already specified for this dispatcher"); >> YYERROR; >> } >> >> - dispatcher->u.local.user = $2; >> + dsp->u.local.user = $2; >> } >> | ALIAS tables { >> struct table *t = $2; >> >> - if (dispatcher->u.local.table_alias) { >> + if (dsp->u.local.table_alias) { >> yyerror("alias mapping already specified for this dispatcher"); >> YYERROR; >> } >> >> - if (dispatcher->u.local.table_virtual) { >> + if (dsp->u.local.table_virtual) { >> yyerror("virtual mapping already specified for this dispatcher"); >> YYERROR; >> } >> @@ -623,17 +623,17 @@ USER STRING { >> YYERROR; >> } >> >> - dispatcher->u.local.table_alias = strdup(t->t_name); >> + dsp->u.local.table_alias = strdup(t->t_name); >> } >> | VIRTUAL tables { >> struct table *t = $2; >> >> - if (dispatcher->u.local.table_virtual) { >> + if (dsp->u.local.table_virtual) { >> yyerror("virtual mapping already specified for this dispatcher"); >> YYERROR; >> } >> >> - if (dispatcher->u.local.table_alias) { >> + if (dsp->u.local.table_alias) { >> yyerror("alias mapping already specified for this dispatcher"); >> YYERROR; >> } >> @@ -644,12 +644,12 @@ USER STRING { >> YYERROR; >> } >> >> - dispatcher->u.local.table_virtual = strdup(t->t_name); >> + dsp->u.local.table_virtual = strdup(t->t_name); >> } >> | USERBASE tables { >> struct table *t = $2; >> >> - if (dispatcher->u.local.table_userbase) { >> + if (dsp->u.local.table_userbase) { >> yyerror("userbase mapping already specified for this dispatcher"); >> YYERROR; >> } >> @@ -660,14 +660,14 @@ USER STRING { >> YYERROR; >> } >> >> - dispatcher->u.local.table_userbase = strdup(t->t_name); >> + dsp->u.local.table_userbase = strdup(t->t_name); >> } >> | WRAPPER STRING { >> if (! dict_get(conf->sc_mda_wrappers, $2)) { >> yyerror("no mda wrapper with that name: %s", $2); >> YYERROR; >> } >> - dispatcher->u.local.mda_wrapper = $2; >> + dsp->u.local.mda_wrapper = $2; >> } >> ; >> >> @@ -678,67 +678,67 @@ dispatcher_local_option dispatcher_local_options >> >> dispatcher_local: >> MBOX { >> - dispatcher->u.local.is_mbox = 1; >> - asprintf(&dispatcher->u.local.command, "/usr/libexec/mail.local -f >> %%{mbox.from} -- >> %%{user.username}"); >> + dsp->u.local.is_mbox = 1; >> + asprintf(&dsp->u.local.command, "/usr/libexec/mail.local -f >> %%{mbox.from} -- >> %%{user.username}"); >> } dispatcher_local_options >> | MAILDIR { >> - asprintf(&dispatcher->u.local.command, "/usr/libexec/mail.maildir"); >> + asprintf(&dsp->u.local.command, "/usr/libexec/mail.maildir"); >> } dispatcher_local_options >> | MAILDIR JUNK { >> - asprintf(&dispatcher->u.local.command, "/usr/libexec/mail.maildir >> -j"); >> + asprintf(&dsp->u.local.command, "/usr/libexec/mail.maildir -j"); >> } dispatcher_local_options >> | MAILDIR STRING { >> if (strncmp($2, "~/", 2) == 0) >> - asprintf(&dispatcher->u.local.command, >> + asprintf(&dsp->u.local.command, >> "/usr/libexec/mail.maildir \"%%{user.directory}/%s\"", $2+2); >> else >> - asprintf(&dispatcher->u.local.command, >> + asprintf(&dsp->u.local.command, >> "/usr/libexec/mail.maildir \"%s\"", $2); >> } dispatcher_local_options >> | MAILDIR STRING JUNK { >> if (strncmp($2, "~/", 2) == 0) >> - asprintf(&dispatcher->u.local.command, >> + asprintf(&dsp->u.local.command, >> "/usr/libexec/mail.maildir -j \"%%{user.directory}/%s\"", $2+2); >> else >> - asprintf(&dispatcher->u.local.command, >> + asprintf(&dsp->u.local.command, >> "/usr/libexec/mail.maildir -j \"%s\"", $2); >> } dispatcher_local_options >> | LMTP STRING { >> - asprintf(&dispatcher->u.local.command, >> + asprintf(&dsp->u.local.command, >> "/usr/libexec/mail.lmtp -d %s -u", $2); >> - dispatcher->u.local.user = SMTPD_USER; >> + dsp->u.local.user = SMTPD_USER; >> } dispatcher_local_options >> | LMTP STRING RCPT_TO { >> - asprintf(&dispatcher->u.local.command, >> + asprintf(&dsp->u.local.command, >> "/usr/libexec/mail.lmtp -d %s -r", $2); >> - dispatcher->u.local.user = SMTPD_USER; >> + dsp->u.local.user = SMTPD_USER; >> } dispatcher_local_options >> | MDA STRING { >> - asprintf(&dispatcher->u.local.command, >> + asprintf(&dsp->u.local.command, >> "/usr/libexec/mail.mda \"%s\"", $2); >> } dispatcher_local_options >> | FORWARD_ONLY { >> - dispatcher->u.local.forward_only = 1; >> + dsp->u.local.forward_only = 1; >> } dispatcher_local_options >> | EXPAND_ONLY { >> - dispatcher->u.local.expand_only = 1; >> + dsp->u.local.expand_only = 1; >> } dispatcher_local_options >> >> ; >> >> dispatcher_remote_option: >> HELO STRING { >> - if (dispatcher->u.remote.helo) { >> + if (dsp->u.remote.helo) { >> yyerror("helo already specified for this dispatcher"); >> YYERROR; >> } >> >> - dispatcher->u.remote.helo = $2; >> + dsp->u.remote.helo = $2; >> } >> | HELO_SRC tables { >> struct table *t = $2; >> >> - if (dispatcher->u.remote.helo_source) { >> + if (dsp->u.remote.helo_source) { >> yyerror("helo-source mapping already specified for this dispatcher"); >> YYERROR; >> } >> @@ -748,28 +748,28 @@ HELO STRING { >> YYERROR; >> } >> >> - dispatcher->u.remote.helo_source = strdup(t->t_name); >> + dsp->u.remote.helo_source = strdup(t->t_name); >> } >> | PKI STRING { >> - if (dispatcher->u.remote.pki) { >> + if (dsp->u.remote.pki) { >> yyerror("pki already specified for this dispatcher"); >> YYERROR; >> } >> >> - dispatcher->u.remote.pki = $2; >> + dsp->u.remote.pki = $2; >> } >> | CA STRING { >> - if (dispatcher->u.remote.ca) { >> + if (dsp->u.remote.ca) { >> yyerror("ca already specified for this dispatcher"); >> YYERROR; >> } >> >> - dispatcher->u.remote.ca = $2; >> + dsp->u.remote.ca = $2; >> } >> | SRC tables { >> struct table *t = $2; >> >> - if (dispatcher->u.remote.source) { >> + if (dsp->u.remote.source) { >> yyerror("source mapping already specified for this dispatcher"); >> YYERROR; >> } >> @@ -780,49 +780,49 @@ HELO STRING { >> YYERROR; >> } >> >> - dispatcher->u.remote.source = strdup(t->t_name); >> + dsp->u.remote.source = strdup(t->t_name); >> } >> | MAIL_FROM STRING { >> - if (dispatcher->u.remote.mail_from) { >> + if (dsp->u.remote.mail_from) { >> yyerror("mail-from already specified for this dispatcher"); >> YYERROR; >> } >> >> - dispatcher->u.remote.mail_from = $2; >> + dsp->u.remote.mail_from = $2; >> } >> | BACKUP MX STRING { >> - if (dispatcher->u.remote.backup) { >> + if (dsp->u.remote.backup) { >> yyerror("backup already specified for this dispatcher"); >> YYERROR; >> } >> - if (dispatcher->u.remote.smarthost) { >> + if (dsp->u.remote.smarthost) { >> yyerror("backup and host are mutually exclusive"); >> YYERROR; >> } >> >> - dispatcher->u.remote.backup = 1; >> - dispatcher->u.remote.backupmx = $3; >> + dsp->u.remote.backup = 1; >> + dsp->u.remote.backupmx = $3; >> } >> | BACKUP { >> - if (dispatcher->u.remote.backup) { >> + if (dsp->u.remote.backup) { >> yyerror("backup already specified for this dispatcher"); >> YYERROR; >> } >> - if (dispatcher->u.remote.smarthost) { >> + if (dsp->u.remote.smarthost) { >> yyerror("backup and host are mutually exclusive"); >> YYERROR; >> } >> >> - dispatcher->u.remote.backup = 1; >> + dsp->u.remote.backup = 1; >> } >> | HOST tables { >> struct table *t = $2; >> >> - if (dispatcher->u.remote.smarthost) { >> + if (dsp->u.remote.smarthost) { >> yyerror("host mapping already specified for this dispatcher"); >> YYERROR; >> } >> - if (dispatcher->u.remote.backup) { >> + if (dsp->u.remote.backup) { >> yyerror("backup and host are mutually exclusive"); >> YYERROR; >> } >> @@ -833,16 +833,16 @@ HELO STRING { >> YYERROR; >> } >> >> - dispatcher->u.remote.smarthost = strdup(t->t_name); >> + dsp->u.remote.smarthost = strdup(t->t_name); >> } >> | DOMAIN tables { >> struct table *t = $2; >> >> - if (dispatcher->u.remote.smarthost) { >> + if (dsp->u.remote.smarthost) { >> yyerror("host mapping already specified for this dispatcher"); >> YYERROR; >> } >> - if (dispatcher->u.remote.backup) { >> + if (dsp->u.remote.backup) { >> yyerror("backup and domain are mutually exclusive"); >> YYERROR; >> } >> @@ -853,35 +853,35 @@ HELO STRING { >> YYERROR; >> } >> >> - dispatcher->u.remote.smarthost = strdup(t->t_name); >> - dispatcher->u.remote.smarthost_domain = 1; >> + dsp->u.remote.smarthost = strdup(t->t_name); >> + dsp->u.remote.smarthost_domain = 1; >> } >> | TLS { >> - if (dispatcher->u.remote.tls_required == 1) { >> + if (dsp->u.remote.tls_required == 1) { >> yyerror("tls already specified for this dispatcher"); >> YYERROR; >> } >> >> - dispatcher->u.remote.tls_required = 1; >> + dsp->u.remote.tls_required = 1; >> } >> | TLS NO_VERIFY { >> - if (dispatcher->u.remote.tls_required == 1) { >> + if (dsp->u.remote.tls_required == 1) { >> yyerror("tls already specified for this dispatcher"); >> YYERROR; >> } >> >> - dispatcher->u.remote.tls_required = 1; >> - dispatcher->u.remote.tls_noverify = 1; >> + dsp->u.remote.tls_required = 1; >> + dsp->u.remote.tls_noverify = 1; >> } >> | AUTH tables { >> struct table *t = $2; >> >> - if (dispatcher->u.remote.smarthost == NULL) { >> + if (dsp->u.remote.smarthost == NULL) { >> yyerror("auth may not be specified without host on a dispatcher"); >> YYERROR; >> } >> >> - if (dispatcher->u.remote.auth) { >> + if (dsp->u.remote.auth) { >> yyerror("auth mapping already specified for this dispatcher"); >> YYERROR; >> } >> @@ -892,12 +892,12 @@ HELO STRING { >> YYERROR; >> } >> >> - dispatcher->u.remote.auth = strdup(t->t_name); >> + dsp->u.remote.auth = strdup(t->t_name); >> } >> | FILTER STRING { >> struct filter_config *fc; >> >> - if (dispatcher->u.remote.filtername) { >> + if (dsp->u.remote.filtername) { >> yyerror("filter already specified for this dispatcher"); >> YYERROR; >> } >> @@ -908,13 +908,13 @@ HELO STRING { >> YYERROR; >> } >> fc->filter_subsystem |= FILTER_SUBSYSTEM_SMTP_OUT; >> - dispatcher->u.remote.filtername = $2; >> + dsp->u.remote.filtername = $2; >> } >> | FILTER { >> char buffer[128]; >> char *filtername; >> >> - if (dispatcher->u.remote.filtername) { >> + if (dsp->u.remote.filtername) { >> yyerror("filter already specified for this dispatcher"); >> YYERROR; >> } >> @@ -928,9 +928,9 @@ HELO STRING { >> filter_config->filter_type = FILTER_TYPE_CHAIN; >> filter_config->filter_subsystem |= FILTER_SUBSYSTEM_SMTP_OUT; >> dict_init(&filter_config->chain_procs); >> - dispatcher->u.remote.filtername = filtername; >> + dsp->u.remote.filtername = filtername; >> } '{' filter_list '}' { >> - dict_set(conf->sc_filters_dict, dispatcher->u.remote.filtername, >> filter_config); >> + dict_set(conf->sc_filters_dict, dsp->u.remote.filtername, >> filter_config); >> filter_config = NULL; >> } >> | SRS { >> @@ -938,12 +938,12 @@ HELO STRING { >> yyerror("an srs key is required for srs to be specified in an action"); >> YYERROR; >> } >> - if (dispatcher->u.remote.srs == 1) { >> + if (dsp->u.remote.srs == 1) { >> yyerror("srs already specified for this dispatcher"); >> YYERROR; >> } >> >> - dispatcher->u.remote.srs = 1; >> + dsp->u.remote.srs = 1; >> } >> ; >> >> @@ -958,22 +958,22 @@ RELAY dispatcher_remote_options >> >> dispatcher_type: >> dispatcher_local { >> - dispatcher->type = DISPATCHER_LOCAL; >> + dsp->type = DISPATCHER_LOCAL; >> } >> | dispatcher_remote { >> - dispatcher->type = DISPATCHER_REMOTE; >> + dsp->type = DISPATCHER_REMOTE; >> } >> ; >> >> dispatcher_option: >> TTL STRING { >> - if (dispatcher->ttl) { >> + if (dsp->ttl) { >> yyerror("ttl already specified for this dispatcher"); >> YYERROR; >> } >> >> - dispatcher->ttl = delaytonum($2); >> - if (dispatcher->ttl == -1) { >> + dsp->ttl = delaytonum($2); >> + if (dsp->ttl == -1) { >> yyerror("ttl delay \"%s\" is invalid", $2); >> free($2); >> YYERROR; >> @@ -993,13 +993,13 @@ ACTION STRING { >> yyerror("dispatcher already declared with that name: %s", $2); >> YYERROR; >> } >> - dispatcher = xcalloc(1, sizeof *dispatcher); >> + dsp = xcalloc(1, sizeof *dsp); >> } dispatcher_type dispatcher_options { >> - if (dispatcher->type == DISPATCHER_LOCAL) >> - if (dispatcher->u.local.table_userbase == NULL) >> - dispatcher->u.local.table_userbase = "<getpwnam>"; >> - dict_set(conf->sc_dispatchers, $2, dispatcher); >> - dispatcher = NULL; >> + if (dsp->type == DISPATCHER_LOCAL) >> + if (dsp->u.local.table_userbase == NULL) >> + dsp->u.local.table_userbase = "<getpwnam>"; >> + dict_set(conf->sc_dispatchers, $2, dsp); >> + dsp = NULL; >> } >> ; >> >> diff --git a/usr.sbin/smtpd/pony.c b/usr.sbin/smtpd/pony.c >> index 026d647307a..d533179a5df 100644 >> --- a/usr.sbin/smtpd/pony.c >> +++ b/usr.sbin/smtpd/pony.c >> @@ -44,16 +44,16 @@ void mda_imsg(struct mproc *, struct imsg *); >> void mta_imsg(struct mproc *, struct imsg *); >> void smtp_imsg(struct mproc *, struct imsg *); >> >> -static void pony_shutdown(void); >> +static void dispatcher_shutdown(void); >> >> void >> -pony_imsg(struct mproc *p, struct imsg *imsg) >> +dispatcher_imsg(struct mproc *p, struct imsg *imsg) >> { >> struct msg m; >> int v; >> >> if (imsg == NULL) >> - pony_shutdown(); >> + dispatcher_shutdown(); >> >> switch (imsg->hdr.type) { >> >> @@ -143,14 +143,14 @@ pony_imsg(struct mproc *p, struct imsg *imsg) >> } >> >> static void >> -pony_shutdown(void) >> +dispatcher_shutdown(void) >> { >> - log_debug("debug: pony agent exiting"); >> + log_debug("debug: dispatcher agent exiting"); >> _exit(0); >> } >> >> int >> -pony(void) >> +dispatcher(void) >> { >> struct passwd *pw; >> >> @@ -167,18 +167,18 @@ pony(void) >> fatalx("unknown user " SMTPD_USER); >> >> if (chroot(PATH_CHROOT) == -1) >> - fatal("pony: chroot"); >> + fatal("dispatcher: chroot"); >> if (chdir("/") == -1) >> - fatal("pony: chdir(\"/\")"); >> + fatal("dispatcher: chdir(\"/\")"); >> >> - config_process(PROC_PONY); >> + config_process(PROC_DISPATCHER); >> >> if (setgroups(1, &pw->pw_gid) || >> setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) || >> setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid)) >> - fatal("pony: cannot drop privileges"); >> + fatal("dispatcher: cannot drop privileges"); >> >> - imsg_callback = pony_imsg; >> + imsg_callback = dispatcher_imsg; >> event_init(); >> >> mda_postprivdrop(); >> diff --git a/usr.sbin/smtpd/queue.c b/usr.sbin/smtpd/queue.c >> index 3739fe22750..0a621709764 100644 >> --- a/usr.sbin/smtpd/queue.c >> +++ b/usr.sbin/smtpd/queue.c >> @@ -152,15 +152,15 @@ queue_imsg(struct mproc *p, struct imsg *imsg) >> log_warnx("warn: imsg_queue_submit_envelope: msgid=0, " >> "evpid=%016"PRIx64, evp.id); >> ret = queue_envelope_create(&evp); >> - m_create(p_pony, IMSG_QUEUE_ENVELOPE_SUBMIT, 0, 0, -1); >> - m_add_id(p_pony, reqid); >> + m_create(p_dispatcher, IMSG_QUEUE_ENVELOPE_SUBMIT, 0, 0, -1); >> + m_add_id(p_dispatcher, reqid); >> if (ret == 0) >> - m_add_int(p_pony, 0); >> + m_add_int(p_dispatcher, 0); >> else { >> - m_add_int(p_pony, 1); >> - m_add_evpid(p_pony, evp.id); >> + m_add_int(p_dispatcher, 1); >> + m_add_evpid(p_dispatcher, evp.id); >> } >> - m_close(p_pony); >> + m_close(p_dispatcher); >> if (ret) { >> m_create(p_scheduler, >> IMSG_QUEUE_ENVELOPE_SUBMIT, 0, 0, -1); >> @@ -173,10 +173,10 @@ queue_imsg(struct mproc *p, struct imsg *imsg) >> m_msg(&m, imsg); >> m_get_id(&m, &reqid); >> m_end(&m); >> - m_create(p_pony, IMSG_QUEUE_ENVELOPE_COMMIT, 0, 0, -1); >> - m_add_id(p_pony, reqid); >> - m_add_int(p_pony, 1); >> - m_close(p_pony); >> + m_create(p_dispatcher, IMSG_QUEUE_ENVELOPE_COMMIT, 0, 0, -1); >> + m_add_id(p_dispatcher, reqid); >> + m_add_int(p_dispatcher, 1); >> + m_close(p_dispatcher); >> return; >> >> case IMSG_SCHED_ENVELOPE_REMOVE: >> @@ -250,9 +250,9 @@ queue_imsg(struct mproc *p, struct imsg *imsg) >> return; >> } >> evp.lasttry = time(NULL); >> - m_create(p_pony, IMSG_QUEUE_DELIVER, 0, 0, -1); >> - m_add_envelope(p_pony, &evp); >> - m_close(p_pony); >> + m_create(p_dispatcher, IMSG_QUEUE_DELIVER, 0, 0, -1); >> + m_add_envelope(p_dispatcher, &evp); >> + m_close(p_dispatcher); >> return; >> >> case IMSG_SCHED_ENVELOPE_INJECT: >> @@ -275,9 +275,9 @@ queue_imsg(struct mproc *p, struct imsg *imsg) >> return; >> } >> evp.lasttry = time(NULL); >> - m_create(p_pony, IMSG_QUEUE_TRANSFER, 0, 0, -1); >> - m_add_envelope(p_pony, &evp); >> - m_close(p_pony); >> + m_create(p_dispatcher, IMSG_QUEUE_TRANSFER, 0, 0, -1); >> + m_add_envelope(p_dispatcher, &evp); >> + m_close(p_dispatcher); >> return; >> >> case IMSG_CTL_LIST_ENVELOPES: >> @@ -665,7 +665,7 @@ queue(void) >> config_peer(PROC_CONTROL); >> config_peer(PROC_LKA); >> config_peer(PROC_SCHEDULER); >> - config_peer(PROC_PONY); >> + config_peer(PROC_DISPATCHER); >> >> /* setup queue loading task */ >> evtimer_set(&ev_qload, queue_timeout, &ev_qload); >> diff --git a/usr.sbin/smtpd/smtpd.c b/usr.sbin/smtpd/smtpd.c >> index 854c2ab0cb6..f15411757ee 100644 >> --- a/usr.sbin/smtpd/smtpd.c >> +++ b/usr.sbin/smtpd/smtpd.c >> @@ -66,7 +66,7 @@ static int smtpd(void); >> static void parent_shutdown(void); >> static void parent_send_config(int, short, void *); >> static void parent_send_config_lka(void); >> -static void parent_send_config_pony(void); >> +static void parent_send_config_dispatcher(void); >> static void parent_send_config_ca(void); >> static void parent_sig_handler(int, short, void *); >> static void forkmda(struct mproc *, uint64_t, struct deliver *); >> @@ -140,7 +140,7 @@ struct mproc *p_lka = NULL; >> struct mproc *p_parent = NULL; >> struct mproc *p_queue = NULL; >> struct mproc *p_scheduler = NULL; >> -struct mproc *p_pony = NULL; >> +struct mproc *p_dispatcher = NULL; >> struct mproc *p_ca = NULL; >> >> const char *backend_queue = "fs"; >> @@ -289,7 +289,7 @@ parent_shutdown(void) >> pid_t pid; >> >> mproc_clear(p_ca); >> - mproc_clear(p_pony); >> + mproc_clear(p_dispatcher); >> mproc_clear(p_control); >> mproc_clear(p_lka); >> mproc_clear(p_scheduler); >> @@ -309,17 +309,17 @@ static void >> parent_send_config(int fd, short event, void *p) >> { >> parent_send_config_lka(); >> - parent_send_config_pony(); >> + parent_send_config_dispatcher(); >> parent_send_config_ca(); >> purge_config(PURGE_PKI); >> } >> >> static void >> -parent_send_config_pony(void) >> +parent_send_config_dispatcher(void) >> { >> - log_debug("debug: parent_send_config: configuring pony process"); >> - m_compose(p_pony, IMSG_CONF_START, 0, 0, -1, NULL, 0); >> - m_compose(p_pony, IMSG_CONF_END, 0, 0, -1, NULL, 0); >> + log_debug("debug: parent_send_config: configuring dispatcher >> process"); >> + m_compose(p_dispatcher, IMSG_CONF_START, 0, 0, -1, NULL, 0); >> + m_compose(p_dispatcher, IMSG_CONF_END, 0, 0, -1, NULL, 0); >> } >> >> void >> @@ -437,13 +437,13 @@ parent_sig_handler(int sig, short event, void *p) >> "for session %016"PRIx64 ": %s", >> child->mda_id, cause); >> >> - m_create(p_pony, IMSG_MDA_DONE, 0, 0, >> + m_create(p_dispatcher, IMSG_MDA_DONE, 0, 0, >> child->mda_out); >> - m_add_id(p_pony, child->mda_id); >> - m_add_int(p_pony, mda_status); >> - m_add_int(p_pony, mda_sysexit); >> - m_add_string(p_pony, cause); >> - m_close(p_pony); >> + m_add_id(p_dispatcher, child->mda_id); >> + m_add_int(p_dispatcher, mda_status); >> + m_add_int(p_dispatcher, mda_sysexit); >> + m_add_string(p_dispatcher, cause); >> + m_close(p_dispatcher); >> >> break; >> >> @@ -698,8 +698,8 @@ main(int argc, char *argv[]) >> p_lka = start_child(save_argc, save_argv, "lka"); >> p_lka->proc = PROC_LKA; >> >> - p_pony = start_child(save_argc, save_argv, "pony"); >> - p_pony->proc = PROC_PONY; >> + p_dispatcher = start_child(save_argc, save_argv, >> "dispatcher"); >> + p_dispatcher->proc = PROC_DISPATCHER; >> >> p_queue = start_child(save_argc, save_argv, "queue"); >> p_queue->proc = PROC_QUEUE; >> @@ -709,12 +709,12 @@ main(int argc, char *argv[]) >> >> setup_peers(p_control, p_ca); >> setup_peers(p_control, p_lka); >> - setup_peers(p_control, p_pony); >> + setup_peers(p_control, p_dispatcher); >> setup_peers(p_control, p_queue); >> setup_peers(p_control, p_scheduler); >> - setup_peers(p_pony, p_ca); >> - setup_peers(p_pony, p_lka); >> - setup_peers(p_pony, p_queue); >> + setup_peers(p_dispatcher, p_ca); >> + setup_peers(p_dispatcher, p_lka); >> + setup_peers(p_dispatcher, p_queue); >> setup_peers(p_queue, p_lka); >> setup_peers(p_queue, p_scheduler); >> >> @@ -730,7 +730,7 @@ main(int argc, char *argv[]) >> setup_done(p_ca); >> setup_done(p_control); >> setup_done(p_lka); >> - setup_done(p_pony); >> + setup_done(p_dispatcher); >> setup_done(p_queue); >> setup_done(p_scheduler); >> >> @@ -767,11 +767,11 @@ main(int argc, char *argv[]) >> return lka(); >> } >> >> - else if (!strcmp(rexec, "pony")) { >> - smtpd_process = PROC_PONY; >> + else if (!strcmp(rexec, "dispatcher")) { >> + smtpd_process = PROC_DISPATCHER; >> setup_proc(); >> >> - return pony(); >> + return dispatcher(); >> } >> >> else if (!strcmp(rexec, "queue")) { >> @@ -978,8 +978,8 @@ setup_peer(enum smtp_proc_type proc, pid_t pid, int sock) >> case PROC_SCHEDULER: >> pp = &p_scheduler; >> break; >> - case PROC_PONY: >> - pp = &p_pony; >> + case PROC_DISPATCHER: >> + pp = &p_dispatcher; >> break; >> case PROC_CA: >> pp = &p_ca; >> @@ -1050,7 +1050,7 @@ smtpd(void) { >> child_add(p_control->pid, CHILD_DAEMON, proc_title(PROC_CONTROL)); >> child_add(p_lka->pid, CHILD_DAEMON, proc_title(PROC_LKA)); >> child_add(p_scheduler->pid, CHILD_DAEMON, proc_title(PROC_SCHEDULER)); >> - child_add(p_pony->pid, CHILD_DAEMON, proc_title(PROC_PONY)); >> + child_add(p_dispatcher->pid, CHILD_DAEMON, >> proc_title(PROC_DISPATCHER)); >> child_add(p_ca->pid, CHILD_DAEMON, proc_title(PROC_CA)); >> >> event_init(); >> @@ -1069,7 +1069,7 @@ smtpd(void) { >> config_peer(PROC_LKA); >> config_peer(PROC_QUEUE); >> config_peer(PROC_CA); >> - config_peer(PROC_PONY); >> + config_peer(PROC_DISPATCHER); >> >> evtimer_set(&config_ev, parent_send_config, NULL); >> memset(&tv, 0, sizeof(tv)); >> @@ -1421,12 +1421,12 @@ forkmda(struct mproc *p, uint64_t id, struct deliver >> *deliver) >> (void)snprintf(ebuf, sizeof ebuf, >> "delivery user '%s' does not exist", >> dsp->u.local.user); >> - m_create(p_pony, IMSG_MDA_DONE, 0, 0, -1); >> - m_add_id(p_pony, id); >> - m_add_int(p_pony, MDA_PERMFAIL); >> - m_add_int(p_pony, EX_NOUSER); >> - m_add_string(p_pony, ebuf); >> - m_close(p_pony); >> + m_create(p_dispatcher, IMSG_MDA_DONE, 0, 0, -1); >> + m_add_id(p_dispatcher, id); >> + m_add_int(p_dispatcher, MDA_PERMFAIL); >> + m_add_int(p_dispatcher, EX_NOUSER); >> + m_add_string(p_dispatcher, ebuf); >> + m_close(p_dispatcher); >> return; >> } >> pw_name = pw->pw_name; >> @@ -1451,23 +1451,23 @@ forkmda(struct mproc *p, uint64_t id, struct deliver >> *deliver) >> if (pw_uid == 0 && !dsp->u.local.is_mbox) { >> (void)snprintf(ebuf, sizeof ebuf, "not allowed to deliver to: %s", >> deliver->userinfo.username); >> - m_create(p_pony, IMSG_MDA_DONE, 0, 0, -1); >> - m_add_id(p_pony, id); >> - m_add_int(p_pony, MDA_PERMFAIL); >> - m_add_int(p_pony, EX_NOPERM); >> - m_add_string(p_pony, ebuf); >> - m_close(p_pony); >> + m_create(p_dispatcher, IMSG_MDA_DONE, 0, 0, -1); >> + m_add_id(p_dispatcher, id); >> + m_add_int(p_dispatcher, MDA_PERMFAIL); >> + m_add_int(p_dispatcher, EX_NOPERM); >> + m_add_string(p_dispatcher, ebuf); >> + m_close(p_dispatcher); >> return; >> } >> >> if (pipe(pipefd) == -1) { >> (void)snprintf(ebuf, sizeof ebuf, "pipe: %s", strerror(errno)); >> - m_create(p_pony, IMSG_MDA_DONE, 0, 0, -1); >> - m_add_id(p_pony, id); >> - m_add_int(p_pony, MDA_TEMPFAIL); >> - m_add_int(p_pony, EX_OSERR); >> - m_add_string(p_pony, ebuf); >> - m_close(p_pony); >> + m_create(p_dispatcher, IMSG_MDA_DONE, 0, 0, -1); >> + m_add_id(p_dispatcher, id); >> + m_add_int(p_dispatcher, MDA_TEMPFAIL); >> + m_add_int(p_dispatcher, EX_OSERR); >> + m_add_string(p_dispatcher, ebuf); >> + m_close(p_dispatcher); >> return; >> } >> >> @@ -1476,12 +1476,12 @@ forkmda(struct mproc *p, uint64_t id, struct deliver >> *deliver) >> allout = mkstemp(sfn); >> if (allout == -1) { >> (void)snprintf(ebuf, sizeof ebuf, "mkstemp: %s", strerror(errno)); >> - m_create(p_pony, IMSG_MDA_DONE, 0, 0, -1); >> - m_add_id(p_pony, id); >> - m_add_int(p_pony, MDA_TEMPFAIL); >> - m_add_int(p_pony, EX_OSERR); >> - m_add_string(p_pony, ebuf); >> - m_close(p_pony); >> + m_create(p_dispatcher, IMSG_MDA_DONE, 0, 0, -1); >> + m_add_id(p_dispatcher, id); >> + m_add_int(p_dispatcher, MDA_TEMPFAIL); >> + m_add_int(p_dispatcher, EX_OSERR); >> + m_add_string(p_dispatcher, ebuf); >> + m_close(p_dispatcher); >> close(pipefd[0]); >> close(pipefd[1]); >> return; >> @@ -1491,12 +1491,12 @@ forkmda(struct mproc *p, uint64_t id, struct deliver >> *deliver) >> pid = fork(); >> if (pid == -1) { >> (void)snprintf(ebuf, sizeof ebuf, "fork: %s", strerror(errno)); >> - m_create(p_pony, IMSG_MDA_DONE, 0, 0, -1); >> - m_add_id(p_pony, id); >> - m_add_int(p_pony, MDA_TEMPFAIL); >> - m_add_int(p_pony, EX_OSERR); >> - m_add_string(p_pony, ebuf); >> - m_close(p_pony); >> + m_create(p_dispatcher, IMSG_MDA_DONE, 0, 0, -1); >> + m_add_id(p_dispatcher, id); >> + m_add_int(p_dispatcher, MDA_TEMPFAIL); >> + m_add_int(p_dispatcher, EX_OSERR); >> + m_add_string(p_dispatcher, ebuf); >> + m_close(p_dispatcher); >> close(pipefd[0]); >> close(pipefd[1]); >> close(allout); >> @@ -1912,10 +1912,10 @@ proc_title(enum smtp_proc_type proc) >> return "control"; >> case PROC_SCHEDULER: >> return "scheduler"; >> - case PROC_PONY: >> - return "pony express"; >> + case PROC_DISPATCHER: >> + return "dispatcher"; >> case PROC_CA: >> - return "klondike"; >> + return "crypto"; >> case PROC_CLIENT: >> return "client"; >> case PROC_PROCESSOR: >> @@ -1938,8 +1938,8 @@ proc_name(enum smtp_proc_type proc) >> return "control"; >> case PROC_SCHEDULER: >> return "scheduler"; >> - case PROC_PONY: >> - return "pony"; >> + case PROC_DISPATCHER: >> + return "dispatcher"; >> case PROC_CA: >> return "ca"; >> case PROC_CLIENT: >> diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h >> index 529ff683f76..36c85eb2c18 100644 >> --- a/usr.sbin/smtpd/smtpd.h >> +++ b/usr.sbin/smtpd/smtpd.h >> @@ -345,7 +345,7 @@ enum smtp_proc_type { >> PROC_QUEUE, >> PROC_CONTROL, >> PROC_SCHEDULER, >> - PROC_PONY, >> + PROC_DISPATCHER, >> PROC_CA, >> PROC_PROCESSOR, >> PROC_CLIENT, >> @@ -1007,7 +1007,7 @@ extern struct mproc *p_parent; >> extern struct mproc *p_lka; >> extern struct mproc *p_queue; >> extern struct mproc *p_scheduler; >> -extern struct mproc *p_pony; >> +extern struct mproc *p_dispatcher; >> extern struct mproc *p_ca; >> >> extern struct smtpd *env; >> @@ -1580,8 +1580,8 @@ void scheduler_info(struct scheduler_info *, struct >> envelope *); >> >> /* pony.c */ >> -int pony(void); >> -void pony_imsg(struct mproc *, struct imsg *); >> +int dispatcher(void); >> +void dispatcher_imsg(struct mproc *, struct imsg *); >> >> /* resolver.c */
