From bf57388e54261874f3a4c8d77de4e7993f7f62ed Mon Sep 17 00:00:00 2001 From: Ondrej Hamada Date: Fri, 18 Nov 2011 13:55:16 +0100 Subject: 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 --- ipa-client/ipa-install/ipa-client-install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ipa-client/ipa-install/ipa-client-install') diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install index cdea6dbe6..9f7d3fd33 100755 --- a/ipa-client/ipa-install/ipa-client-install +++ b/ipa-client/ipa-install/ipa-client-install @@ -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"} -- cgit