Y
Hacker News
new
|
ask
|
show
|
jobs
by
bestham
10 days ago
If they can override sudo, they can override which.
2 comments
antonkochubey
10 days ago
if you use \which it'll always be a shell built-in ;) though someone can put a different shell in your .zshrc
link
jolmg
10 days ago
$ which() { echo foo; } $ \which foo
The backslash only prevents alias expansion.
link
pepa65
9 days ago
He meant `command which`
link
jolmg
8 days ago
> it'll always be a shell built-in
`command which` wouldn't have been the built-in
link
bandie91
10 days ago
`exec /tmp/fake-bash` in bashrc to intercept everything?
link
zbentley
10 days ago
Then use the absolute path.
link