enhancing the path-variable

neo36

UAAAARRRR!
sorry, people, i asked about that in the past, but i forgot and simple can't find the thread where the anwer was given:

using os x 10.2, how do i enhance the path so that i don't need to type in the current directory in front of the application i want to run (e.g. ./someapp). i also want to have the the path set every time i start the terminal. i know where i have to do that (/usr/share/tcsh/examples), but i don't know how...


a quick answer would be wonderful! thanks a lot in advance!
 
The easy way to change the default path is to modify the obvious line in /etc/csh.login.

As for adding ./ to the path, here's a brief playlet describing why it's not in there by default:

User: I think something is wrong with my home directory. I can't delete this one file.

Sysadmin: Let me take a look [cd to user's directory, ls]

At this point, what the sysadmin doesn't realize is that rather than running /bin/ls like expected, the computer just ran ./ls, which in this case was a malicious script that grants the user root access, removes itself from the disk, and produces a normal directory listing. The sysadmin never even notices...

Of course, this is more of a worst case scenario, but you get the idea. The path doesn't include ./ by default so that you can be certain that you're running what you intend to run. On a single user system, it's not nearly as dangerous, but you must be aware of the risk.
 
okay, i get the idea. and it's good to know about that. anyway, i'd like to enhance my path. any help? or do you think this is so much of a problem that it's better not to tell how to change the path?
 
sorry... forget the last post. i just mad a typo opening csh.login. opening the right file, everything is clear... no further explanations necessary :) thanks!
 
Back
Top