The handling for the list pseudo command prefixes the target command array with "list"; it adds a special case to extract the target binary at the new offset, but when there are arguments in sudoers to check it tries to match the arguments in the sudoers against the command arguments concatentation (which obviously fails).
sudo -l /usr/bin/ping xxx works when adding this entry:
nobody ALL = (root) NOPASSWD: /usr/bin/ping /usr/bin/ping xxx
Probably broken since a514a6eed5662ad6286408f70ca63e291dcbb5e5, but testing without install/suid got harder after -U was broken (#248), so I didn't bisect it.
Using tons of global vars without clear semantics (and #defineing normal looking var names into a global struct) and lots of special paths depending in which mode you run is just horrible.
I'm certainly looking for alternatives now, because I quite frankly think this implementation is doomed.
Given this entry:
As
nobody
:sudo -l
shows the command, butsudo -l /usr/bin/ping xxx
fails; with debug output one can see this line:The handling for the
list
pseudo command prefixes the target command array with"list"
; it adds a special case to extract the target binary at the new offset, but when there are arguments in sudoers to check it tries to match the arguments in the sudoers against thecommand arguments
concatentation (which obviously fails).sudo -l /usr/bin/ping xxx
works when adding this entry:Probably broken since a514a6eed5662ad6286408f70ca63e291dcbb5e5, but testing without install/suid got harder after
-U
was broken (#248), so I didn't bisect it.Using tons of global vars without clear semantics (and
#define
ing normal looking var names into a global struct) and lots of special paths depending in which mode you run is just horrible.I'm certainly looking for alternatives now, because I quite frankly think this implementation is doomed.