Re: [Freeipa-devel] [PATCH 0174] Show SSHFP record in CLI if contains space in fingerprint part

2014-12-10 Thread Jan Cholasta

Hi,

Dne 4.12.2014 v 15:22 Martin Basti napsal(a):

SSHFP records added by nsupdate contains space in fingerprint part, this
space prevent framework to show record.

Fixes
https://fedorahosted.org/freeipa/ticket/4789
https://fedorahosted.org/freeipa/ticket/4790

Patch attached.


Thanks, ACK.

Pushed to:
master: b5ff0b941efad5170ff5fdda4ab05b9f1c7a2113
ipa-4-1: d229c4a1cc397cfe6adf661b6bcc8360a758248c

Honza

--
Jan Cholasta

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


[Freeipa-devel] [PATCH 0174] Show SSHFP record in CLI if contains space in fingerprint part

2014-12-04 Thread Martin Basti
SSHFP records added by nsupdate contains space in fingerprint part, this 
space prevent framework to show record.


Fixes
https://fedorahosted.org/freeipa/ticket/4789
https://fedorahosted.org/freeipa/ticket/4790

Patch attached.

--
Martin Basti

From 37fa4ddcd331807067f88142e43edddc1012ce52 Mon Sep 17 00:00:00 2001
From: Martin Basti mba...@redhat.com
Date: Thu, 4 Dec 2014 15:11:00 +0100
Subject: [PATCH] Show SSHFP record containing space in fingerprint

SSHFP records added by nsupdate contains extra space (valid), framework
couldn't handle it.

Ticket: https://fedorahosted.org/freeipa/ticket/4790
Ticket: https://fedorahosted.org/freeipa/ticket/4789
---
 ipalib/plugins/dns.py | 8 
 1 file changed, 8 insertions(+)

diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py
index c5d96a8c4fcdf101254ecefb60cb83d63bee6310..34afc189866993481229bb68a5edd77e0a4eaff3 100644
--- a/ipalib/plugins/dns.py
+++ b/ipalib/plugins/dns.py
@@ -1437,6 +1437,14 @@ class SSHFPRecord(DNSRecord):
 ),
 )
 
+def _get_part_values(self, value):
+# fingerprint part can contain space in LDAP, return it as one part
+values = value.split(None, 2)
+if len(values) != len(self.parts):
+return None
+return tuple(values)
+
+
 class TARecord(DNSRecord):
 rrtype = 'TA'
 supported = False
-- 
1.8.3.1

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel