Skip to content
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

Improvements to opening /proc/kcore via sudo #355

Merged
merged 2 commits into from
Sep 11, 2023
Merged

Improvements to opening /proc/kcore via sudo #355

merged 2 commits into from
Sep 11, 2023

Conversation

osandov
Copy link
Owner

@osandov osandov commented Sep 11, 2023

A couple of followups to #347:

  • Check whether sudo is installed in the first place.
  • Make the sudo prompt include why we're asking for sudo.

If not, we can print the original helpful error message we had instead
of blowing up. Refactor our handling of PermissionError to allow this.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
It'll probably be helpful to users to know why drgn is asking for sudo
permissions.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
@osandov
Copy link
Owner Author

osandov commented Sep 11, 2023

@brenns10 mind taking a look at a couple of usability suggestions for the sudo opener?

Copy link
Contributor

@brenns10 brenns10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

drgn/internal/sudohelper.py Show resolved Hide resolved
@osandov osandov merged commit b730264 into main Sep 11, 2023
@osandov osandov deleted the sudo-followup branch September 11, 2023 19:54
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.

2 participants