retrieve LDAP error message string
PATCH 1/1 retrieve LDAP error message string
Hi,
When I updated to v4 from v3, I encountered the following error message.
automount[26411]: lookup(ldap): query failed for (&(objectclass=automount)) automount[26411]: failed to load map, exiting
Since the details of the error were not found, I applied the following patch.
modules/lookup_ldap.c renamed from modules/lookup_ldap.c.orig +1 -1
@@ -222,7 +222,7 @@ query, attrs, 0, &result);if ((rv !=LDAP_SUCCESS ) || (result ==NULL )) { -crit (MODPREFIX "query failed for %s" , query); +crit (MODPREFIX "query failed for %s: %s" , query,ldap_err2string (rv));return 0 ; }
The patched error message in the case of using OpenLDAP is as follows.
automount[29790]: lookup(ldap): query failed for (&(objectclass=automount)): Size limit exceeded automount[29790]: failed to load map, exiting
It was because the search query to LDAP was changed by v3 and v4.
# query for user1 map v4: (&(objectclass=automount)) v3: (&(objectclass=automount)(cn=user1))
I solved this problem by specifying the sizelimit directive to the configuration file of OpenLDAP server for your reference.
http://www.openldap.org/doc/admin22/slapdconfig.html
# /etc/openldap/slapd.conf sizelimit 5000 (The default is 500. But, I have many entries more than it.)
I want this patch to be merged so that the cause of an error can be identified.
Signature · 4 lines
Jun Futagawa SMBLDAP-TOOLS Addons http://smbldap-addons.sourceforge.net/ The smbldap-autofs-tools provides a anagement function of automount and automountMap entries defined by autofs.schema.
Ian Kent
maintainerThanks. I'll merge this.
Quoted 53 lines · Jun Futagawa
Hi,
When I updated to v4 from v3, I encountered the following error message.
automount[26411]: lookup(ldap): query failed for (&(objectclass=automount)) automount[26411]: failed to load map, exiting
Since the details of the error were not found, I applied the following patch.
modules/lookup_ldap.c renamed from modules/lookup_ldap.c.orig +1
-1@@ -222,7 +222,7 @@ query, attrs, 0, &result);if ((rv !=LDAP_SUCCESS ) || (result ==NULL )) { -crit (MODPREFIX "query failed for %s" , query); +crit (MODPREFIX "query failed for %s: %s" , query,ldap_err2string (rv));return 0 ; }The patched error message in the case of using OpenLDAP is as follows.
automount[29790]: lookup(ldap): query failed for (&(objectclass=automount)): Size limit exceeded automount[29790]: failed to load map, exiting
It was because the search query to LDAP was changed by v3 and v4.
# query for user1 map v4: (&(objectclass=automount)) v3: (&(objectclass=automount)(cn=user1))I solved this problem by specifying the sizelimit directive to the configuration file of OpenLDAP server for your reference.
http://www.openldap.org/doc/admin22/slapdconfig.html# /etc/openldap/slapd.conf sizelimit 5000 (The default is 500. But, I have many entries more than it.)I want this patch to be merged so that the cause of an error can be identified.
Signature · 9 lines
Jun Futagawa SMBLDAP-TOOLS Addons http://smbldap-addons.sourceforge.net/ The smbldap-autofs-tools provides a anagement function of automount and automountMap entries defined by autofs.schema. _______________________________________________ autofs mailing list [email protected] http://linux.kernel.org/mailman/listinfo/autofs