>Even if someone is stupid enough to leave . writable and in their path before
>/bin and /usr/bin ?
If you're worried about security in a program or script for some reason then
you check the contents of the PATH variable. Hardwiring paths is not the
right solution -- it makes the system less portable and doesn't really gain
you anything. After all, you've only "secured" one trivial program -- the
security hole of a writeable directory in your path is there to be exploited
any time. Just stick a script called "ls" in there and you don't need any
evil trojan horse bearing, non-hardwired installation scripts.
People should grow up a little about security and realise that putting countless measures in place haphazardly is not secure. It can even make your system less secure by over-complicating it or lulling you into a false sense of security. A few good, tight, well understood security measures are far better.
Mercury/Security/RandomRantWiz.