On 03.06.2012 16:55, Andreas B. Mundt wrote:
> On Sun, Jun 03, 2012 at 04:06:37PM +0400, Michael Tokarev wrote:

> I guess autofs doesn't use "nsswitch.conf" at all, does it?

Apparently it does -- this is the very end of default /etc/auto.master
file:

# Include central master map if it can be found using
# nsswitch sources.
#
# Note that if there are entries for /net or /misc (as
# above) in the included master map any keys that are the
# same will not be seen as the first read key seen takes
# precedence.
#
+auto.master

When I put a map into "automount" line in nsswitch.conf
which does not exist, it logs the following line into
daemon.log:

 automount[1519]: ignored unsupported autofs nsswitch source "xyz"

the same happens with ldap if it is in that line and
there's no /usr/lib/autofs/lookup_ldap.so file found.

But wait.  What else uses nsswitch automount entry
if not automount itself?

>> So, on autofs-ldap removal, we should remove ldap entry from
>> automount nsswitch.conf line.  And here we've a few other issues
>> to sort out.  For example, say, we added `files ldap' into it
>> automaticlaly, and the user later changed that to `ldap': in
>> this case we can't remove just the ldap entry, since the line
>> will be wrong in this case.
> 
> Right.
> 
>> And we definitely can not remove whole line too, like is done
>> in sudo-ldap case: we also have hesiod map which should be
>> handled the same way!
> 
> No idea about hesiod.  Does it use "nsswitch.conf"?

It is configured the same way as ldap: using nsswitch.conf.

All maps also can be used directly as well, by specifying
map-type properly in /etc/auto.master.

>> So... I'm not sure what to do really.  Too much smarts often
>> becomes dumber than doing nothing at all... :)
> 
> Yes, again things are more complicated than expected on a first
> sight...

So the only question remains: do you have other users of
automount entry in nsswitch.conf except of autofs package
itself (where it has other mechanism too) ?

I'm about to mark this bug as a wishlist wontfix really... ;)

Thanks,

/mjt



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to