Re: POSIXLY_CORRECT and install scripts
On Fri, 3 Jan 2003 04:25, Michael Stone wrote:
> On Thu, Jan 02, 2003 at 09:51:09PM -0500, Greg Stark wrote:
> >Hm, it was more subtle than I realized. It's used in some /etc/init.d
> > scripts and those are often called from maintainer scripts. An example is
> > postgresql
>
> I'd argue that most of those should really use start-stop-daemon rather
> than su.
I agree.
su is at best unnecessary, it does not offer anything that start-stop-daemon
can't do. At worst it causes problems.
su always wants to access /etc/passwd and /etc/shadow, in SE Linux the startup
scripts are not allowed access to /etc/shadow and thus su fails.
Also while we're at it, postinst scripts should not directly start a daemon
they should always call the script in /etc/init.d so that if the
administrator has changed the daemon startup process then those changes will
be respected at upgrade time.
--
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/ My home page
Reply to: