Subject: Re: a couple of easy questions
To: None <brusinsk@ibdr.inf.tu-dresden.de, netbsd-help@NetBSD.ORG>
From: Ty Sarna <tsarna@endicor.com>
List: netbsd-help
Date: 05/19/1997 13:02:48
In article <Pine.OSF.3.91.970519183034.24543A-100000@ibdr121.inf.tu-dresden.de> you write:
> Why is it usefull not to have ./ in your PATH?

Let's say you have . at the start of your path. I could create a script
or program called /tmp/ls that does something nasty (deletes your files,
makes a suid-you copy of /bin/sh, etc). If you cd to /tmp and type 'ls',
you'll run my program instead of /bin/ls.

"OK," you say, "I'll put . at the end of my path then". In that case,
I could call the program "sl" and hope you mistype ls while in /tmp. I
could also try a lot of misspellings of program names to improve the
odds (one that would likely get me, if I had . in my path, is "mroe")