diff options
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) |