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

Re: egrep moved to /usr/sbin



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.
-- 
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



Reply to: