On Sun, Jun 03, 2012 at 04:06:37PM +0400, Michael Tokarev wrote: > On 03.06.2012 15:15, Andreas B. Mundt wrote: > [] > >>> "automount: files ldap" > >> > >> Will it be bad if this line will be left out after removing autofs-ldap > >> package, ie, when automount nsswitch entry is listing non-existing lookup > >> method? I guess I should try... > > > > Apart from leaving cruft back, I guess it should not hurt. > > > >> I mean, is it a bug to leave "ldap" in there on autofs-ldap removal? > > > > Not sure if "leaving cruft behind" is a bug in this case. > > Not really - automount may start complaining or failing. But > apparently it does not. I mean the situation when we leave > `automount: files ldap' line in there on removal of autofs-ldap > package, when autofs package itself is still installed and > functioning. > > And I really dislike this way of leaving ldap entry in place > in this case, even if automount itself appears to be working > fine - I'd say it works by incident not by design, as it should > complain about such an error.
I guess autofs doesn't use "nsswitch.conf" at all, does it? > 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"? > 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... > [] > > From what I learned in the discussions about "/etc/nsswitch.conf", I > > suspect the order of entries does not matter. > > (<URL:http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=639530#10>) > > Well, automount (or any other lookup "consumer" for that matter) should > choose one entry from several available. For example, you can't > expect getpwnam("root") returning TWO entries, if passwd: entry in > nsswitch lists, eg, `files, ldap' and BOTH has definition for the > root user. So order definitely does matter. Oh sorry, I got you wrong, I meant the ordering of the lines. Of course the order of entries in a single line matters, it tries the first, then the second and so on. Regards, Andi -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

