Describe the bug
Sometimes I like to open files in KDE's Kate using sudoedit so I have an alias like the following:
$ which sukate
sukate: aliased to env SUDO_EDITOR='kate -b -n' sudoedit
Expected behavior
This works in the original sudo but not with sudo-rs. I suspect that it doesn't split the whitespace when searching if it's a valid editor, i.e it's probably checking for /usr/bin/kate\ \-b\ \-n which of course doesn't exist.
If this is intentional, then fair enough, a wrapper script can be used instead but if not then sudo-rs should probably do whatever the original sudo does. I haven't checked but it's probably something equivalent to the following pseudocode:
editor="$1"
shift
# check if $editor is safe/trusted
# if it is
exec "$editor" "$@"
Describe the bug
Sometimes I like to open files in KDE's Kate using sudoedit so I have an alias like the following:
$ which sukate sukate: aliased to env SUDO_EDITOR='kate -b -n' sudoeditExpected behavior
This works in the original sudo but not with sudo-rs. I suspect that it doesn't split the whitespace when searching if it's a valid editor, i.e it's probably checking for
/usr/bin/kate\ \-b\ \-nwhich of course doesn't exist.If this is intentional, then fair enough, a wrapper script can be used instead but if not then sudo-rs should probably do whatever the original sudo does. I haven't checked but it's probably something equivalent to the following pseudocode: