All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] retrieve LDAP error message string
@ 2004-09-20  8:03 Jun Futagawa
  2004-09-22  7:33 ` Ian Kent
  0 siblings, 1 reply; 2+ messages in thread
From: Jun Futagawa @ 2004-09-20  8:03 UTC (permalink / raw)
  To: autofs

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.

--- autofs-4.1.3/modules/lookup_ldap.c.orig	2004-04-03 16:14:33.000000000 +0900
+++ autofs-4.1.3/modules/lookup_ldap.c	2004-09-20 13:36:53.193400776 +0900
@@ -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.

-- 
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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch] retrieve LDAP error message string
  2004-09-20  8:03 [patch] retrieve LDAP error message string Jun Futagawa
@ 2004-09-22  7:33 ` Ian Kent
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Kent @ 2004-09-22  7:33 UTC (permalink / raw)
  To: Jun Futagawa; +Cc: autofs


Thanks. I'll merge this.

On Mon, 20 Sep 2004, Jun Futagawa wrote:

> 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.
> 
> --- autofs-4.1.3/modules/lookup_ldap.c.orig	2004-04-03 16:14:33.000000000 +0900
> +++ autofs-4.1.3/modules/lookup_ldap.c	2004-09-20 13:36:53.193400776 +0900
> @@ -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.
> 
> -- 
> 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
> autofs@linux.kernel.org
> http://linux.kernel.org/mailman/listinfo/autofs
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-09-22  7:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-20  8:03 [patch] retrieve LDAP error message string Jun Futagawa
2004-09-22  7:33 ` Ian Kent

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.