Original Submission Dear all,
We are using Tuleap connected to an Active Directory.
When clicking "Afficher l'arbre SVN" we get this python traceback :
<--- snip --->
Traceback (most recent call last):
File "/usr/share/viewvc/lib/viewvc.py", line 3814, in main
request.run_viewvc()
File "/usr/share/viewvc/lib/viewvc.py", line 318, in run_viewvc
if not svnaccess.check_read_access(user.user_getname(), self.rootpath, self.where):
File "/usr/share/codendi/src/www/../utils/svn/svnaccess.py", line 130, in check_read_access
username = get_name_for_svn_access(svnrepo, username)
File "/usr/share/codendi/src/www/../utils/svn/svnaccess.py", line 119, in get_name_for_svn_access
return codendildap.get_login_from_username(username)
File "/usr/share/codendi/src/www/../utils/svn/codendildap.py", line 60, in get_login_from_username
return get_login_from_eduid(row['ldap_id'])
File "/usr/share/codendi/src/www/../utils/svn/codendildap.py", line 43, in get_login_from_eduid
l = ldap_connect()
File "/usr/share/codendi/src/www/../utils/svn/codendildap.py", line 33, in ldap_connect
l = ldap.initialize(server)
File "/usr/lib64/python2.4/site-packages/ldap/functions.py", line 85, in initialize
return LDAPObject(uri,trace_level,trace_file,trace_stack_limit)
File "/usr/lib64/python2.4/site-packages/ldap/ldapobject.py", line 67, in __init__
self._l = ldap.functions._ldap_function_call(_ldap.initialize,uri)
File "/usr/lib64/python2.4/site-packages/ldap/functions.py", line 57, in _ldap_function_call
result = func(*args,**kwargs)
LDAPError: (13, 'Permission denied')
<--- snip --->
Replacing ldap.initialize by ldap.open on line 33 in /usr/share/codendi/src/utils/svn/codendildap.py fixes the problem which seems to be normal as $sys_ldap_server contains a simple hostname and not an URI.
Patch follows:
--- codendildap.py.orig 2013-06-26 17:15:03.000000000 +0200
+++ codendildap.py 2013-06-26 17:25:44.000000000 +0200
@@ -30,7 +30,7 @@
def ldap_connect():
for server in include.sys_ldap_server.split(','):
try:
- l = ldap.initialize(server)
+ l = ldap.open(server)
if hasattr(include, 'sys_ldap_bind_dn'):
l.simple_bind_s(include.sys_ldap_bind_dn, include.sys_ldap_bind_passwd)
else:
Thanks and best regards,
Raphaël
P.S. Packages versions:
tuleap-6.1-1
python-ldap-2.2.0-2.1
OS: CentOS 5.9