Fix kinit invocation in ipa-client-install

This commit is contained in:
Simo Sorce
2011-02-25 17:05:12 -05:00
committed by Adam Young
parent 3f88bc1484
commit 998dd701a7

View File

@@ -546,6 +546,7 @@ CCACHE_FILE = "/etc/ipa/.dns_ccache"
def update_dns(server, hostname): def update_dns(server, hostname):
ip = resolve_ipaddress(server) ip = resolve_ipaddress(server)
princ = 'host/%s' % hostname
sub_dict = dict(HOSTNAME=hostname, sub_dict = dict(HOSTNAME=hostname,
IPADDRESS=ip, IPADDRESS=ip,
@@ -571,7 +572,7 @@ def update_dns(server, hostname):
update_fd.close() update_fd.close()
try: try:
ipautil.run(['/usr/bin/kinit', '-k', '-t', '/etc/krb5.keytab'], ipautil.run(['/usr/bin/kinit', '-k', '-t', '/etc/krb5.keytab', princ],
env={'KRB5CCNAME':CCACHE_FILE}) env={'KRB5CCNAME':CCACHE_FILE})
except CalledProcessError, e: except CalledProcessError, e:
print >>sys.stderr, "Failed to obtain host TGT." print >>sys.stderr, "Failed to obtain host TGT."