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 ENV["NOSUDO"]=true to prevent sudo -V check #325

Merged
merged 3 commits into from
Jun 3, 2019

Conversation

JonathanAnderson
Copy link
Contributor

This will help prevent my sysadmin from yelling at me about the sudo requests I keep making when installing packages.

@bjarthur
Copy link

the -V option just prints version info. why would your sysadmin care about that?

from the man page:

       -V, --version
                   Print the sudo version string as well as the version string of the
                   security policy plugin and any I/O plugins.  If the invoking user is
                   already root the -V option will display the arguments passed to
                   configure when sudo was built and plugins may display more verbose
                   information such as default options.
$ sudo -V
Sudo version 1.8.17p1
Sudoers policy plugin version 1.8.17p1
Sudoers file grammar version 45
Sudoers I/O plugin version 1.8.17p1

@JonathanAnderson
Copy link
Contributor Author

JonathanAnderson commented Dec 12, 2017 via email

@JonathanAnderson
Copy link
Contributor Author

after reading #330 maybe this should be renamed to has_sudo_permission or sudo_command_exists to better clarify what the intended goal is.

the return type of a get on the env should be a string and i've added lowercase on the output...

Again the reasons this is annoying is twofold.

1) when a non sudo enabled user uses sudo, this emails our entire company as a security precaution.
2) when it runs sudo, my prompt sits there waiting me to type the sudo password and when I get back to my terminal, my install of a package hasn't happened yet.
actually avoid calling sudo if you don't want to
@JonathanAnderson
Copy link
Contributor Author

Again the reasons this is frustrating is twofold.

  1. currently, when BinDeps runs sudo -V, my prompt sits there waiting me to type the sudo password and when I get back to my terminal, my install of a package hasn't happened yet...

  2. at my company, when a non sudo enabled user tries to use sudo, this emails our entire company as a security precaution. I want to encourage Julia adoption and no one wants to be spamming everyone whenever they install a package.

@cmcaine
Copy link

cmcaine commented Jun 3, 2019

This is also frustrating for me for similar reasons. Is there something that I could do to get this merged?

@lobingera
Copy link
Contributor

@cmcaine I can take a look when i'm home, but LGTM

@lobingera lobingera merged commit c8595e5 into JuliaPackaging:master Jun 3, 2019
@cmcaine
Copy link

cmcaine commented Jun 3, 2019

Thank you!

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.

4 participants