diff options
author | Eric Faurot <eric@cvs.openbsd.org> | 2013-07-19 11:14:09 +0000 |
---|---|---|
committer | Eric Faurot <eric@cvs.openbsd.org> | 2013-07-19 11:14:09 +0000 |
commit | e69f8efeb851880afaf846c6c6f9ab4f0fb25226 (patch) | |
tree | 33347af75abf372ce6faa6f682a058b17ae70346 /usr.sbin/smtpd/queue.c | |
parent | 6fff6905b9aa3bc12806712cb01ed4cbeb444ea7 (diff) |
Get rid of env->sc_pw and env->sc_pwqueue. Early queue initialization
now happens in queue_init(), and backends take the queue passwd as
parameter in their init function.
Remove useless SMTPD_FILTER_USER while there.
Diffstat (limited to 'usr.sbin/smtpd/queue.c')
-rw-r--r-- | usr.sbin/smtpd/queue.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/usr.sbin/smtpd/queue.c b/usr.sbin/smtpd/queue.c index 6bebc5d7340..f0088ec61a3 100644 --- a/usr.sbin/smtpd/queue.c +++ b/usr.sbin/smtpd/queue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: queue.c,v 1.149 2013/07/19 07:49:08 eric Exp $ */ +/* $OpenBSD: queue.c,v 1.150 2013/07/19 11:14:08 eric Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@poolp.org> @@ -540,12 +540,11 @@ queue(void) } purge_config(PURGE_EVERYTHING); - if (env->sc_pwqueue) { - free(env->sc_pw); - env->sc_pw = env->sc_pwqueue; - } - pw = env->sc_pw; + if ((pw = getpwnam(SMTPD_QUEUE_USER)) == NULL) + if ((pw = getpwnam(SMTPD_USER)) == NULL) + fatalx("unknown user " SMTPD_USER); + if (chroot(PATH_SPOOL) == -1) fatal("queue: chroot"); if (chdir("/") == -1) |