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

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

Merged
merged 1 commit into from Jul 28, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 2 additions & 5 deletions kalite/distributed/management/commands/setup.py
Expand Up @@ -257,11 +257,8 @@ def handle(self, *args, **options):
"--------------------------------------------------------------------------------")
raw_input("Press [enter] to continue...")

# Tried not to be os-specific, but ... hey. :-/
# benjaoming: This doesn't work, why is 502 hard coded!? Root is normally
# '0' And let's not care about stuff like this, people can be free to
# run this as root if they want :)
if not is_windows() and hasattr(os, "getuid") and os.getuid() == 502:
# Assuming uid '0' is always root
if not is_windows() and hasattr(os, "getuid") and os.getuid() == 0:
print(
"-------------------------------------------------------------------")
print("WARNING: You are installing KA-Lite as root user!")
Expand Down