Hi folks,
this is my first post to this list. I must admit that I haven't read
any mails yet, and that I'm not particulary interested in developing
autofs further. I just want it to work. :)
Anyway here is my problem:
I was using autofs-3.1.4 from Redhat's rpms and had trouble automounting
any directories using nisplus-maps. The same behavior occured, when I
was using up-to-date nis-utils-1.3 and autofs-3.1.7. I filed a bug
report at Redhat's bugzilla (BUG #21517, see
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=21517), but they
wouldn't help me there, so I looked at the source of Thorsten Kukuk's
nismatch and found a solution.
The statement
sprintf (tablename, "[key=%s],%s.org_dir.%s", name, ctxt->mapname,
ctxt->domainname);
in modules/lookup_nisplus.c seems to be wrong. Thorsten uses some
nisplus-call to find out what to put instead of "key". This happens to
be "mountpoint", and when I substitute mountpoint for key, autofs works
just fine with nisplus-maps. Now, I don't know much about NIS+, so I
can't tell, whether this is the real sollution, or if more has to be
done. It works for me, though.
Here's the patch:
-----8< cut here >8-----
--- lookup_nisplus.c.orig Thu Dec 7 16:13:48 2000
+++ lookup_nisplus.c Thu Dec 7 16:15:32 2000
@@ -69,14 +69,14 @@
syslog(LOG_DEBUG, MODPREFIX "looking up %s", name);
- sprintf (tablename, "[key=%s],%s.org_dir.%s", name, ctxt->mapname,
+ sprintf (tablename, "[mountpoint=%s],%s.org_dir.%s", name,
ctxt->mapname,
ctxt->domainname);
result = nis_list (tablename, FOLLOW_PATH | FOLLOW_LINKS, NULL,
NULL);
if (result->status != NIS_SUCCESS && result->status != NIS_S_SUCCESS)
{
/* Try to get the "*" entry if there is one - note that we *don't*
modify "name" so & -> the name we used, not "*" */
- sprintf (tablename, "[key=*],%s.org_dir.%s", ctxt->mapname,
+ sprintf (tablename, "[mountpoint=*],%s.org_dir.%s", ctxt->mapname,
ctxt->domainname);
result = nis_list (tablename, FOLLOW_PATH | FOLLOW_LINKS, NULL,
NULL);
}
-----8< cut here >8-----
Hopes that helps a little.
MfG Viktor
--
Viktor Rosenfeld
Max-Born-Institut fuer Nichtlineare Optik und Kurzzeitspektroskopie
Max-Born-Strasse 2A, D-12489 Berlin, Germany
E-Mail: mailto:[EMAIL PROTECTED]
WWW: http://www.informatik.hu-berlin.de/