summaryrefslogtreecommitdiffstats
path: root/ipaclient
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2016-09-05 09:35:42 +0200
committerMartin Basti <mbasti@redhat.com>2016-09-06 12:54:38 +0200
commitafea9616318fbbffc2c296b7c41890db8595e3cc (patch)
tree4e95762fb873d081927e9734dad245e5390f1d53 /ipaclient
parent08b768313020c45bfa82d67cd214afabf605f4b3 (diff)
downloadfreeipa-afea9616318fbbffc2c296b7c41890db8595e3cc.tar.gz
freeipa-afea9616318fbbffc2c296b7c41890db8595e3cc.tar.xz
freeipa-afea9616318fbbffc2c296b7c41890db8595e3cc.zip
dns: normalize record type read interactively in dnsrecord_add
When dnsrecord_add is called without options in interactive mode, it prompts the user to enter a record type. The record type is expected to be upper case further in the code, which causes non-upper case values not to work correctly. Fix this issue by upper casing the value after it is read. https://fedorahosted.org/freeipa/ticket/6203 Reviewed-By: Martin Basti <mbasti@redhat.com>
Diffstat (limited to 'ipaclient')
-rw-r--r--ipaclient/plugins/dns.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ipaclient/plugins/dns.py b/ipaclient/plugins/dns.py
index e17c282fa..db9c17f8b 100644
--- a/ipaclient/plugins/dns.py
+++ b/ipaclient/plugins/dns.py
@@ -175,6 +175,8 @@ class dnsrecord_add(MethodOverride):
if rrtype is None:
return
+ rrtype = rrtype.upper()
+
try:
name = record_name_format % rrtype.lower()
param = self.params[name]