2 * SPDX-License-Identifier: BSD-4-Clause
5 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. All advertising materials mentioning features or use of this software
16 * must display the following acknowledgement:
17 * This product includes software developed by Bill Paul.
18 * 4. Neither the name of the author nor the names of any co-contributors
19 * may be used to endorse or promote products derived from this software
20 * without specific prior written permission.
22 * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR CONTRIBUTORS BE LIABLE
26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 #include <sys/cdefs.h>
37 __FBSDID("$FreeBSD$");
40 #include "yp_extern.h"
45 #include <sys/param.h>
46 #include <sys/types.h>
47 #include <sys/socket.h>
48 #include <netinet/in.h>
49 #include <arpa/inet.h>
54 #define MASTER_STRING "YP_MASTER_NAME"
55 #define MASTER_SZ sizeof(MASTER_STRING) - 1
56 #define ORDER_STRING "YP_LAST_MODIFIED"
57 #define ORDER_SZ sizeof(ORDER_STRING) - 1
62 if (yp_pid != getpid()) {
63 yp_error("child %d trying to fork!", getpid());
72 * NIS v2 support. This is where most of the action happens.
76 ypproc_null_2_svc(void *argp, struct svc_req *rqstp)
82 if (yp_access(NULL, NULL, (struct svc_req *)rqstp))
84 if (yp_access(NULL, (struct svc_req *)rqstp))
90 return((void *) &result);
94 ypproc_domain_2_svc(domainname *argp, struct svc_req *rqstp)
99 if (yp_access(NULL, NULL, (struct svc_req *)rqstp)) {
101 if (yp_access(NULL, (struct svc_req *)rqstp)) {
107 if (argp == NULL || yp_validdomain(*argp))
116 ypproc_domain_nonack_2_svc(domainname *argp, struct svc_req *rqstp)
118 static bool_t result;
121 if (yp_access(NULL, NULL, (struct svc_req *)rqstp))
123 if (yp_access(NULL, (struct svc_req *)rqstp))
127 if (argp == NULL || yp_validdomain(*argp))
136 ypproc_match_2_svc(ypreq_key *argp, struct svc_req *rqstp)
138 static ypresp_val result;
140 result.val.valdat_val = "";
141 result.val.valdat_len = 0;
144 if (yp_access(argp->map, argp->domain, (struct svc_req *)rqstp)) {
146 if (yp_access(argp->map, (struct svc_req *)rqstp)) {
148 result.stat = YP_YPERR;
152 if (argp->domain == NULL || argp->map == NULL) {
153 result.stat = YP_BADARGS;
157 if (yp_select_map(argp->map, argp->domain, NULL, 1) != YP_TRUE) {
158 result.stat = yp_errno;
162 result.stat = yp_getbykey(&argp->key, &result.val);
165 * Do DNS lookups for hosts maps if database lookup failed.
169 if (do_dns && result.stat != YP_TRUE &&
170 (yp_testflag(argp->map, argp->domain, YP_INTERDOMAIN) ||
171 (strstr(argp->map, "hosts") || strstr(argp->map, "ipnodes")))) {
173 if (do_dns && result.stat != YP_TRUE &&
174 (strstr(argp->map, "hosts") || strstr(argp->map, "ipnodes"))) {
178 nbuf = alloca(argp->key.keydat_len + 1);
179 /* NUL terminate! NUL terminate!! NUL TERMINATE!!! */
180 bcopy(argp->key.keydat_val, nbuf, argp->key.keydat_len);
181 nbuf[argp->key.keydat_len] = '\0';
184 yp_error("doing DNS lookup of %s", nbuf);
186 if (!strcmp(argp->map, "hosts.byname"))
187 result.stat = yp_async_lookup_name(rqstp, nbuf,
189 else if (!strcmp(argp->map, "hosts.byaddr"))
190 result.stat = yp_async_lookup_addr(rqstp, nbuf,
192 else if (!strcmp(argp->map, "ipnodes.byname"))
193 result.stat = yp_async_lookup_name(rqstp, nbuf,
195 else if (!strcmp(argp->map, "ipnodes.byaddr"))
196 result.stat = yp_async_lookup_addr(rqstp, nbuf,
199 if (result.stat == YP_TRUE)
207 ypproc_first_2_svc(ypreq_nokey *argp, struct svc_req *rqstp)
209 static ypresp_key_val result;
211 result.val.valdat_val = result.key.keydat_val = "";
212 result.val.valdat_len = result.key.keydat_len = 0;
215 if (yp_access(argp->map, argp->domain, (struct svc_req *)rqstp)) {
217 if (yp_access(argp->map, (struct svc_req *)rqstp)) {
219 result.stat = YP_YPERR;
223 if (argp->domain == NULL) {
224 result.stat = YP_BADARGS;
228 if (yp_select_map(argp->map, argp->domain, NULL, 0) != YP_TRUE) {
229 result.stat = yp_errno;
233 result.stat = yp_firstbykey(&result.key, &result.val);
239 ypproc_next_2_svc(ypreq_key *argp, struct svc_req *rqstp)
241 static ypresp_key_val result;
243 result.val.valdat_val = result.key.keydat_val = "";
244 result.val.valdat_len = result.key.keydat_len = 0;
247 if (yp_access(argp->map, argp->domain, (struct svc_req *)rqstp)) {
249 if (yp_access(argp->map, (struct svc_req *)rqstp)) {
251 result.stat = YP_YPERR;
255 if (argp->domain == NULL || argp->map == NULL) {
256 result.stat = YP_BADARGS;
260 if (yp_select_map(argp->map, argp->domain, &argp->key, 0) != YP_TRUE) {
261 result.stat = yp_errno;
265 result.key.keydat_len = argp->key.keydat_len;
266 result.key.keydat_val = argp->key.keydat_val;
268 result.stat = yp_nextbykey(&result.key, &result.val);
274 ypxfr_callback(ypxfrstat rval, struct sockaddr_in *addr, unsigned int transid,
275 unsigned int prognum, unsigned long port)
278 int sock = RPC_ANYSOCK;
279 struct timeval timeout;
280 yppushresp_xfr ypxfr_resp;
285 addr->sin_port = htons(port);
287 if ((clnt = clntudp_create(addr,prognum,1,timeout,&sock)) == NULL) {
288 yp_error("%s: %s", inet_ntoa(addr->sin_addr),
289 clnt_spcreateerror("failed to establish callback handle"));
293 ypxfr_resp.status = rval;
294 ypxfr_resp.transid = transid;
296 /* Turn the timeout off -- we don't want to block. */
298 if (clnt_control(clnt, CLSET_TIMEOUT, &timeout) == FALSE)
299 yp_error("failed to set timeout on ypproc_xfr callback");
301 if (yppushproc_xfrresp_1(&ypxfr_resp, clnt) == NULL) {
302 clnt_geterr(clnt, &err);
303 if (err.re_status != RPC_SUCCESS &&
304 err.re_status != RPC_TIMEDOUT)
305 yp_error("%s", clnt_sperror(clnt,
306 "ypxfr callback failed"));
313 #define YPXFR_RETURN(CODE) \
314 /* Order is important: send regular RPC reply, then callback */ \
315 result.xfrstat = CODE; \
316 svc_sendreply(rqstp->rq_xprt, (xdrproc_t)xdr_ypresp_xfr, &result); \
317 ypxfr_callback(CODE,rqhost,argp->transid, \
318 argp->prog,argp->port); \
322 ypproc_xfr_2_svc(ypreq_xfr *argp, struct svc_req *rqstp)
324 static ypresp_xfr result;
325 struct sockaddr_in *rqhost;
329 result.transid = argp->transid;
330 rqhost = svc_getcaller(rqstp->rq_xprt);
333 if (yp_access(argp->map_parms.map,
334 argp->map_parms.domain, (struct svc_req *)rqstp)) {
336 if (yp_access(argp->map_parms.map, (struct svc_req *)rqstp)) {
338 YPXFR_RETURN(YPXFR_REFUSED)
342 if (argp->map_parms.domain == NULL) {
343 YPXFR_RETURN(YPXFR_BADARGS)
346 if (yp_validdomain(argp->map_parms.domain)) {
347 YPXFR_RETURN(YPXFR_NODOM)
351 * Determine the master host ourselves. The caller may
352 * be up to no good. This has the side effect of verifying
353 * that the requested map and domain actually exist.
356 mreq.domain = argp->map_parms.domain;
357 mreq.map = argp->map_parms.map;
359 mres = ypproc_master_2_svc(&mreq, rqstp);
361 if (mres->stat != YP_TRUE) {
362 yp_error("couldn't find master for map %s@%s",
364 argp->map_parms.domain);
365 yp_error("host at %s (%s) may be pulling my leg",
366 argp->map_parms.peer,
367 inet_ntoa(rqhost->sin_addr));
368 YPXFR_RETURN(YPXFR_REFUSED)
374 char g[11], t[11], p[11];
375 char ypxfr_command[MAXPATHLEN + 2];
377 snprintf (ypxfr_command, sizeof(ypxfr_command), "%sypxfr", _PATH_LIBEXEC);
378 snprintf (t, sizeof(t), "%u", argp->transid);
379 snprintf (g, sizeof(g), "%u", argp->prog);
380 snprintf (p, sizeof(p), "%u", argp->port);
382 close(0); close(1); close(2);
384 if (strcmp(yp_dir, _PATH_YP)) {
385 execl(ypxfr_command, "ypxfr",
386 "-d", argp->map_parms.domain,
388 "-p", yp_dir, "-C", t,
389 g, inet_ntoa(rqhost->sin_addr),
390 p, argp->map_parms.map,
393 execl(ypxfr_command, "ypxfr",
394 "-d", argp->map_parms.domain,
397 g, inet_ntoa(rqhost->sin_addr),
398 p, argp->map_parms.map,
401 yp_error("ypxfr execl(%s): %s", ypxfr_command, strerror(errno));
402 YPXFR_RETURN(YPXFR_XFRERR)
404 * Just to safe, prevent PR #10970 from biting us in
405 * the unlikely case that execing ypxfr fails. We don't
406 * want to have any child processes spawned from this
413 yp_error("ypxfr fork(): %s", strerror(errno));
414 YPXFR_RETURN(YPXFR_XFRERR)
417 result.xfrstat = YPXFR_SUCC;
427 ypproc_clear_2_svc(void *argp, struct svc_req *rqstp)
429 static char * result;
430 static char rval = 0;
433 if (yp_access(NULL, NULL, (struct svc_req *)rqstp))
435 if (yp_access(NULL, (struct svc_req *)rqstp))
439 /* clear out the database cache */
442 /* Re-read the securenets database for the hell of it. */
446 return((void *) &result);
450 * For ypproc_all, we have to send a stream of ypresp_all structures
451 * via TCP, but the XDR filter generated from the yp.x protocol
452 * definition file only serializes one such structure. This means that
453 * to send the whole stream, you need a wrapper which feeds all the
454 * records into the underlying XDR routine until it hits an 'EOF.'
455 * But to use the wrapper, you have to violate the boundaries between
456 * RPC layers by calling svc_sendreply() directly from the ypproc_all
457 * service routine instead of letting the RPC dispatcher do it.
463 * Custom XDR routine for serialzing results of ypproc_all: keep
464 * reading from the database and spew until we run out of records
465 * or encounter an error.
468 xdr_my_ypresp_all(register XDR *xdrs, ypresp_all *objp)
472 if ((objp->ypresp_all_u.val.stat =
473 yp_nextbykey(&objp->ypresp_all_u.val.key,
474 &objp->ypresp_all_u.val.val)) == YP_TRUE) {
481 if (!xdr_ypresp_all(xdrs, objp))
483 if (objp->more == FALSE)
489 ypproc_all_2_svc(ypreq_nokey *argp, struct svc_req *rqstp)
491 static ypresp_all result;
494 * Set this here so that the client will be forced to make
495 * at least one attempt to read from us even if all we're
496 * doing is returning an error.
499 result.ypresp_all_u.val.key.keydat_len = 0;
500 result.ypresp_all_u.val.key.keydat_val = "";
503 if (yp_access(argp->map, argp->domain, (struct svc_req *)rqstp)) {
505 if (yp_access(argp->map, (struct svc_req *)rqstp)) {
507 result.ypresp_all_u.val.stat = YP_YPERR;
511 if (argp->domain == NULL || argp->map == NULL) {
512 result.ypresp_all_u.val.stat = YP_BADARGS;
517 * XXX If we hit the child limit, fail the request.
518 * If we don't, and the map is large, we could block for
519 * a long time in the parent.
521 if (children >= MAX_CHILDREN) {
522 result.ypresp_all_u.val.stat = YP_YPERR;
527 * The ypproc_all procedure can take a while to complete.
528 * Best to handle it in a subprocess so the parent doesn't
529 * block. (Is there a better way to do this? Maybe with
537 yp_error("ypall fork(): %s", strerror(errno));
538 result.ypresp_all_u.val.stat = YP_YPERR;
549 * Fix for PR #10971: don't let the child ypserv share
550 * DB handles with the parent process.
556 if (yp_select_map(argp->map, argp->domain,
557 &result.ypresp_all_u.val.key, 0) != YP_TRUE) {
558 result.ypresp_all_u.val.stat = yp_errno;
562 /* Kick off the actual data transfer. */
563 svc_sendreply(rqstp->rq_xprt, (xdrproc_t)xdr_my_ypresp_all, &result);
566 * Proper fix for PR #10970: exit here so that we don't risk
567 * having a child spawned from this sub-process.
576 ypproc_master_2_svc(ypreq_nokey *argp, struct svc_req *rqstp)
578 static ypresp_master result;
579 static char ypvalbuf[YPMAXRECORD];
580 keydat key = { MASTER_SZ, MASTER_STRING };
586 if (yp_access(argp->map, argp->domain, (struct svc_req *)rqstp)) {
588 if (yp_access(argp->map, (struct svc_req *)rqstp)) {
590 result.stat = YP_YPERR;
594 if (argp->domain == NULL) {
595 result.stat = YP_BADARGS;
599 if (yp_select_map(argp->map, argp->domain, &key, 1) != YP_TRUE) {
600 result.stat = yp_errno;
605 * Note that we copy the data retrieved from the database to
606 * a private buffer and NUL terminate the buffer rather than
607 * terminating the data in place. We do this because by stuffing
608 * a '\0' into data.data, we will actually be corrupting memory
609 * allocated by the DB package. This is a bad thing now that we
610 * cache DB handles rather than closing the database immediately.
612 result.stat = yp_getbykey(&key, &val);
613 if (result.stat == YP_TRUE) {
614 bcopy(val.valdat_val, &ypvalbuf, val.valdat_len);
615 ypvalbuf[val.valdat_len] = '\0';
616 result.peer = ypvalbuf;
624 ypproc_order_2_svc(ypreq_nokey *argp, struct svc_req *rqstp)
626 static ypresp_order result;
627 keydat key = { ORDER_SZ, ORDER_STRING };
633 if (yp_access(argp->map, argp->domain, (struct svc_req *)rqstp)) {
635 if (yp_access(argp->map, (struct svc_req *)rqstp)) {
637 result.stat = YP_YPERR;
641 if (argp->domain == NULL) {
642 result.stat = YP_BADARGS;
647 * We could just check the timestamp on the map file,
648 * but that's a hack: we'll only know the last time the file
649 * was touched, not the last time the database contents were
653 if (yp_select_map(argp->map, argp->domain, &key, 1) != YP_TRUE) {
654 result.stat = yp_errno;
658 result.stat = yp_getbykey(&key, &val);
660 if (result.stat == YP_TRUE)
661 result.ordernum = atoi(val.valdat_val);
668 static void yp_maplist_free(struct ypmaplist *yp_maplist)
670 register struct ypmaplist *next;
673 next = yp_maplist->next;
674 free(yp_maplist->map);
681 static struct ypmaplist *
682 yp_maplist_create(const char *domain)
684 char yp_mapdir[MAXPATHLEN + 2];
685 char yp_mapname[MAXPATHLEN + 2];
686 struct ypmaplist *cur = NULL;
687 struct ypmaplist *yp_maplist = NULL;
692 snprintf(yp_mapdir, sizeof(yp_mapdir), "%s/%s", yp_dir, domain);
694 if ((dird = opendir(yp_mapdir)) == NULL) {
695 yp_error("opendir(%s) failed: %s", yp_mapdir, strerror(errno));
699 while ((dirp = readdir(dird)) != NULL) {
700 if (strcmp(dirp->d_name, ".") && strcmp(dirp->d_name, "..")) {
701 snprintf(yp_mapname, sizeof(yp_mapname), "%s/%s",
702 yp_mapdir,dirp->d_name);
703 if (stat(yp_mapname, &statbuf) < 0 ||
704 !S_ISREG(statbuf.st_mode))
706 if ((cur = (struct ypmaplist *)
707 malloc(sizeof(struct ypmaplist))) == NULL) {
708 yp_error("malloc() failed");
710 yp_maplist_free(yp_maplist);
713 if ((cur->map = strdup(dirp->d_name)) == NULL) {
714 yp_error("strdup() failed: %s",strerror(errno));
716 yp_maplist_free(yp_maplist);
720 cur->next = yp_maplist;
723 yp_error("map: %s", yp_maplist->map);
732 ypproc_maplist_2_svc(domainname *argp, struct svc_req *rqstp)
734 static ypresp_maplist result = { 0, NULL };
737 if (yp_access(NULL, NULL, (struct svc_req *)rqstp)) {
739 if (yp_access(NULL, (struct svc_req *)rqstp)) {
741 result.stat = YP_YPERR;
746 result.stat = YP_BADARGS;
750 if (yp_validdomain(*argp)) {
751 result.stat = YP_NODOM;
756 * We have to construct a linked list for the ypproc_maplist
757 * procedure using dynamically allocated memory. Since the XDR
758 * layer won't free this list for us, we have to deal with it
759 * ourselves. We call yp_maplist_free() first to free any
760 * previously allocated data we may have accumulated to insure
761 * that we have only one linked list in memory at any given
765 yp_maplist_free(result.maps);
767 if ((result.maps = yp_maplist_create(*argp)) == NULL) {
768 yp_error("yp_maplist_create failed");
769 result.stat = YP_YPERR;
772 result.stat = YP_TRUE;
778 * NIS v1 support. The nullproc, domain and domain_nonack
779 * functions from v1 are identical to those in v2, so all
780 * we have to do is hand off to them.
782 * The other functions are mostly just wrappers around their v2
783 * counterparts. For example, for the v1 'match' procedure, we
784 * crack open the argument structure, make a request to the v2
785 * 'match' function, repackage the data into a v1 response and
786 * then send it on its way.
788 * Note that we don't support the pull, push and get procedures.
789 * There's little documentation available to show what they
790 * do, and I suspect they're meant largely for map transfers
791 * between master and slave servers.
795 ypoldproc_null_1_svc(void *argp, struct svc_req *rqstp)
797 return(ypproc_null_2_svc(argp, rqstp));
801 ypoldproc_domain_1_svc(domainname *argp, struct svc_req *rqstp)
803 return(ypproc_domain_2_svc(argp, rqstp));
807 ypoldproc_domain_nonack_1_svc(domainname *argp, struct svc_req *rqstp)
809 return (ypproc_domain_nonack_2_svc(argp, rqstp));
813 * the 'match' procedure sends a response of type YPRESP_VAL
816 ypoldproc_match_1_svc(yprequest *argp, struct svc_req *rqstp)
818 static ypresponse result;
819 ypresp_val *v2_result;
821 result.yp_resptype = YPRESP_VAL;
822 result.ypresponse_u.yp_resp_valtype.val.valdat_val = "";
823 result.ypresponse_u.yp_resp_valtype.val.valdat_len = 0;
825 if (argp->yp_reqtype != YPREQ_KEY) {
826 result.ypresponse_u.yp_resp_valtype.stat = YP_BADARGS;
830 v2_result = ypproc_match_2_svc(&argp->yprequest_u.yp_req_keytype,rqstp);
831 if (v2_result == NULL)
834 bcopy(v2_result, &result.ypresponse_u.yp_resp_valtype,
841 * the 'first' procedure sends a response of type YPRESP_KEY_VAL
844 ypoldproc_first_1_svc(yprequest *argp, struct svc_req *rqstp)
846 static ypresponse result;
847 ypresp_key_val *v2_result;
849 result.yp_resptype = YPRESP_KEY_VAL;
850 result.ypresponse_u.yp_resp_key_valtype.val.valdat_val =
851 result.ypresponse_u.yp_resp_key_valtype.key.keydat_val = "";
852 result.ypresponse_u.yp_resp_key_valtype.val.valdat_len =
853 result.ypresponse_u.yp_resp_key_valtype.key.keydat_len = 0;
855 if (argp->yp_reqtype != YPREQ_NOKEY) {
856 result.ypresponse_u.yp_resp_key_valtype.stat = YP_BADARGS;
860 v2_result = ypproc_first_2_svc(&argp->yprequest_u.yp_req_nokeytype,
862 if (v2_result == NULL)
865 bcopy(v2_result, &result.ypresponse_u.yp_resp_key_valtype,
866 sizeof(ypresp_key_val));
872 * the 'next' procedure sends a response of type YPRESP_KEY_VAL
875 ypoldproc_next_1_svc(yprequest *argp, struct svc_req *rqstp)
877 static ypresponse result;
878 ypresp_key_val *v2_result;
880 result.yp_resptype = YPRESP_KEY_VAL;
881 result.ypresponse_u.yp_resp_key_valtype.val.valdat_val =
882 result.ypresponse_u.yp_resp_key_valtype.key.keydat_val = "";
883 result.ypresponse_u.yp_resp_key_valtype.val.valdat_len =
884 result.ypresponse_u.yp_resp_key_valtype.key.keydat_len = 0;
886 if (argp->yp_reqtype != YPREQ_KEY) {
887 result.ypresponse_u.yp_resp_key_valtype.stat = YP_BADARGS;
891 v2_result = ypproc_next_2_svc(&argp->yprequest_u.yp_req_keytype,rqstp);
892 if (v2_result == NULL)
895 bcopy(v2_result, &result.ypresponse_u.yp_resp_key_valtype,
896 sizeof(ypresp_key_val));
902 * the 'poll' procedure sends a response of type YPRESP_MAP_PARMS
905 ypoldproc_poll_1_svc(yprequest *argp, struct svc_req *rqstp)
907 static ypresponse result;
908 ypresp_master *v2_result1;
909 ypresp_order *v2_result2;
911 result.yp_resptype = YPRESP_MAP_PARMS;
912 result.ypresponse_u.yp_resp_map_parmstype.domain =
913 argp->yprequest_u.yp_req_nokeytype.domain;
914 result.ypresponse_u.yp_resp_map_parmstype.map =
915 argp->yprequest_u.yp_req_nokeytype.map;
917 * Hmm... there is no 'status' value in the
918 * yp_resp_map_parmstype structure, so I have to
919 * guess at what to do to indicate a failure.
920 * I hope this is right.
922 result.ypresponse_u.yp_resp_map_parmstype.ordernum = 0;
923 result.ypresponse_u.yp_resp_map_parmstype.peer = "";
925 if (argp->yp_reqtype != YPREQ_MAP_PARMS) {
929 v2_result1 = ypproc_master_2_svc(&argp->yprequest_u.yp_req_nokeytype,
931 if (v2_result1 == NULL)
934 if (v2_result1->stat != YP_TRUE) {
938 v2_result2 = ypproc_order_2_svc(&argp->yprequest_u.yp_req_nokeytype,
940 if (v2_result2 == NULL)
943 if (v2_result2->stat != YP_TRUE) {
947 result.ypresponse_u.yp_resp_map_parmstype.peer =
949 result.ypresponse_u.yp_resp_map_parmstype.ordernum =
950 v2_result2->ordernum;
956 ypoldproc_push_1_svc(yprequest *argp, struct svc_req *rqstp)
958 static ypresponse result;
968 ypoldproc_pull_1_svc(yprequest *argp, struct svc_req *rqstp)
970 static ypresponse result;
980 ypoldproc_get_1_svc(yprequest *argp, struct svc_req *rqstp)
982 static ypresponse result;