diff options
author | Karl MacMillan <kmacmill@redhat.com> | 2007-12-19 12:16:32 -0500 |
---|---|---|
committer | Karl MacMillan <kmacmill@redhat.com> | 2007-12-19 12:16:32 -0500 |
commit | 6d9974dd95aa5e9e8578c61a3dd71b2a530f1412 (patch) | |
tree | d8d6c1cb0457661ba40ff19802a30e0e92e50fe6 /ipa-server | |
parent | 42f4b72c16252cb2439d1132a25f85ca1a44bd15 (diff) | |
download | freeipa-6d9974dd95aa5e9e8578c61a3dd71b2a530f1412.tar.gz freeipa-6d9974dd95aa5e9e8578c61a3dd71b2a530f1412.tar.xz freeipa-6d9974dd95aa5e9e8578c61a3dd71b2a530f1412.zip |
Simplify kerberos calling.
Diffstat (limited to 'ipa-server')
-rw-r--r-- | ipa-server/ipaserver/installutils.py | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/ipa-server/ipaserver/installutils.py b/ipa-server/ipaserver/installutils.py index db3f6a6f8..33b630b27 100644 --- a/ipa-server/ipaserver/installutils.py +++ b/ipa-server/ipaserver/installutils.py @@ -128,14 +128,7 @@ def update_file(filename, orig, subst): return 1 def kadmin(command): - (kwrite, kread, kerr) = os.popen3("/usr/kerberos/sbin/kadmin.local") - - kwrite.write(command) - kwrite.write("\n") - kwrite.flush() - - for k in (kwrite, kread, kerr): - k.close() + ipautil.run(["/usr/kerberos/sbin/kadmin.local", "-q", command]) def kadmin_addprinc(principal): kadmin("addprinc -randkey " + principal) @@ -152,11 +145,3 @@ def create_keytab(path, principal): kadmin("ktadd -k " + path + " " + principal) - # give kadmin time to actually write the file before we go on - retry = 0 - while not ipautil.file_exists(path): - time.sleep(1) - retry += 1 - if retry > 15: - logging.critical("Error timed out waiting for kadmin to finish operations") - sys.exit(1) |