Skip to content

implement sudoedit/sudo -e #1121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mrnossiom
Copy link

@mrnossiom mrnossiom commented May 8, 2025

Closes #762

@mrnossiom
Copy link
Author

mrnossiom commented May 8, 2025

I have just started implementing sudoedit/sudo -e.

I have a few questions on how to proceed:

  • I guess we want to have a common base for sudoedit and sudo -e. I am unsure of how it's done for su and sudo -i (or maybe it's different). It would be great to have a little guidance on where I should put the common code.

  • For argument parsing, I took the code from visudo and adapted it a bit. Would it be a good idea to dedup that code? It is in the scope of that PR?

@mrnossiom mrnossiom changed the title feat: sudo edit implement sudoedit/sudo -e May 8, 2025
@squell
Copy link
Member

squell commented May 9, 2025

Welcome back!

To answer some Q's:

  • We prefer focused PR's and it's OK to separate changes out over multiple PR's. That helps reviewing.

  • The proper way in the end is to implement it as "sudo -e", i.e. within the existing CLI framework, and then "sudoedit" is simply a symlink to "sudo" (this is also how ogsudo does it).

  • But for an initial version I think a stand-alone binary might be easier for you to work on. And then you don't need to worry about duplication as well since we're going to end up using the "regular" sudo CLI code in the end anyway.

Note than when you first signalled interest in implementing sudoedit it was far in the future on our roadmap, but right now it's something we want to have finished over the summer. That still means you can help out, but we'll need to coordinate our efforts a bit tighter to reduce the risk of wasting your time. I'll contact you by email soon to establish a bit more direct line of communication if that's OK with you.

@mrnossiom
Copy link
Author

mrnossiom commented May 9, 2025

👋🏻

  • If sudoedit is ultimately going to be a symlink to sudo, then I better start implementing sudo -e directly.
  • I am aware of the Ubunutu tight deadline. I stumbled upon trifectatech foundation blog post, that's how I remembered that issue 😄.
  • Email is completely OK for me. You can find my contact email on my profile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for sudo -e or sudoedit
2 participants