All of lore.kernel.org
 help / color / mirror / Atom feed
* lookup_nisplus module
@ 2005-09-09 20:33 Ryan Pisani
  2005-09-10  3:11 ` Ian Kent
  0 siblings, 1 reply; 6+ messages in thread
From: Ryan Pisani @ 2005-09-09 20:33 UTC (permalink / raw)
  To: autofs

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

^ permalink raw reply	[flat|nested] 6+ messages in thread
* lookup_nisplus module
@ 2005-09-09 20:31 Ryan Pisani
  0 siblings, 0 replies; 6+ messages in thread
From: Ryan Pisani @ 2005-09-09 20:31 UTC (permalink / raw)
  To: autofs

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-09-12  3:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-09 20:33 lookup_nisplus module Ryan Pisani
2005-09-10  3:11 ` Ian Kent
2005-09-10  3:18   ` Ryan Pisani
2005-09-10  3:36     ` Ian Kent
2005-09-12  3:19       ` Peter C. Norton
  -- strict thread matches above, loose matches on Subject: below --
2005-09-09 20:31 Ryan Pisani

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.