mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Under some conditions rl may not have been initialized so the config may error out with:
UnboundLocalError: "local variable 'rl' referenced before assignment" This is caught and ignored but the result is that the records in DNS may not be used at all. Initializing rl to zero fixes this. I also convert the server list into a set to make each entry unique (and back to a list because that is what we are supposed to return) 433506
This commit is contained in:
parent
b26fc32d9d
commit
ec2eff9774
@ -78,6 +78,7 @@ def __parse_config():
|
||||
pass
|
||||
|
||||
def __discover_config():
|
||||
rl = 0
|
||||
try:
|
||||
if not config.default_realm:
|
||||
krbctx = krbV.default_context()
|
||||
@ -163,6 +164,8 @@ def init_config(args=None):
|
||||
__parse_config()
|
||||
__discover_config()
|
||||
|
||||
config.default_server = list(set(config.default_server))
|
||||
|
||||
if not config.default_realm:
|
||||
raise IPAConfigError("IPA realm not found in DNS, in the config file (/etc/ipa/ipa.conf) or on the command line.")
|
||||
if not config.default_server:
|
||||
|
Loading…
Reference in New Issue
Block a user