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/smtp.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/smtp.c')
-rw-r--r-- | usr.sbin/smtpd/smtp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/smtp.c b/usr.sbin/smtpd/smtp.c index 7b64c21d101..5ac4d840019 100644 --- a/usr.sbin/smtpd/smtp.c +++ b/usr.sbin/smtpd/smtp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtp.c,v 1.126 2013/07/19 07:49:08 eric Exp $ */ +/* $OpenBSD: smtp.c,v 1.127 2013/07/19 11:14:08 eric Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@poolp.org> @@ -247,9 +247,10 @@ smtp(void) purge_config(PURGE_EVERYTHING); - pw = env->sc_pw; + if ((pw = getpwnam(SMTPD_USER)) == NULL) + fatalx("unknown user " SMTPD_USER); - if (chroot(pw->pw_dir) == -1) + if (chroot(PATH_CHROOT) == -1) fatal("smtp: chroot"); if (chdir("/") == -1) fatal("smtp: chdir(\"/\")"); |