diff options
author | Jan Cholasta <jcholast@redhat.com> | 2012-10-11 04:26:56 -0400 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2012-10-11 12:19:17 +0200 |
commit | a51b65d9d40fa09bf33d7dff875e5cba6d51d2d2 (patch) | |
tree | 762f29f65633969df0497d43285d2a17693cc08f | |
parent | f1ce31486c3032e92780421164a2e12a56693075 (diff) | |
download | freeipa-a51b65d9d40fa09bf33d7dff875e5cba6d51d2d2.tar.gz freeipa-a51b65d9d40fa09bf33d7dff875e5cba6d51d2d2.tar.xz freeipa-a51b65d9d40fa09bf33d7dff875e5cba6d51d2d2.zip |
Do not show full SSH public keys in command output by default.
-rw-r--r-- | ipalib/util.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ipalib/util.py b/ipalib/util.py index ca14aee36..3fe5c9f44 100644 --- a/ipalib/util.py +++ b/ipalib/util.py @@ -296,7 +296,7 @@ def validate_sshpubkey_no_options(ugettext, value): def convert_sshpubkey_post(ldap, dn, entry_attrs): if 'ipasshpubkey' in entry_attrs: - pubkeys = entry_attrs.pop('ipasshpubkey') + pubkeys = entry_attrs['ipasshpubkey'] else: old_entry_attrs = ldap.get_entry(dn, ['ipasshpubkey']) pubkeys = old_entry_attrs[1].get('ipasshpubkey') @@ -320,8 +320,8 @@ def convert_sshpubkey_post(ldap, dn, entry_attrs): newpubkeys.append(pubkey.openssh()) fingerprints.append(fp) - if newpubkeys: - entry_attrs['ipasshpubkey'] = newpubkeys + if 'ipasshpubkey' in entry_attrs: + entry_attrs['ipasshpubkey'] = newpubkeys or None if fingerprints: entry_attrs['sshpubkeyfp'] = fingerprints |