From dc339c4cee04702991cfe9f2935723751708842e Mon Sep 17 00:00:00 2001 From: Mark Reynolds Date: Feb 27 2020 20:06:35 +0000 Subject: Issue 50872 - dsconf can't create GSSAPI replication agreements Description: An error in python syntax broke the check for bind method vs credentials. Bug was found and fixed by: quentinmit (Thanks!) relates: https://pagure.io/389-ds-base/issue/50872 Reviewed by: mreynolds (cherry picked from commit 75a51aa395018d75b7feca38101cc89fa4627e1c) --- diff --git a/src/lib389/lib389/cli_conf/replication.py b/src/lib389/lib389/cli_conf/replication.py index 1c0c925..8e77c36 100644 --- a/src/lib389/lib389/cli_conf/replication.py +++ b/src/lib389/lib389/cli_conf/replication.py @@ -663,7 +663,7 @@ def add_agmt(inst, basedn, log, args): properties['nsds5replicastripattrs'] = args.strip_list # We do need the bind dn and credentials for none-sasl bind methods - if (bind_method == 'simple' or 'sslclientauth') and (args.bind_dn is None or args.bind_passwd is None): + if (bind_method in ('simple', 'sslclientauth')) and (args.bind_dn is None or args.bind_passwd is None): raise ValueError("You need to set the bind dn (--bind-dn) and the password (--bind-passwd) for bind method ({})".format(bind_method)) # Create the agmt diff --git a/src/lib389/lib389/replica.py b/src/lib389/lib389/replica.py index 0fc1275..e3fc7fe 100644 --- a/src/lib389/lib389/replica.py +++ b/src/lib389/lib389/replica.py @@ -16,7 +16,6 @@ import logging import uuid import json import copy -from shutil import copyfile from operator import itemgetter from itertools import permutations from lib389._constants import *