Make sure only root can run ipa-client-install

https://fedorahosted.org/freeipa/ticket/957
This commit is contained in:
Jakub Hrozek 2011-02-12 10:28:06 +01:00 committed by Rob Crittenden
parent da1fe966de
commit 856d890bb3

View File

@ -810,6 +810,9 @@ def main():
try: try:
if __name__ == "__main__": if __name__ == "__main__":
if not os.getegid() == 0:
sys.exit("\nYou must be root to run ipa-client-install.\n")
sys.exit(main()) sys.exit(main())
except SystemExit, e: except SystemExit, e:
sys.exit(e) sys.exit(e)