summaryrefslogtreecommitdiffstats
path: root/ipa-server/ipaserver/ipaldap.py
diff options
context:
space:
mode:
authorrcritten@redhat.com <rcritten@redhat.com>2007-09-21 14:39:52 -0400
committerrcritten@redhat.com <rcritten@redhat.com>2007-09-21 14:39:52 -0400
commit2fec56d679ff686c4bb3d2fe37b8e0866ad765b4 (patch)
treee119c8274415ccb24a2d60bc14bdbab276786214 /ipa-server/ipaserver/ipaldap.py
parent7b969737112c7a26711c3d4a9713ef1ca30f1be8 (diff)
downloadfreeipa.git-2fec56d679ff686c4bb3d2fe37b8e0866ad765b4.tar.gz
freeipa.git-2fec56d679ff686c4bb3d2fe37b8e0866ad765b4.tar.xz
freeipa.git-2fec56d679ff686c4bb3d2fe37b8e0866ad765b4.zip
Enable LDAP debugging using the mod_python Apache configuration directive
PythonOption IPADebug On/Off
Diffstat (limited to 'ipa-server/ipaserver/ipaldap.py')
-rw-r--r--ipa-server/ipaserver/ipaldap.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ipa-server/ipaserver/ipaldap.py b/ipa-server/ipaserver/ipaldap.py
index 69d90922..ffbb2168 100644
--- a/ipa-server/ipaserver/ipaldap.py
+++ b/ipa-server/ipaserver/ipaldap.py
@@ -209,13 +209,14 @@ class IPAdmin(SimpleLDAPObject):
else:
SimpleLDAPObject.__init__(self,'ldap://%s:%d' % (self.host,self.port))
- def __init__(self,host,port,cacert,bindcert,bindkey,proxydn=None):
+ def __init__(self,host,port,cacert,bindcert,bindkey,proxydn=None,debug=None):
"""We just set our instance variables and wrap the methods - the real
work is done in __localinit__ and __initPart2 - these are separated
out this way so that we can call them from places other than
instance creation e.g. when we just need to reconnect, not create a
new instance"""
-# ldap.set_option(ldap.OPT_DEBUG_LEVEL,255)
+ if debug.lower() == "on":
+ ldap.set_option(ldap.OPT_DEBUG_LEVEL,255)
if cacert is not None:
ldap.set_option(ldap.OPT_X_TLS_CACERTFILE,cacert)
ldap.set_option(ldap.OPT_X_TLS_CERTFILE,bindcert)