Comment by bestham 2 months ago If they can override sudo, they can override which. 7 comments bestham Reply antonkochubey 2 months ago if you use \which it'll always be a shell built-in ;) though someone can put a different shell in your .zshrc jolmg 2 months ago $ which() { echo foo; } $ \which foo The backslash only prevents alias expansion. pepa65 2 months ago He meant `command which` 1 reply → bandie91 2 months ago `exec /tmp/fake-bash` in bashrc to intercept everything? zbentley 2 months ago Then use the absolute path.
antonkochubey 2 months ago if you use \which it'll always be a shell built-in ;) though someone can put a different shell in your .zshrc jolmg 2 months ago $ which() { echo foo; } $ \which foo The backslash only prevents alias expansion. pepa65 2 months ago He meant `command which` 1 reply → bandie91 2 months ago `exec /tmp/fake-bash` in bashrc to intercept everything?
jolmg 2 months ago $ which() { echo foo; } $ \which foo The backslash only prevents alias expansion. pepa65 2 months ago He meant `command which` 1 reply →
if you use \which it'll always be a shell built-in ;) though someone can put a different shell in your .zshrc
The backslash only prevents alias expansion.
He meant `command which`
1 reply →
`exec /tmp/fake-bash` in bashrc to intercept everything?
Then use the absolute path.