sudo_sniff icon indicating copy to clipboard operation
sudo_sniff copied to clipboard

Dynamically find sudo

Open dubs3c opened this issue 6 years ago • 4 comments

sudo may be in different locations on different systems, perhaps implement a function to locate it. Perhaps the output of which sudo can be used.

Right now /usr/bin/sudo is hardcoded.

dubs3c avatar Oct 02 '19 11:10 dubs3c

which just iterates over the "$PATH", right?

We can just use the user's PATH environment variable, tokenize it by colon, and then work through each folder to find the real sudo.

boxmein avatar Oct 02 '19 11:10 boxmein

Yes, that should do it. Something you want to implement? :)

dubs3c avatar Oct 02 '19 11:10 dubs3c

Yes, that should do it. Something you want to implement? :)

I can do it.

fluks avatar Oct 04 '19 09:10 fluks

@fluks Sure, unless @boxmein beats you to it ;)

dubs3c avatar Oct 04 '19 20:10 dubs3c