From owner-svn-src-all@FreeBSD.ORG Mon Mar 14 12:59:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E28E51065672; Mon, 14 Mar 2011 12:59:31 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id B87528FC16; Mon, 14 Mar 2011 12:59:31 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 6CA7A46B17; Mon, 14 Mar 2011 08:59:31 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.10]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 063398A027; Mon, 14 Mar 2011 08:59:31 -0400 (EDT) From: John Baldwin To: Jilles Tjoelker Date: Mon, 14 Mar 2011 08:08:14 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.4-CBSD-20110107; KDE/4.4.5; amd64; ; ) References: <201103122113.p2CLD8LO030205@svn.freebsd.org> <4D7C7CC9.7010901@FreeBSD.org> <20110313144609.GA11779@stack.nl> In-Reply-To: <20110313144609.GA11779@stack.nl> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201103140808.15076.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Mon, 14 Mar 2011 08:59:31 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Doug Barton , src-committers@freebsd.org Subject: Re: svn commit: r219578 - head/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Mar 2011 12:59:32 -0000 On Sunday, March 13, 2011 10:46:09 am Jilles Tjoelker wrote: > On Sun, Mar 13, 2011 at 12:14:01AM -0800, Doug Barton wrote: > > On 03/12/2011 15:08, Jilles Tjoelker wrote: > > > I wonder if it is a good idea to pollute the environment of many daemons > > > with this. Although sshd and cron clean it up, there is at least one > > > daemon that passes the environment on. One of those is devd. > > > I think the argument could be made that this is bad behavior on their > > part, but if it turns out that it starts affecting things negatively we > > can take another look at it. > > Cleaning the environment requires special care to preserve environment > variables that may still be needed. This is a problem particularly for > code intended to be portable. Perhaps someone wants to apply a hack > using LD_PRELOAD or other LD_* variables, or an environment variable is > needed to force standards-compliant behaviour that the program depends > on. > > The service(8) utility should clear the environment so it matches the > boot environment as much as possible. If someone wants to set special > environment variables, they should configure that in such a way that it > also works at boot or call the rc.d script directly. > > > > While that > > > saves four /etc/rc.conf reads on my minimalistic 9-current VM, it > > > implies that devd must be restarted to pick up changes to /etc/rc.conf. > > > That seems a POLA violation. > > > I'm not sure what you mean by this. We've always required services to be > > restarted to pick up rc.conf changes. > > For options for devd itself, yes. However, as configured in the default > /etc/devd.conf, devd may invoke commands like > /etc/pccard_ether $subsystem start > or > /etc/rc.d/dhclient quietstart $subsystem > > The natural expectation is that these reread /etc/rc.conf every time, so > that it is possible to set up network settings for a network interface > and then plug it in, without restarting devd. And so it worked before > r219578. I agree that this is the behavior that I certainly expect. I also agree that it is hard to safely purge environment variables in all of the system daemons. -- John Baldwin