Hello -
I'm new to this list so please forgive me if I do anything out of the
norm. For the last year and a half I've been applying a fix the
lookup_nisplus.so source to allow for non-standard nisplus maps. The map
extension org_dir is hardcoded in the current and previous source as to
always assume .org_dir to any preceding map name like passwd, hosts, etc.
It occurred to me this morning that maybe I could get this changed in the
native autofs package so that I don't have to keep patching rpms for every
release of RHEL we use at work. Anyhow, I contacted Redhat and they stated
this would be the proper place to suggest a patch. Below you'll find the
patch to C source based on autofs 4.1.3. I know nisplus is probably rarely
used on Linux in most environments, but unfortunately I'm stuck with it in
mine. Please let me know if there is any way to have this patch verified,
and possibly included in future releases.

regards,

Ryan Pisani



#autofs-nisplus.patch
--- autofs-4.1.3.orig/modules/lookup_nisplus.c  2004-01-29
10:01:22.000000000 -0
600
+++ autofs-4.1.3/modules/lookup_nisplus.c       2005-06-16
13:48:26.000000000 -0
500
@@ -74,14 +74,14 @@

        debug(MODPREFIX "looking up %s", name);

-       sprintf(tablename, "[key=%s],%s.org_dir.%s", name, ctxt->mapname,
+       sprintf(tablename, "[key=%s],%s.%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, "[key=*],%s.%s", ctxt->mapname,
                        ctxt->domainname);
                result = nis_list(tablename, FOLLOW_PATH | FOLLOW_LINKS,
NULL, N
ULL);
        }

###END PATCH


_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs

Reply via email to