From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.43) id 1EAFH3-00032t-69 for garchives@archives.gentoo.org; Tue, 30 Aug 2005 23:12:13 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.4/8.13.4) with SMTP id j7UN9KLa012398; Tue, 30 Aug 2005 23:09:20 GMT Received: from smtp.gentoo.org (smtp.gentoo.org [134.68.220.30]) by robin.gentoo.org (8.13.4/8.13.4) with ESMTP id j7UN7ZQo003709 for ; Tue, 30 Aug 2005 23:07:35 GMT Received: from localhost ([127.0.0.1] helo=home.wh0rd.org) by smtp.gentoo.org with esmtp (Exim 4.43) id 1EAFEf-000734-89 for gentoo-dev@lists.gentoo.org; Tue, 30 Aug 2005 23:09:45 +0000 Received: (qmail 2310 invoked from network); 30 Aug 2005 19:04:42 -0400 Received: from unknown (HELO vapier) (192.168.0.2) by 192.168.0.1 with SMTP; 30 Aug 2005 19:04:42 -0400 From: Mike Frysinger Organization: wh0rd.org To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] init.d-scripts don't see stuff from /etc/profile.env Date: Tue, 30 Aug 2005 19:09:51 -0400 User-Agent: KMail/1.8.2 References: <200508251201.43416.pauldv@gentoo.org> <1125437576.13588.8.camel@uberpc.ubernet> In-Reply-To: <1125437576.13588.8.camel@uberpc.ubernet> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508301909.51972.vapier@gentoo.org> X-Archives-Salt: c6522acc-5760-442a-b7b0-3395c9e6aff9 X-Archives-Hash: 233fcae753cf2e522421eb5c9e4ace86 On Tuesday 30 August 2005 05:32 pm, Roy Marples wrote: > On Thu, 2005-08-25 at 12:01 +0200, Paul de Vrieze wrote: > > On Wednesday 24 August 2005 12:04, Roy Marples wrote: > > > Um, that's kinda like behaviour by design unless anyone can tell me > > > otherwise. > > > > > > /etc/env.d/* just set shell variables, so if you change one then you > > > need to > > > > > > env-update > > > source /etc/profile > > > /etc/init.d/thisdaemon restart > > > > > > To refresh the daemon that needs the vars > > > > Perhaps the init script loader should be changed such that the > > environment variables from the shell calling the script are ignored, and > > an > > environment equal to that when being called by init is used. > > I've been looking into this and the only easy solution I can find is to > move /sbin/runscript.sh to say /lib/rcscripts/sh, change it to > source /etc/profile and then create a new /sbin/runscript.sh like so > > Right away we can see that we actually do need some to keep some env > vars and the list would be constantly updated. There's also nothing to > stop the user from setting them and then running a script which kind of > defeats the purpose here anyway. > > Personally I'm against this.I'd like to know what Azarah and Vapier > think of this though. Others too! init.d scripts should have a pure env given to them ... which means, they should be run with `env -i` and have only whitelisted variables given to them (and everything that appears in /etc/conf.d/$service /etc/conf.d/rc and /etc/rc.conf) ... after all, you wouldnt want something like apache having all those vars in its env because they'd show up in php script env which means available to the public -mike -- gentoo-dev@gentoo.org mailing list