Originally posted by kubicle
View Post
Announcement
Collapse
No announcement yet.
$PATH and the current directory
Collapse
This topic is closed.
X
X
-
I didn't actually test the technical viability of such a vector, that was just a from-the-top-of-my-head example of what might be possible. I don't wish to overemphasize that as a huge security concern, though, if one is in the habit of running/installing dubious software/scripts/plugins...one will be in trouble with or without cwd in path.Originally posted by jlittle View PostCan a plugin really do that? And make it executable? I suppose my point about "we don't do that" applies, in that one gets plugins from not just any place; though if some plugin developer gets hacked, there's a chance malware could be in a plugin.
That's a nice alias, btw, already stole it.
- Top
- Bottom
Leave a comment:
-
$PATH and the current directory
In another thread in this sub-forum, someone suggested that ./ should be in one's $PATH for convenience. I commented:
To which Kubicle replied:Originally posted by jlittle View PostIf you have a blank entry in your $PATH, including starting or ending with the separator colon, that means the cwd. I've done that for three decades. It's only an issue if the cwd is writable by people (or bots or software) you don't trust; we don't do that in a typical linux install.
That's a matter of taste, I think (related to how good one's eyesight is :-J); minimalists find less is more clearOriginally posted by kubicle View PostI'd still prefer a literal "." for clarity, a blank entry is easier to miss.
Anyway, the point I'd really like to make is, with bash now one canalias path='echo -e ${PATH//:/\\n}'For example:
The blank entry is obvious, and I find checking the path much easier. (I find typing ./configure all the time annoying.)Code:$ path /home/john/App/adt-bundle-linux/sdk/platform-tools /home/john/App/adt-bundle-linux/sdk/tools /home/john/perl5/bin /home/john/bin /usr/lib/x86_64-linux-gnu/qt4/bin /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin /usr/games /usr/local/games
Kubicle also pointed out
Can a plugin really do that? And make it executable? I suppose my point about "we don't do that" applies, in that one gets plugins from not just any place; though if some plugin developer gets hacked, there's a chance malware could be in a plugin....as one might run something malicious by accident (like a browser plugin that places a modified sudo executable in your $HOME).
Regards, JohnTags: None
- Top
- Bottom
Users Viewing This Topic
Collapse
There are 0 users viewing this topic.
Leave a comment: