diff options
author | Rob Crittenden <rcritten@redhat.com> | 2011-08-25 09:24:47 -0400 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2011-08-25 16:38:48 +0000 |
commit | 4a9319a2a90861101d6775498d194d14cfc20cf6 (patch) | |
tree | 955a3d799370a80106ed39ebfecaf6017132a733 /ipalib | |
parent | ddb31f54431213266b7cdde53ad3616b1cfd0bad (diff) | |
download | freeipa-4a9319a2a90861101d6775498d194d14cfc20cf6.tar.gz freeipa-4a9319a2a90861101d6775498d194d14cfc20cf6.tar.xz freeipa-4a9319a2a90861101d6775498d194d14cfc20cf6.zip |
Retrieve password/keytab state when modifying a host.
ticket https://fedorahosted.org/freeipa/ticket/1714
Diffstat (limited to 'ipalib')
-rw-r--r-- | ipalib/plugins/host.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ipalib/plugins/host.py b/ipalib/plugins/host.py index 6e9efec1a..6c590ca4f 100644 --- a/ipalib/plugins/host.py +++ b/ipalib/plugins/host.py @@ -667,6 +667,11 @@ class host_mod(LDAPUpdate): if options.get('random', False): entry_attrs['randompassword'] = unicode(getattr(context, 'randompassword')) set_certificate_attrs(entry_attrs) + self.obj.get_password_attributes(ldap, dn, entry_attrs) + if entry_attrs['has_password']: + # If an OTP is set there is no keytab, at least not one + # fetched anywhere. + entry_attrs['has_keytab'] = False if options.get('all', False): entry_attrs['managing'] = self.obj.get_managed_hosts(dn) |