summaryrefslogtreecommitdiffstats
path: root/ipa-client
diff options
context:
space:
mode:
authorOndrej Hamada <ohamada@redhat.com>2011-11-18 13:55:16 +0100
committerMartin Kosek <mkosek@redhat.com>2011-11-21 09:39:37 +0100
commitbf57388e54261874f3a4c8d77de4e7993f7f62ed (patch)
tree186246a77686b981978455b75b8825f4f114d7ee /ipa-client
parente84bd27af2db254fb1ed5ccc58202f0fb5c6f8cc (diff)
downloadfreeipa-bf57388e54261874f3a4c8d77de4e7993f7f62ed.tar.gz
freeipa-bf57388e54261874f3a4c8d77de4e7993f7f62ed.tar.xz
freeipa-bf57388e54261874f3a4c8d77de4e7993f7f62ed.zip
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
Diffstat (limited to 'ipa-client')
-rwxr-xr-xipa-client/ipa-install/ipa-client-install4
1 files changed, 2 insertions, 2 deletions
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"}