Retrieve password/keytab state when modifying a host.

ticket https://fedorahosted.org/freeipa/ticket/1714
This commit is contained in:
Rob Crittenden authored and Endi S. Dewata committed 2011-08-25 16:38:38 +00:00
1 parent 50a898855c
commit 6dfd7c8242
2 files changed
+7

No files matched your search

+5
View File
@@ -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)
+2
View File
@@ -255,6 +255,8 @@ class test_host(Declarative):
md5_fingerprint=fuzzy_hash,
sha1_fingerprint=fuzzy_hash,
issuer=fuzzy_issuer,
has_keytab=False,
has_password=False,
),
),
),