Search using proper scope when connecting CA instances

The wrong search scope was being used when trying to determine if
a given master had a CA installed when trying to create a new
connection.

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

Reviewed-By: Nathaniel McCallum <npmccallum@redhat.com>
This commit is contained in:
Rob Crittenden 2014-11-06 16:10:01 -05:00 committed by Petr Vobornik
parent 40ea328a78
commit c32ecbff8c

View File

@ -303,7 +303,7 @@ def add_link(realm, replica1, replica2, dirman_passwd, options):
dn = DN(('cn', 'CA'), ('cn', replica2), ('cn', 'masters'), ('cn', 'ipa'), ('cn', 'etc'),
ipautil.realm_to_suffix(realm))
conn.get_entries(dn, conn.SCOPE_ONELEVEL)
conn.get_entries(dn, conn.SCOPE_BASE)
conn.unbind()
except errors.NotFound:
sys.exit('%s does not have a CA configured.' % replica2)