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 authored and Petr Vobornik committed 2014-11-13 13:16:12 +01:00
1 parent 40ea328a78
commit c32ecbff8c
1 file changed
+1 -1
+1 -1
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)