py3: CA/KRA: config parser requires string

basedn is DN object it has to be converted to string before it can be
used with config parser

https://fedorahosted.org/freeipa/ticket/4985

Reviewed-By: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
Martin Basti 2017-01-09 19:28:57 +01:00
parent 7ae5e5f669
commit 0d4074b4f1
2 changed files with 4 additions and 2 deletions

View File

@ -33,6 +33,7 @@ import syslog
import time
import tempfile
import six
# pylint: disable=import-error
from six.moves.configparser import ConfigParser, RawConfigParser
# pylint: enable=import-error
@ -500,7 +501,7 @@ class CAInstance(DogtagInstance):
# Directory server
config.set("CA", "pki_ds_ldap_port", "389")
config.set("CA", "pki_ds_password", self.dm_password)
config.set("CA", "pki_ds_base_dn", self.basedn)
config.set("CA", "pki_ds_base_dn", six.text_type(self.basedn))
config.set("CA", "pki_ds_database", "ipaca")
if self.use_ldaps:

View File

@ -22,6 +22,7 @@ import pwd
import shutil
import tempfile
import six
# pylint: disable=import-error
from six.moves.configparser import ConfigParser
# pylint: enable=import-error
@ -190,7 +191,7 @@ class KRAInstance(DogtagInstance):
# Directory server
config.set("KRA", "pki_ds_ldap_port", "389")
config.set("KRA", "pki_ds_password", self.dm_password)
config.set("KRA", "pki_ds_base_dn", self.basedn)
config.set("KRA", "pki_ds_base_dn", six.text_type(self.basedn))
config.set("KRA", "pki_ds_database", "ipaca")
config.set("KRA", "pki_ds_create_new_db", "False")