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

Use sudo when necessary for certutil (Ubuntu 16.04 at least), fixes #192 #193

Closed
wants to merge 6 commits into from

Conversation

rfay
Copy link

@rfay rfay commented Aug 20, 2019

#192 points out that as of v1.4.0, certutil -A is not run with sufficient privileges. This seems to be a problem particularly on Ubuntu 16.04, but possibly on some other Debian-derivatives as well.

This PR checks to see if the path to the profile is writable; if it's not, it uses sudo to run certutil -A and certutil -D

@rfay
Copy link
Author

rfay commented Aug 20, 2019

There are testing artifacts from this PR at https://github.com/rfay/mkcert/releases/tag/v1.4.1-alpha1 - I tried it out on macOS, Ubuntu 16.04, Debian9, and Windows and it seemed to behave as expected.

@rfay
Copy link
Author

rfay commented Sep 15, 2019

Just want to mention that this can be vastly simplified by always sudo-ing certutil, even on all the distros where it's unnecessary. If you want that I'll be happy to re-do that way.

Copy link

@topher200 topher200 left a comment

Choose a reason for hiding this comment

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

This PR resolved my issues on Ubuntu; see my comment on #192

@dangtrinhnt-mmt
Copy link

Thanks. It works. We should merge this.

FiloSottile added a commit that referenced this pull request Nov 9, 2019
…ions

Based on @rfay's investigation and fix.

Fixes #192
Closes #193
FiloSottile added a commit that referenced this pull request Nov 9, 2019
…ions

Based on @rfay's investigation and fix.

Fixes #192
Closes #193
FiloSottile added a commit that referenced this pull request Nov 9, 2019
…ions

Based on @rfay's investigation and fix.

Fixes #192
Closes #193
FiloSottile added a commit that referenced this pull request Nov 9, 2019
…ions

Based on @rfay's investigation and fix.

Fixes #192
Closes #193
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.

3 participants