diff options
author | Gilles Chehade <gilles@dalenys.com> | 2016-02-13 13:11:36 +0100 |
---|---|---|
committer | Gilles Chehade <gilles@dalenys.com> | 2016-02-13 13:11:36 +0100 |
commit | aa512515dc851e840ee907ec41b64829658667b1 (patch) | |
tree | 51941b69cb446870c1b21543887f5ec265f6e0f5 | |
parent | kill support for 'dbm' db type, it has never worked, it cannot work (diff) | |
download | OpenSMTPD-opensmtpd-201602131612.tar.xz OpenSMTPD-opensmtpd-201602131612.zip |
remove dead codeopensmtpd-201602131612
-rw-r--r-- | smtpd/CVS/Entries | 176 | ||||
-rw-r--r-- | smtpd/smtp.c | 19 |
2 files changed, 94 insertions, 101 deletions
diff --git a/smtpd/CVS/Entries b/smtpd/CVS/Entries index b9dc442d..ff26ab24 100644 --- a/smtpd/CVS/Entries +++ b/smtpd/CVS/Entries @@ -1,90 +1,90 @@ D/smtpctl//// D/smtpd//// -/Makefile/1.15/Thu Feb 4 22:09:08 2016// -/aliases.5/1.12/Thu Feb 4 22:09:08 2016// -/aliases.c/1.69/Thu Feb 4 22:54:04 2016// -/bounce.c/1.72/Thu Feb 4 22:54:04 2016// -/ca.c/1.21/Thu Feb 4 22:54:04 2016// -/compress_backend.c/1.9/Thu Feb 4 22:54:04 2016// -/compress_gzip.c/1.10/Thu Feb 4 22:54:04 2016// -/config.c/1.33/Thu Feb 4 22:54:04 2016// -/control.c/1.111/Tue Feb 9 21:32:42 2016// -/crypto.c/1.5/Thu Feb 4 22:54:04 2016// -/delivery.c/1.6/Thu Feb 4 22:54:04 2016// -/delivery_filename.c/1.14/Thu Feb 4 22:54:04 2016// -/delivery_lmtp.c/1.15/Thu Feb 4 22:54:04 2016// -/delivery_maildir.c/1.17/Thu Feb 4 22:54:04 2016// -/delivery_mbox.c/1.12/Thu Feb 4 22:54:04 2016// -/delivery_mda.c/1.9/Thu Feb 4 22:54:04 2016// -/dict.c/1.5/Thu Feb 4 22:54:04 2016// -/dns.c/1.83/Thu Feb 4 22:54:04 2016// -/enqueue.c/1.112/Thu Feb 4 22:54:04 2016// -/envelope.c/1.36/Thu Feb 4 22:54:04 2016// -/esc.c/1.4/Thu Feb 4 22:54:04 2016// -/expand.c/1.29/Thu Feb 4 22:54:04 2016// -/filter.c/1.16/Thu Feb 4 22:54:04 2016// -/forward.5/1.9/Thu Feb 4 22:09:08 2016// -/forward.c/1.39/Thu Feb 4 22:54:04 2016// -/iobuf.c/1.9/Thu Feb 4 22:54:04 2016// -/iobuf.h/1.4/Thu Feb 4 22:09:08 2016// -/ioev.c/1.24/Thu Feb 4 22:54:04 2016// -/ioev.h/1.5/Thu Feb 4 22:09:08 2016// -/limit.c/1.4/Thu Feb 4 22:54:04 2016// -/lka.c/1.192/Thu Feb 4 22:54:04 2016// -/lka_session.c/1.79/Thu Feb 4 22:54:04 2016// -/log.c/1.17/Thu Feb 4 22:54:04 2016// -/log.h/1.5/Thu Feb 4 22:54:04 2016// -/mailaddr.c/1.2/Thu Feb 4 22:54:04 2016// -/makemap.8/1.29/Sat Feb 13 08:55:01 2016// -/makemap.c/1.64/Sat Feb 13 08:55:01 2016// -/mda.c/1.117/Thu Feb 4 22:54:04 2016// -/mproc.c/1.18/Sat Feb 13 08:54:29 2016// -/mta.c/1.200/Thu Feb 4 22:54:04 2016// -/mta_session.c/1.82/Thu Feb 4 22:54:04 2016// -/newaliases.8/1.11/Thu Feb 4 22:09:08 2016// -/parse.y/1.181/Thu Feb 4 22:54:04 2016// -/parser.c/1.40/Thu Feb 4 22:54:04 2016// -/parser.h/1.29/Thu Feb 4 22:09:08 2016// -/pony.c/1.12/Thu Feb 4 22:54:04 2016// -/queue.c/1.176/Tue Feb 9 23:11:38 2016// -/queue_backend.c/1.62/Thu Feb 4 22:54:04 2016// -/queue_fs.c/1.14/Thu Feb 4 22:54:04 2016// -/queue_null.c/1.6/Thu Feb 4 22:54:04 2016// -/queue_proc.c/1.6/Thu Feb 4 22:54:04 2016// -/queue_ram.c/1.7/Thu Feb 4 22:54:04 2016// -/rfc2822.c/1.7/Thu Feb 4 22:54:04 2016// -/rfc2822.h/1.4/Thu Feb 4 22:09:08 2016// -/ruleset.c/1.32/Thu Feb 4 22:54:04 2016// -/runq.c/1.2/Thu Feb 4 22:54:04 2016// -/scheduler.c/1.51/Thu Feb 4 22:54:04 2016// -/scheduler_backend.c/1.15/Thu Feb 4 22:54:04 2016// -/scheduler_null.c/1.9/Thu Feb 4 22:54:04 2016// -/scheduler_proc.c/1.8/Thu Feb 4 22:54:04 2016// -/scheduler_ramqueue.c/1.42/Thu Feb 4 22:54:04 2016// -/sendmail.8/1.4/Thu Feb 4 22:09:08 2016// -/smtp.c/1.152/Thu Feb 4 22:54:04 2016// -/smtp_session.c/1.268/Tue Feb 9 21:32:42 2016// -/smtpctl.8/1.54/Thu Feb 4 22:09:08 2016// -/smtpctl.c/1.147/Sat Feb 13 08:54:29 2016// -/smtpd-api.h/1.29/Sat Feb 13 08:54:29 2016// -/smtpd-defines.h/1.6/Thu Feb 4 22:54:04 2016// -/smtpd.8/1.28/Thu Feb 4 22:09:08 2016// -/smtpd.c/1.274/Tue Feb 9 21:32:42 2016// -/smtpd.conf.5/1.153/Thu Feb 4 22:54:04 2016// -/smtpd.h/1.511/Tue Feb 9 21:32:42 2016// -/ssl.c/1.85/Thu Feb 4 22:54:04 2016// -/ssl.h/1.19/Thu Feb 4 22:09:08 2016// -/ssl_smtpd.c/1.13/Thu Feb 4 22:54:04 2016// -/stat_backend.c/1.10/Thu Feb 4 22:54:04 2016// -/stat_ramstat.c/1.10/Thu Feb 4 22:54:04 2016// -/table.5/1.5/Thu Feb 4 22:09:08 2016// -/table.c/1.23/Thu Feb 4 22:54:04 2016// -/table_api.c/1.8/Thu Feb 4 22:54:04 2016// -/table_db.c/1.9/Thu Feb 4 22:54:04 2016// -/table_getpwnam.c/1.4/Thu Feb 4 22:54:04 2016// -/table_proc.c/1.6/Thu Feb 4 22:54:04 2016// -/table_static.c/1.15/Thu Feb 4 22:54:04 2016// -/to.c/1.24/Thu Feb 4 22:54:04 2016// -/tree.c/1.5/Thu Feb 4 22:54:04 2016// -/util.c/1.125/Thu Feb 4 22:54:04 2016// -/waitq.c/1.5/Thu Feb 4 22:54:04 2016// +/Makefile/1.15/Wed Feb 3 12:14:44 2016// +/aliases.5/1.12/Wed Feb 3 12:14:44 2016// +/aliases.c/1.69/Sat Feb 13 12:11:11 2016// +/bounce.c/1.72/Sat Feb 13 12:11:11 2016// +/ca.c/1.21/Sat Feb 13 12:11:11 2016// +/compress_backend.c/1.9/Sat Feb 13 12:11:11 2016// +/compress_gzip.c/1.10/Sat Feb 13 12:11:11 2016// +/config.c/1.33/Sat Feb 13 12:11:11 2016// +/control.c/1.111/Sat Feb 13 12:11:11 2016// +/crypto.c/1.5/Sat Feb 13 12:11:11 2016// +/delivery.c/1.6/Sat Feb 13 12:11:11 2016// +/delivery_filename.c/1.14/Sat Feb 13 12:11:11 2016// +/delivery_lmtp.c/1.15/Sat Feb 13 12:11:11 2016// +/delivery_maildir.c/1.17/Sat Feb 13 12:11:11 2016// +/delivery_mbox.c/1.12/Sat Feb 13 12:11:11 2016// +/delivery_mda.c/1.9/Sat Feb 13 12:11:11 2016// +/dict.c/1.5/Sat Feb 13 12:11:11 2016// +/dns.c/1.83/Sat Feb 13 12:11:11 2016// +/enqueue.c/1.112/Sat Feb 13 12:11:11 2016// +/envelope.c/1.36/Sat Feb 13 12:11:11 2016// +/esc.c/1.4/Sat Feb 13 12:11:11 2016// +/expand.c/1.29/Sat Feb 13 12:11:11 2016// +/filter.c/1.16/Sat Feb 13 12:11:11 2016// +/forward.5/1.9/Wed Feb 3 12:14:44 2016// +/forward.c/1.39/Sat Feb 13 12:11:11 2016// +/iobuf.c/1.9/Sat Feb 13 12:11:11 2016// +/iobuf.h/1.4/Wed Feb 3 12:14:44 2016// +/ioev.c/1.24/Sat Feb 13 12:11:11 2016// +/ioev.h/1.5/Wed Feb 3 12:14:44 2016// +/limit.c/1.4/Sat Feb 13 12:11:11 2016// +/lka.c/1.192/Sat Feb 13 12:11:11 2016// +/lka_session.c/1.79/Sat Feb 13 12:11:11 2016// +/log.c/1.17/Sat Feb 13 12:11:11 2016// +/log.h/1.5/Sat Feb 13 12:11:11 2016// +/mailaddr.c/1.2/Sat Feb 13 12:11:11 2016// +/makemap.8/1.29/Sat Feb 13 12:11:14 2016// +/makemap.c/1.64/Sat Feb 13 12:11:14 2016// +/mda.c/1.117/Sat Feb 13 12:11:11 2016// +/mproc.c/1.18/Sat Feb 13 12:11:11 2016// +/mta.c/1.200/Sat Feb 13 12:11:11 2016// +/mta_session.c/1.82/Sat Feb 13 12:11:11 2016// +/newaliases.8/1.11/Wed Feb 3 12:14:44 2016// +/parse.y/1.181/Sat Feb 13 12:11:11 2016// +/parser.c/1.40/Sat Feb 13 12:11:11 2016// +/parser.h/1.29/Wed Feb 3 12:14:44 2016// +/pony.c/1.12/Sat Feb 13 12:11:11 2016// +/queue.c/1.176/Sat Feb 13 12:11:11 2016// +/queue_backend.c/1.62/Sat Feb 13 12:11:11 2016// +/queue_fs.c/1.14/Sat Feb 13 12:11:11 2016// +/queue_null.c/1.6/Sat Feb 13 12:11:11 2016// +/queue_proc.c/1.6/Sat Feb 13 12:11:11 2016// +/queue_ram.c/1.7/Sat Feb 13 12:11:11 2016// +/rfc2822.c/1.7/Sat Feb 13 12:11:11 2016// +/rfc2822.h/1.4/Wed Feb 3 12:14:44 2016// +/ruleset.c/1.32/Sat Feb 13 12:11:11 2016// +/runq.c/1.2/Sat Feb 13 12:11:11 2016// +/scheduler.c/1.51/Sat Feb 13 12:11:11 2016// +/scheduler_backend.c/1.15/Sat Feb 13 12:11:11 2016// +/scheduler_null.c/1.9/Sat Feb 13 12:11:11 2016// +/scheduler_proc.c/1.8/Sat Feb 13 12:11:11 2016// +/scheduler_ramqueue.c/1.42/Sat Feb 13 12:11:11 2016// +/sendmail.8/1.4/Wed Feb 3 12:14:44 2016// +/smtp.c/1.153/Sat Feb 13 12:11:30 2016// +/smtp_session.c/1.268/Sat Feb 13 12:11:11 2016// +/smtpctl.8/1.54/Wed Feb 3 12:14:44 2016// +/smtpctl.c/1.147/Sat Feb 13 12:11:11 2016// +/smtpd-api.h/1.29/Wed Feb 10 07:35:31 2016// +/smtpd-defines.h/1.6/Sat Feb 13 12:11:11 2016// +/smtpd.8/1.28/Wed Feb 3 12:14:44 2016// +/smtpd.c/1.274/Sat Feb 13 12:11:11 2016// +/smtpd.conf.5/1.153/Sat Feb 13 12:11:11 2016// +/smtpd.h/1.511/Sat Feb 13 12:11:11 2016// +/ssl.c/1.85/Sat Feb 13 12:11:11 2016// +/ssl.h/1.19/Wed Feb 3 12:14:44 2016// +/ssl_smtpd.c/1.13/Sat Feb 13 12:11:11 2016// +/stat_backend.c/1.10/Sat Feb 13 12:11:11 2016// +/stat_ramstat.c/1.10/Sat Feb 13 12:11:11 2016// +/table.5/1.5/Wed Feb 3 12:14:44 2016// +/table.c/1.23/Sat Feb 13 12:11:11 2016// +/table_api.c/1.8/Sat Feb 13 12:11:11 2016// +/table_db.c/1.9/Sat Feb 13 12:11:11 2016// +/table_getpwnam.c/1.4/Sat Feb 13 12:11:11 2016// +/table_proc.c/1.6/Sat Feb 13 12:11:11 2016// +/table_static.c/1.15/Sat Feb 13 12:11:11 2016// +/to.c/1.24/Sat Feb 13 12:11:11 2016// +/tree.c/1.5/Sat Feb 13 12:11:11 2016// +/util.c/1.125/Sat Feb 13 12:11:11 2016// +/waitq.c/1.5/Sat Feb 13 12:11:12 2016// diff --git a/smtpd/smtp.c b/smtpd/smtp.c index 408e9f91..fd261cd1 100644 --- a/smtpd/smtp.c +++ b/smtpd/smtp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtp.c,v 1.152 2016/01/08 21:31:06 jung Exp $ */ +/* $OpenBSD: smtp.c,v 1.153 2016/02/13 09:28:13 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@poolp.org> @@ -46,7 +46,7 @@ static void smtp_setup_events(void); static void smtp_pause(void); static void smtp_resume(void); static void smtp_accept(int, short, void *); -static int smtp_enqueue(uid_t *); +static int smtp_enqueue(void); static int smtp_can_accept(void); static void smtp_setup_listeners(void); static int smtp_sni_callback(SSL *, int *, void *); @@ -84,7 +84,7 @@ smtp_imsg(struct mproc *p, struct imsg *imsg) case IMSG_QUEUE_SMTP_SESSION: m_compose(p, IMSG_QUEUE_SMTP_SESSION, 0, 0, - smtp_enqueue(NULL), imsg->data, + smtp_enqueue(), imsg->data, imsg->hdr.len - sizeof imsg->hdr); return; } @@ -94,7 +94,7 @@ smtp_imsg(struct mproc *p, struct imsg *imsg) switch (imsg->hdr.type) { case IMSG_CTL_SMTP_SESSION: m_compose(p, IMSG_CTL_SMTP_SESSION, imsg->hdr.peerid, 0, - smtp_enqueue(imsg->data), NULL, 0); + smtp_enqueue(), NULL, 0); return; case IMSG_CTL_PAUSE_SMTP: @@ -217,10 +217,9 @@ smtp_resume(void) } static int -smtp_enqueue(uid_t *euid) +smtp_enqueue(void) { static struct listener local, *listener = NULL; - char buf[HOST_NAME_MAX+1], *hostname; int fd[2]; if (listener == NULL) { @@ -245,13 +244,7 @@ smtp_enqueue(uid_t *euid) if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, fd)) return (-1); - hostname = env->sc_hostname; - if (euid) { - (void)snprintf(buf, sizeof(buf), "%s", hostname); - hostname = buf; - } - - if ((smtp_session(listener, fd[0], &listener->ss, hostname)) == -1) { + if ((smtp_session(listener, fd[0], &listener->ss, env->sc_hostname)) == -1) { close(fd[0]); close(fd[1]); return (-1); |