diff options
author | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2009-09-18 00:04:27 +0000 |
---|---|---|
committer | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2009-09-18 00:04:27 +0000 |
commit | 0e3213ed97e73884bec54c41d4061078ce22ad4d (patch) | |
tree | d85e32645b998b1186e5f3735a9c537ca1bbbef6 /usr.sbin/smtpd/control.c | |
parent | 6aba0d497852b4ecab7923961fe0e3e820165942 (diff) |
Remove useless Received line added at the /usr/sbin/sendmail stage, it
was not correctly formatted anyway. Recording of sender uid has
been moved to the server process (getpeereid), which means it is not
subject to forgery.
Based on problem report by Michael Lechtermann <michael@lechtermann.net>
Diffstat (limited to 'usr.sbin/smtpd/control.c')
-rw-r--r-- | usr.sbin/smtpd/control.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/usr.sbin/smtpd/control.c b/usr.sbin/smtpd/control.c index 7e312f555bf..020160864fe 100644 --- a/usr.sbin/smtpd/control.c +++ b/usr.sbin/smtpd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.37 2009/09/15 16:50:06 jacekm Exp $ */ +/* $OpenBSD: control.c,v 1.38 2009/09/18 00:04:26 jacekm Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -320,7 +320,7 @@ control_dispatch_ext(int fd, short event, void *arg) break; } imsg_compose_event(env->sc_ievs[PROC_SMTP], - IMSG_SMTP_ENQUEUE, 0, 0, -1, &fd, sizeof(fd)); + IMSG_SMTP_ENQUEUE, fd, 0, -1, &euid, sizeof(euid)); break; case IMSG_STATS: if (euid) @@ -779,13 +779,10 @@ control_dispatch_smtp(int sig, short event, void *p) switch (imsg.hdr.type) { case IMSG_SMTP_ENQUEUE: { - int *fd = imsg.data; struct ctl_conn *c; int client_fd; - IMSG_SIZE_CHECK(fd); - - client_fd = *fd; + client_fd = imsg.hdr.peerid; if ((c = control_connbyfd(client_fd)) == NULL) { log_warn("control_dispatch_smtp: fd %d not found", client_fd); |