summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/dsinstance.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2011-06-10 16:30:13 -0400
committerMartin Kosek <mkosek@redhat.com>2011-06-13 12:54:13 +0200
commit645e55651e866f74b76108fe298526daaffb18ce (patch)
tree0a6512047352c6961b8fd39865adc828ee07fec2 /ipaserver/install/dsinstance.py
parent7940270b9fbebfa09b25c18198933b6a6b82b1d3 (diff)
downloadfreeipa-645e55651e866f74b76108fe298526daaffb18ce.zip
freeipa-645e55651e866f74b76108fe298526daaffb18ce.tar.gz
freeipa-645e55651e866f74b76108fe298526daaffb18ce.tar.xz
Support initializing memberof during replication re-init using GSSAPI
The last step of a replication re-initiailization is to run the memberof task. The current function would only authenticate using simple auth to monitor the task but we may be doing this using admin GSSAPI credentials so support that type of bind as well. In short this fixes: # kinit admin # ipa-replica-manage re-initialize --from=master.example.com https://fedorahosted.org/freeipa/ticket/1248
Diffstat (limited to 'ipaserver/install/dsinstance.py')
-rw-r--r--ipaserver/install/dsinstance.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ipaserver/install/dsinstance.py b/ipaserver/install/dsinstance.py
index 4a0e913..845e1e2 100644
--- a/ipaserver/install/dsinstance.py
+++ b/ipaserver/install/dsinstance.py
@@ -441,7 +441,10 @@ class DsInstance(service.Service):
dn = "cn=IPA install %s,cn=memberof task,cn=tasks,cn=config" % self.sub_dict["TIME"]
logging.debug("Waiting for memberof task to complete.")
conn = ipaldap.IPAdmin("127.0.0.1")
- conn.simple_bind_s("cn=directory manager", self.dm_password)
+ if self.dm_password:
+ conn.simple_bind_s("cn=directory manager", self.dm_password)
+ else:
+ conn.do_sasl_gssapi_bind()
conn.checkTask(dn, dowait=True)
conn.unbind()