[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: egrep moved to /usr/sbin

On Tue, Jan 07, 2003 at 12:27:59PM +1100, Herbert Xu wrote:
> H. S. Teoh <hsteoh@quickfur.ath.cx> wrote:
> > 
> > How about this:
> > 
> > #!/bin/sh
> > PATH=/usr/bin:/bin:/usr/sbin:/sbin; export PATH
> > ...
> > grep ...
> > 
> > All shell scripts that run with root privileges ought not to trust preset
> > PATH variables, anyway.
> This is stupid because we don't have setuid scripts.  You should not
> override the PATH at all.

Actually, I agree that we shouldn't override PATH. The root user really
should be properly configured to have a sane path anyway. But this is in
response to the original objection about "unsafe" PATH settings. I was
just pointing out that paranoid sysadmins still have this option if they
decide the PATH from the environment cannot be trusted. But the point is,
there really aren't many good reasons (if at all) to hardcode paths to all


Always remember that you are unique. Just like everybody else. -- despair.com

Reply to: