All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guillaume Rousse <Guillaume.Rousse@inria.fr>
To: autofs@linux.kernel.org
Subject: Re: autofs 5.0.1-rc1 still doesn't find master map	in	ldap automatically
Date: Fri, 25 Aug 2006 17:29:11 +0200	[thread overview]
Message-ID: <44EF1747.5010103@inria.fr> (raw)
In-Reply-To: <1156512652.30971.19.camel@raven.themaw.net>

Ian Kent wrote:
> On Fri, 2006-08-25 at 21:18 +0800, Ian Kent wrote:
>> On Fri, 2006-08-25 at 14:49 +0200, Guillaume Rousse wrote:
>>> Ian Kent wrote:
>>>> On Fri, 25 Aug 2006, Guillaume Rousse wrote:
>>>>
>>>>> Ian Kent wrote:
>>>>>>> I'll try to run it in the debugger, but I have to fix my debug package
>>>>>>> first.
>>>>> gdbdoesn't complain anymore about missing symbols, but despite my
>>>>> attempts, I've been unable to set a working break point on faulty
>>>>> function (get_query_dn).
>>>> Is your LDAP client able to query this stuff with only the information 
>>>> used in the autofs queries (the ones you see in the debug output)?
>>> Not sure to understand you here. I get nothing else in my debug output
>>> than: failed to get query dn
>> Have you setup syslog.conf to log daemon.* to somewhere?
>> You won't get much at all unless syslog is sending it some where.
>>
>> Mmmm .. I see I don't debug print the query in get_query_dn.
>>
>> But looking at the code, if there is a map name the filter would be
>> something like:
>>
>> (&(objectclass=<map_obj_class>)(<map_attr>=<map name>))
>>
>> so I think for your defaults that would be
>>
>> (&(objectclass=automountMap)(ou=auto.master))
>>
>> It gets the base dn from the output of this query.
>> If that doesn't work nothing else does, but you already know that.
> 
> Oh .. btw .. to get quick info you can just stick an error print in
> like:
> 
> error(LOGOPT_ANY, "query %s", query);
> 
> and it should show up in the log regardless of the debug setting.
OK, I found the issue: when all you have is mapname, and you have to use
default server and base, you should use LDAP_SCOPE_SUBTREE scope for
your query, not LDAP_SCOPE_ONELEVEL.

Here is a patch that fixes the problem:
diff -Naur autofs-5.0.1/modules/lookup_ldap.c
autofs-5.0.1-fix-ldap-lookup/modules/lookup_ldap.c
--- autofs-5.0.1/modules/lookup_ldap.c  2006-07-13 04:11:39.000000000 -0400
+++ autofs-5.0.1-fix-ldap-lookup/modules/lookup_ldap.c  2006-08-25
11:19:59.000000000 -0400
@@ -802,7 +802,7 @@
                              MODPREFIX "error forming query string");
                        return 0;
                }
-               scope = LDAP_SCOPE_ONELEVEL;
+               scope = LDAP_SCOPE_SUBTREE;
        } else {
                if (sprintf(query, "(objectclass=%s)", class) >= l) {
                        debug(LOGOPT_NONE,


> I find getting a gdb session going is a hassle much of the time.
It depends on your setup. I usually build my packages on mandriva
cluster, and install then on my own machines for testing them, rather
than directly building and installing locally.
-- 
Guillaume Rousse
Projet Estime, INRIA
Domaine de Voluceau
Rocquencourt - B.P. 105
78153 Le Chesnay Cedex - France

  reply	other threads:[~2006-08-25 15:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-24 14:36 autofs 5.0.1-rc1 still doesn't find master map in ldap automatically Guillaume Rousse
2006-08-25  1:24 ` Ian Kent
2006-08-25  7:22   ` Guillaume Rousse
2006-08-25 11:21     ` Ian Kent
2006-08-25 12:25       ` Guillaume Rousse
2006-08-25 12:35         ` Ian Kent
2006-08-25 12:49           ` Guillaume Rousse
2006-08-25 13:18             ` Ian Kent
2006-08-25 13:30               ` Ian Kent
2006-08-25 15:29                 ` Guillaume Rousse [this message]
2006-08-25 15:21                   ` Piete.Brooks--autofs
2006-08-25 16:04                     ` Guillaume Rousse
2006-08-25 17:28                       ` Ian Kent
2006-08-26  3:20                     ` Ian Kent
2006-08-26  6:47                       ` Piete.Brooks--autofs
2006-08-26 10:51                         ` Ian Kent
2006-08-25 13:25         ` 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=44EF1747.5010103@inria.fr \
    --to=guillaume.rousse@inria.fr \
    --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.