diff options
author | Rob Crittenden <rcritten@redhat.com> | 2009-12-16 16:04:53 -0500 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2009-12-16 19:26:59 -0700 |
commit | c3f9ec14d90c46f20bd03311e9b31e8fa7c116ce (patch) | |
tree | a4019f771531ab227791515b49cc8f632bb3afff /ipaserver/plugins | |
parent | 585540e0a2d28d0e275dcb17d317880ff1a6d80f (diff) | |
download | freeipa-c3f9ec14d90c46f20bd03311e9b31e8fa7c116ce.tar.gz freeipa-c3f9ec14d90c46f20bd03311e9b31e8fa7c116ce.tar.xz freeipa-c3f9ec14d90c46f20bd03311e9b31e8fa7c116ce.zip |
Make hosts more like real services so we can issue certs for host principals
This patch should make joining a client to the domain and using certmonger
to get an initial certificate work.
Diffstat (limited to 'ipaserver/plugins')
-rw-r--r-- | ipaserver/plugins/join.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/ipaserver/plugins/join.py b/ipaserver/plugins/join.py index 34f4c58cb..fe9f88dd9 100644 --- a/ipaserver/plugins/join.py +++ b/ipaserver/plugins/join.py @@ -91,13 +91,14 @@ class join(Command): try: # First see if the host exists kw = {'fqdn': hostname, 'all': True} - (dn, attrs_list) = api.Command['host_show'](**kw) + attrs_list = api.Command['host_show'](**kw)['result'] + dn = attrs_list['dn'] # If no principal name is set yet we need to try to add # one. if 'krbprincipalname' not in attrs_list: service = "host/%s@%s" % (hostname, api.env.realm) - (d, a) = api.Command['host_mod'](hostname, krbprincipalname=service) + api.Command['host_mod'](hostname, krbprincipalname=service) # It exists, can we write the password attributes? allowed = ldap.can_write(dn, 'krblastpwdchange') @@ -105,9 +106,11 @@ class join(Command): raise errors.ACIError(info="Insufficient 'write' privilege to the 'krbLastPwdChange' attribute of entry '%s'." % dn) kw = {'fqdn': hostname, 'all': True} - (dn, attrs_list) = api.Command['host_show'](**kw) + attrs_list = api.Command['host_show'](**kw)['result'] + dn = attrs_list['dn'] except errors.NotFound: - (dn, attrs_list) = api.Command['host_add'](hostname) + attrs_list = api.Command['host_add'](hostname)['result'] + dn = attrs_list['dn'] return (dn, attrs_list) |