????? HELP!!! what is wrong with this code? ???????

Rob ten Kroode roberto at cwi.nl
Tue Oct 18 23:13:15 AEST 1988


In article <10146 at cup.portal.com> thad at cup.portal.com (Thad Thad Floryan) writes:
>Doug Gwyn writes: "It is not wise to have the current directory early
>in the PATH directory list."
>
>Doug, would you please expand upon your statement (above)?  I feel others
>besides myself would appreciate knowing the hidden (?) pitfalls.
>
>Thad Floryan  [ thad at cup.portal.com (OR) ..!sun!portal!cup.portal.com!thad ]

My name is not Doug, but maybe you allow me to give answer :-)
There are people who like to trick other people. One of the ways to do this
is to have a program in one of your directories and give it the name of
a well known utility. The perfect example: "ls".
If a user types "ls" to list the directory AND that user has the current directory
early in his path, than ./ls will be executed instead of /bin/ls.
As you will understand, "ls" does something completely different than what
the user expects (altough the fake "ls" could give a directory listing).
There are lots of variations to this theme, but I think you will to
understand Doug's statement.



-- 
                                  | The two rules of Rob:
Rob ten Kroode (roberto at cwi.nl)   | rule #1 : I am _always_ right.
                                  | rule #2 : If I am not right, apply rule #1.
"I'm your icecream man; stop me when I'm passin' by..."  Van Halen



More information about the Comp.unix.questions mailing list