Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
zahlman
· 6mo ago · 0 comments
`which sudo`?
`/usr/bin/sudo`?
Comments
[–]
bestham
6mo ago
If they can override sudo, they can override which.
[–]
antonkochubey
6mo ago
if you use \which it'll always be a shell built-in ;) though someone can put a different shell in your .zshrc
[–]
jolmg
6mo ago
$ which() { echo foo; } $ \which foo
The backslash only prevents alias expansion.
[–]
pepa65
6mo ago
He meant `command which`
[–]
bandie91
6mo ago
`exec /tmp/fake-bash` in bashrc to intercept everything?
[–]
zbentley
6mo ago
Then use the absolute path.