You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sudo historically has a command to edit a file with the configured editor of your choice, often sudo -e or his own binary sudoedit. It copies the file with your user's permissions in a temporary place so that you can freely edit it.
The -e argument is already defined in the CLI options, so this could be more of a tracking issue.
Whether there should be a sudoedit binary distributed along the others can be discussed here. Since sudo-rs aims to be a fully functional replacement, including a sudoedit binary would help for backwards compatibility. It could also be an opportunity to drop a binary that mirrors the behavior of sudo -e
We discussed this topic in our last weekly meeting and we are happy to accept an external contribution that implements this feature.
We'd like to point out that there's a bit of a quality assurance / control process when landing new features that's not quite formalized (i.e. documented) but that we have been using:
write compliance tests for the new feature. I personally like to take a bit of a TDD (Test Driven Development) approach and write the tests first and then write enough code to make the tests pass; then repeat as necessary
check original sudo's CVE list to see if there's anything related to the feature. it's good to keep those in mind when writing the code; sometimes the CVE inform about edge cases that may not be obvious
Our CI should catch minor issues like clippy warnings and rustfmt but it's good to run them locally before opening a PR
Hi, I'd love to contribute, but I cannot find much energy for this right now. I'd be happy to review or contribute later. I really don't want to block anything, and any progress I'll do we'll be mentioned here. 😃
Hi 👋🏻,
Description
sudo
historically has a command to edit a file with the configured editor of your choice, oftensudo -e
or his own binarysudoedit
. It copies the file with your user's permissions in a temporary place so that you can freely edit it.The
-e
argument is already defined in the CLI options, so this could be more of a tracking issue.Whether there should be a
sudoedit
binary distributed along the others can be discussed here. Sincesudo-rs
aims to be a fully functional replacement, including asudoedit
binary would help for backwards compatibility. It could also be an opportunity to drop a binary that mirrors the behavior ofsudo -e
Additional information
You can see an implementation of such a command here: github.com/sudo-project/sudo:main/src/sudo_edit.c (in C though 🤮)
I'm willing to try a PR for this 😄
The text was updated successfully, but these errors were encountered: