diff options
author | Rob Crittenden <rcritten@redhat.com> | 2010-09-10 15:57:40 -0400 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2010-09-10 17:04:01 -0400 |
commit | 67a454951993b1f04f3feeab7462dcaf6d23fb61 (patch) | |
tree | 58f78ff79f90c501a5756d013a55e4c0874f22a0 /ipa-client/ipa-install | |
parent | a091be064d86625a3c3d9152441758819043151e (diff) | |
download | freeipa-67a454951993b1f04f3feeab7462dcaf6d23fb61.tar.gz freeipa-67a454951993b1f04f3feeab7462dcaf6d23fb61.tar.xz freeipa-67a454951993b1f04f3feeab7462dcaf6d23fb61.zip |
Remove some additional instances of krbV from ipa-client
Make two krbV imports conditional. These aren't used during a client
install so should cause no problems.
Also fix the client installer to use the new env option in ipautil.run.
We weren't getting the krb5 configuration set in the environment because
we were overriding the environment to set the PATH.
ticket 136
Diffstat (limited to 'ipa-client/ipa-install')
-rwxr-xr-x | ipa-client/ipa-install/ipa-client-install | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install index d8ce5c930..cf002d316 100755 --- a/ipa-client/ipa-install/ipa-client-install +++ b/ipa-client/ipa-install/ipa-client-install @@ -490,6 +490,7 @@ def main(): options = parse_options() logging_setup(options) dnsok = True + env={"PATH":"/bin:/sbin:/usr/kerberos/bin:/usr/kerberos/sbin:/usr/bin:/usr/sbin"} global fstore fstore = sysrestore.FileStore('/var/lib/ipa-client/sysrestore') @@ -605,7 +606,7 @@ def main(): if configure_krb5_conf(fstore, cli_basedn, cli_realm, cli_domain, cli_server, dnsok, options, krb_name): print "Test kerberos configuration failed" return 1 - os.environ['KRB5_CONFIG'] = krb_name + env['KRB5_CONFIG'] = krb_name join_args = ["/usr/sbin/ipa-join", "-s", cli_server] if options.debug: join_args.append("-d") @@ -627,7 +628,7 @@ def main(): else: stdin = sys.stdin.readline() - (stderr, stdout, returncode) = run(["/usr/kerberos/bin/kinit", principal], raiseonerr=False, stdin=stdin) + (stderr, stdout, returncode) = run(["kinit", principal], raiseonerr=False, stdin=stdin, env=env) print "" if returncode != 0: print stdout @@ -644,7 +645,7 @@ def main(): join_args.append(password) # Now join the domain - (stdout, stderr, returncode) = run(join_args, raiseonerr=False) + (stdout, stderr, returncode) = run(join_args, raiseonerr=False, env=env) if returncode != 0: print "Joining realm failed: %s" % stderr, @@ -660,8 +661,7 @@ def main(): finally: if options.principal is not None: - (stderr, stdout, returncode) = run(["/usr/kerberos/bin/kdestroy"], raiseonerr=False) - del os.environ['KRB5_CONFIG'] + (stderr, stdout, returncode) = run(["kdestroy"], raiseonerr=False, env=env) os.remove(krb_name) os.remove(krb_name + ".ipabkp") |