All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jun Futagawa <jfut@featia.net>
To: autofs@linux.kernel.org
Subject: [patch] retrieve LDAP error message string
Date: Mon, 20 Sep 2004 17:03:29 +0900	[thread overview]
Message-ID: <414E8ED1.6040505@featia.net> (raw)

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.

             reply	other threads:[~2004-09-20  8:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-20  8:03 Jun Futagawa [this message]
2004-09-22  7:33 ` [patch] retrieve LDAP error message string Ian Kent

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=414E8ED1.6040505@featia.net \
    --to=jfut@featia.net \
    --cc=autofs@linux.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.