From abb0d6645967da335b792a38e8c2037062c577f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B0=D0=BC=D0=BE=D1=83=D0=BA=D0=B8=D0=BD=20=D0=90?= =?UTF-8?q?=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?= Date: Mon, 30 Aug 2010 13:43:02 +0400 Subject: [PATCH] Bugfix --- pym/cl_ldap.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pym/cl_ldap.py b/pym/cl_ldap.py index 65ea3d2..c7e0f23 100644 --- a/pym/cl_ldap.py +++ b/pym/cl_ldap.py @@ -213,16 +213,17 @@ class ldapUser(_error): else: dictOut[dictAttr] = "" elif dictAttr == "groups": - userGroups = [] + userGroupsData = [] for groupDN in groupsDNs: searchGroup = self.ldapObj.ldapSearch(groupDN, ldap.SCOPE_ONELEVEL, "%s=%s" %(ldapAttr,userName), - ["cn"]) + ["cn","gidNumber"]) if searchGroup: - userGroups += map(lambda x: x[0][1]["cn"][0], + userGroupsData += map(lambda x: (x[0][1]["cn"][0], + x[0][1]["gidNumber"][0]), searchGroup) - dictOut[dictAttr] = userGroups + dictOut[dictAttr] = userGroupsData if uid and gid: return dictOut else: