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

test getuid() == 0 instead of arbitrary 502 #5222

Merged
merged 1 commit into from Jul 28, 2016

Conversation

Projects
None yet
2 participants
@benjaoming
Member

benjaoming commented Jul 27, 2016

Summary

Seems like an old bug and some kind of untested code that's been introduced a long time ago.

TODO

If not all TODOs are marked, this PR is considered WIP (work in progress)

  • Have tests been written for the new code? If you're fixing a bug, write a regression test (or have a really good reason for not writing one... and I mean really good!)
  • Has documentation been written/updated?
  • New dependencies (if any) added to requirements file

Reviewer guidance

If you're a Mac expert the please feel free to jump in.

Otherwise please feel convinced by this:

➜  ka-lite git:(fix-uid-check) sudo python
Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.getuid()
0

Issues addressed

#5032

@benjaoming benjaoming added the bug label Jul 27, 2016

@benjaoming benjaoming added this to the 0.16.7 milestone Jul 27, 2016

@benjaoming benjaoming added the has PR label Jul 27, 2016

@benjaoming

This comment has been minimized.

Member

benjaoming commented Jul 28, 2016

screenshot from 2016-07-28 18 53 41

@benjaoming

This comment has been minimized.

Member

benjaoming commented Jul 28, 2016

Since this works fine, I'm merging it.. it might interfere with deployments that deliberately use root, but using --noinput silences the prompt.

@j-schwartz just a heads up on this...

@benjaoming benjaoming merged commit 6954468 into learningequality:0.16.x Jul 28, 2016

1 check passed

ci/circleci Your tests passed on CircleCI!
Details

@benjaoming benjaoming removed the has PR label Jul 28, 2016

@benjaoming benjaoming deleted the benjaoming:fix-uid-check branch Jul 31, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment