mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Client install root privileges check
ipa-client-install was failing and returning traceback when wasn't run by root. It was caused by logging initialization that was taking part before the root privileges check. To correct it, the check was moved before the logging initialization. https://fedorahosted.org/freeipa/ticket/2123
This commit is contained in:
parent
e84bd27af2
commit
bf57388e54
@ -1250,11 +1250,11 @@ def install(options, env, fstore, statestore):
|
||||
def main():
|
||||
safe_options, options = parse_options()
|
||||
|
||||
if not os.getegid() == 0:
|
||||
sys.exit("\nYou must be root to run ipa-client-install.\n")
|
||||
logging_setup(options)
|
||||
logging.debug('%s was invoked with options: %s' % (sys.argv[0], safe_options))
|
||||
logging.debug("missing options might be asked for interactively later\n")
|
||||
if not os.getegid() == 0:
|
||||
sys.exit("\nYou must be root to run ipa-client-install.\n")
|
||||
|
||||
env={"PATH":"/bin:/sbin:/usr/kerberos/bin:/usr/kerberos/sbin:/usr/bin:/usr/sbin"}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user