e3ffab
From 208c877a8d9981d11d90fc6599e15f5f40bd3168 Mon Sep 17 00:00:00 2001
e3ffab
From: Martin Basti <mbasti@redhat.com>
e3ffab
Date: Thu, 4 Dec 2014 15:11:00 +0100
e3ffab
Subject: [PATCH] Show SSHFP record containing space in fingerprint
e3ffab
e3ffab
SSHFP records added by nsupdate contains extra space (valid), framework
e3ffab
couldn't handle it.
e3ffab
e3ffab
Ticket: https://fedorahosted.org/freeipa/ticket/4790
e3ffab
Ticket: https://fedorahosted.org/freeipa/ticket/4789
e3ffab
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
e3ffab
---
e3ffab
 ipalib/plugins/dns.py | 8 ++++++++
e3ffab
 1 file changed, 8 insertions(+)
e3ffab
e3ffab
diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py
e3ffab
index c5d96a8c4fcdf101254ecefb60cb83d63bee6310..34afc189866993481229bb68a5edd77e0a4eaff3 100644
e3ffab
--- a/ipalib/plugins/dns.py
e3ffab
+++ b/ipalib/plugins/dns.py
e3ffab
@@ -1437,6 +1437,14 @@ class SSHFPRecord(DNSRecord):
e3ffab
         ),
e3ffab
     )
e3ffab
 
e3ffab
+    def _get_part_values(self, value):
e3ffab
+        # fingerprint part can contain space in LDAP, return it as one part
e3ffab
+        values = value.split(None, 2)
e3ffab
+        if len(values) != len(self.parts):
e3ffab
+            return None
e3ffab
+        return tuple(values)
e3ffab
+
e3ffab
+
e3ffab
 class TARecord(DNSRecord):
e3ffab
     rrtype = 'TA'
e3ffab
     supported = False
e3ffab
-- 
e3ffab
2.1.0
e3ffab