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

cli: improve sudo detection with euid check for warnings/errors #3159

Merged
merged 2 commits into from
Jun 5, 2020

Conversation

cjp256
Copy link
Contributor

@cjp256 cjp256 commented Jun 5, 2020

Some environments will sudo to another user. To avoid
unnecessary warnings/errors, additionally check that the
effective user is root.

Signed-off-by: Chris Patterson chris.patterson@canonical.com

  • Have you followed the guidelines for contributing?
  • Have you signed the CLA?
  • Have you successfully run ./runtests.sh static?
  • Have you successfully run ./runtests.sh tests/unit?

Chris Patterson and others added 2 commits June 5, 2020 12:40
Some environments will `sudo` to another user.  To avoid
unnecessary warnings/errors, additionally check that the
effective user is root.

Signed-off-by: Chris Patterson <chris.patterson@canonical.com>
@sergiusens sergiusens added the bug Actual bad behavior that don't fall into maintenance or documentation label Jun 5, 2020
@sergiusens sergiusens merged commit a68a23f into master Jun 5, 2020
@sergiusens sergiusens deleted the sudo-euid branch June 5, 2020 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Actual bad behavior that don't fall into maintenance or documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants