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"))) {
176 char nbuf[YPMAXRECORD];
178 /* NUL terminate! NUL terminate!! NUL TERMINATE!!! */
179 bcopy(argp->key.keydat_val, nbuf, argp->key.keydat_len);
180 nbuf[argp->key.keydat_len] = '\0';
183 yp_error("doing DNS lookup of %s", nbuf);
185 if (!strcmp(argp->map, "hosts.byname"))
186 result.stat = yp_async_lookup_name(rqstp, nbuf,
188 else if (!strcmp(argp->map, "hosts.byaddr"))
189 result.stat = yp_async_lookup_addr(rqstp, nbuf,
191 else if (!strcmp(argp->map, "ipnodes.byname"))
192 result.stat = yp_async_lookup_name(rqstp, nbuf,
194 else if (!strcmp(argp->map, "ipnodes.byaddr"))
195 result.stat = yp_async_lookup_addr(rqstp, nbuf,
198 if (result.stat == YP_TRUE)
206 ypproc_first_2_svc(ypreq_nokey *argp, struct svc_req *rqstp)
208 static ypresp_key_val result;
210 result.val.valdat_val = result.key.keydat_val = "";
211 result.val.valdat_len = result.key.keydat_len = 0;
214 if (yp_access(argp->map, argp->domain, (struct svc_req *)rqstp)) {
216 if (yp_access(argp->map, (struct svc_req *)rqstp)) {
218 result.stat = YP_YPERR;
222 if (argp->domain == NULL) {
223 result.stat = YP_BADARGS;
227 if (yp_select_map(argp->map, argp->domain, NULL, 0) != YP_TRUE) {
228 result.stat = yp_errno;
232 result.stat = yp_firstbykey(&result.key, &result.val);
238 ypproc_next_2_svc(ypreq_key *argp, struct svc_req *rqstp)
240 static ypresp_key_val result;
242 result.val.valdat_val = result.key.keydat_val = "";
243 result.val.valdat_len = result.key.keydat_len = 0;
246 if (yp_access(argp->map, argp->domain, (struct svc_req *)rqstp)) {
248 if (yp_access(argp->map, (struct svc_req *)rqstp)) {
250 result.stat = YP_YPERR;
254 if (argp->domain == NULL || argp->map == NULL) {
255 result.stat = YP_BADARGS;
259 if (yp_select_map(argp->map, argp->domain, &argp->key, 0) != YP_TRUE) {
260 result.stat = yp_errno;
264 result.key.keydat_len = argp->key.keydat_len;
265 result.key.keydat_val = argp->key.keydat_val;
267 result.stat = yp_nextbykey(&result.key, &result.val);
273 ypxfr_callback(ypxfrstat rval, struct sockaddr_in *addr, unsigned int transid,
274 unsigned int prognum, unsigned long port)
277 int sock = RPC_ANYSOCK;
278 struct timeval timeout;
279 yppushresp_xfr ypxfr_resp;
284 addr->sin_port = htons(port);
286 if ((clnt = clntudp_create(addr,prognum,1,timeout,&sock)) == NULL) {
287 yp_error("%s: %s", inet_ntoa(addr->sin_addr),
288 clnt_spcreateerror("failed to establish callback handle"));
292 ypxfr_resp.status = rval;
293 ypxfr_resp.transid = transid;
295 /* Turn the timeout off -- we don't want to block. */
297 if (clnt_control(clnt, CLSET_TIMEOUT, &timeout) == FALSE)
298 yp_error("failed to set timeout on ypproc_xfr callback");
300 if (yppushproc_xfrresp_1(&ypxfr_resp, clnt) == NULL) {
301 clnt_geterr(clnt, &err);
302 if (err.re_status != RPC_SUCCESS &&
303 err.re_status != RPC_TIMEDOUT)
304 yp_error("%s", clnt_sperror(clnt,
305 "ypxfr callback failed"));
312 #define YPXFR_RETURN(CODE) \
313 /* Order is important: send regular RPC reply, then callback */ \
314 result.xfrstat = CODE; \
315 svc_sendreply(rqstp->rq_xprt, (xdrproc_t)xdr_ypresp_xfr, &result); \
316 ypxfr_callback(CODE,rqhost,argp->transid, \
317 argp->prog,argp->port); \
321 ypproc_xfr_2_svc(ypreq_xfr *argp, struct svc_req *rqstp)
323 static ypresp_xfr result;
324 struct sockaddr_in *rqhost;
328 result.transid = argp->transid;
329 rqhost = svc_getcaller(rqstp->rq_xprt);
332 if (yp_access(argp->map_parms.map,
333 argp->map_parms.domain, (struct svc_req *)rqstp)) {
335 if (yp_access(argp->map_parms.map, (struct svc_req *)rqstp)) {
337 YPXFR_RETURN(YPXFR_REFUSED)
341 if (argp->map_parms.domain == NULL) {
342 YPXFR_RETURN(YPXFR_BADARGS)
345 if (yp_validdomain(argp->map_parms.domain)) {
346 YPXFR_RETURN(YPXFR_NODOM)
350 * Determine the master host ourselves. The caller may
351 * be up to no good. This has the side effect of verifying
352 * that the requested map and domain actually exist.
355 mreq.domain = argp->map_parms.domain;
356 mreq.map = argp->map_parms.map;
358 mres = ypproc_master_2_svc(&mreq, rqstp);
360 if (mres->stat != YP_TRUE) {
361 yp_error("couldn't find master for map %s@%s",
363 argp->map_parms.domain);
364 yp_error("host at %s (%s) may be pulling my leg",
365 argp->map_parms.peer,
366 inet_ntoa(rqhost->sin_addr));
367 YPXFR_RETURN(YPXFR_REFUSED)
373 char g[11], t[11], p[11];
374 char ypxfr_command[MAXPATHLEN + 2];
376 snprintf (ypxfr_command, sizeof(ypxfr_command), "%sypxfr", _PATH_LIBEXEC);
377 snprintf (t, sizeof(t), "%u", argp->transid);
378 snprintf (g, sizeof(g), "%u", argp->prog);
379 snprintf (p, sizeof(p), "%u", argp->port);
381 close(0); close(1); close(2);
383 if (strcmp(yp_dir, _PATH_YP)) {
384 execl(ypxfr_command, "ypxfr",
385 "-d", argp->map_parms.domain,
387 "-p", yp_dir, "-C", t,
388 g, inet_ntoa(rqhost->sin_addr),
389 p, argp->map_parms.map,
392 execl(ypxfr_command, "ypxfr",
393 "-d", argp->map_parms.domain,
396 g, inet_ntoa(rqhost->sin_addr),
397 p, argp->map_parms.map,
400 yp_error("ypxfr execl(%s): %s", ypxfr_command, strerror(errno));
401 YPXFR_RETURN(YPXFR_XFRERR)
403 * Just to safe, prevent PR #10970 from biting us in
404 * the unlikely case that execing ypxfr fails. We don't
405 * want to have any child processes spawned from this
412 yp_error("ypxfr fork(): %s", strerror(errno));
413 YPXFR_RETURN(YPXFR_XFRERR)
416 result.xfrstat = YPXFR_SUCC;
426 ypproc_clear_2_svc(void *argp, struct svc_req *rqstp)
428 static char * result;
429 static char rval = 0;
432 if (yp_access(NULL, NULL, (struct svc_req *)rqstp))
434 if (yp_access(NULL, (struct svc_req *)rqstp))
438 /* clear out the database cache */
441 /* Re-read the securenets database for the hell of it. */
445 return((void *) &result);
449 * For ypproc_all, we have to send a stream of ypresp_all structures
450 * via TCP, but the XDR filter generated from the yp.x protocol
451 * definition file only serializes one such structure. This means that
452 * to send the whole stream, you need a wrapper which feeds all the
453 * records into the underlying XDR routine until it hits an 'EOF.'
454 * But to use the wrapper, you have to violate the boundaries between
455 * RPC layers by calling svc_sendreply() directly from the ypproc_all
456 * service routine instead of letting the RPC dispatcher do it.
462 * Custom XDR routine for serialzing results of ypproc_all: keep
463 * reading from the database and spew until we run out of records
464 * or encounter an error.
467 xdr_my_ypresp_all(register XDR *xdrs, ypresp_all *objp)
471 if ((objp->ypresp_all_u.val.stat =
472 yp_nextbykey(&objp->ypresp_all_u.val.key,
473 &objp->ypresp_all_u.val.val)) == YP_TRUE) {
480 if (!xdr_ypresp_all(xdrs, objp))
482 if (objp->more == FALSE)
488 ypproc_all_2_svc(ypreq_nokey *argp, struct svc_req *rqstp)
490 static ypresp_all result;
493 * Set this here so that the client will be forced to make
494 * at least one attempt to read from us even if all we're
495 * doing is returning an error.
498 result.ypresp_all_u.val.key.keydat_len = 0;
499 result.ypresp_all_u.val.key.keydat_val = "";
502 if (yp_access(argp->map, argp->domain, (struct svc_req *)rqstp)) {
504 if (yp_access(argp->map, (struct svc_req *)rqstp)) {
506 result.ypresp_all_u.val.stat = YP_YPERR;
510 if (argp->domain == NULL || argp->map == NULL) {
511 result.ypresp_all_u.val.stat = YP_BADARGS;
516 * XXX If we hit the child limit, fail the request.
517 * If we don't, and the map is large, we could block for
518 * a long time in the parent.
520 if (children >= MAX_CHILDREN) {
521 result.ypresp_all_u.val.stat = YP_YPERR;
526 * The ypproc_all procedure can take a while to complete.
527 * Best to handle it in a subprocess so the parent doesn't
528 * block. (Is there a better way to do this? Maybe with
536 yp_error("ypall fork(): %s", strerror(errno));
537 result.ypresp_all_u.val.stat = YP_YPERR;
548 * Fix for PR #10971: don't let the child ypserv share
549 * DB handles with the parent process.
555 if (yp_select_map(argp->map, argp->domain,
556 &result.ypresp_all_u.val.key, 0) != YP_TRUE) {
557 result.ypresp_all_u.val.stat = yp_errno;
561 /* Kick off the actual data transfer. */
562 svc_sendreply(rqstp->rq_xprt, (xdrproc_t)xdr_my_ypresp_all, &result);
565 * Proper fix for PR #10970: exit here so that we don't risk
566 * having a child spawned from this sub-process.
575 ypproc_master_2_svc(ypreq_nokey *argp, struct svc_req *rqstp)
577 static ypresp_master result;
578 static char ypvalbuf[YPMAXRECORD];
579 keydat key = { MASTER_SZ, MASTER_STRING };
585 if (yp_access(argp->map, argp->domain, (struct svc_req *)rqstp)) {
587 if (yp_access(argp->map, (struct svc_req *)rqstp)) {
589 result.stat = YP_YPERR;
593 if (argp->domain == NULL) {
594 result.stat = YP_BADARGS;
598 if (yp_select_map(argp->map, argp->domain, &key, 1) != YP_TRUE) {
599 result.stat = yp_errno;
604 * Note that we copy the data retrieved from the database to
605 * a private buffer and NUL terminate the buffer rather than
606 * terminating the data in place. We do this because by stuffing
607 * a '\0' into data.data, we will actually be corrupting memory
608 * allocated by the DB package. This is a bad thing now that we
609 * cache DB handles rather than closing the database immediately.
611 result.stat = yp_getbykey(&key, &val);
612 if (result.stat == YP_TRUE) {
613 bcopy(val.valdat_val, &ypvalbuf, val.valdat_len);
614 ypvalbuf[val.valdat_len] = '\0';
615 result.peer = ypvalbuf;
623 ypproc_order_2_svc(ypreq_nokey *argp, struct svc_req *rqstp)
625 static ypresp_order result;
626 keydat key = { ORDER_SZ, ORDER_STRING };
632 if (yp_access(argp->map, argp->domain, (struct svc_req *)rqstp)) {
634 if (yp_access(argp->map, (struct svc_req *)rqstp)) {
636 result.stat = YP_YPERR;
640 if (argp->domain == NULL) {
641 result.stat = YP_BADARGS;
646 * We could just check the timestamp on the map file,
647 * but that's a hack: we'll only know the last time the file
648 * was touched, not the last time the database contents were
652 if (yp_select_map(argp->map, argp->domain, &key, 1) != YP_TRUE) {
653 result.stat = yp_errno;
657 result.stat = yp_getbykey(&key, &val);
659 if (result.stat == YP_TRUE)
660 result.ordernum = atoi(val.valdat_val);
667 static void yp_maplist_free(struct ypmaplist *yp_maplist)
669 register struct ypmaplist *next;
672 next = yp_maplist->next;
673 free(yp_maplist->map);
680 static struct ypmaplist *
681 yp_maplist_create(const char *domain)
683 char yp_mapdir[MAXPATHLEN + 2];
684 char yp_mapname[MAXPATHLEN + 2];
685 struct ypmaplist *cur = NULL;
686 struct ypmaplist *yp_maplist = NULL;
691 snprintf(yp_mapdir, sizeof(yp_mapdir), "%s/%s", yp_dir, domain);
693 if ((dird = opendir(yp_mapdir)) == NULL) {
694 yp_error("opendir(%s) failed: %s", yp_mapdir, strerror(errno));
698 while ((dirp = readdir(dird)) != NULL) {
699 if (strcmp(dirp->d_name, ".") && strcmp(dirp->d_name, "..")) {
700 snprintf(yp_mapname, sizeof(yp_mapname), "%s/%s",
701 yp_mapdir,dirp->d_name);
702 if (stat(yp_mapname, &statbuf) < 0 ||
703 !S_ISREG(statbuf.st_mode))
705 if ((cur = (struct ypmaplist *)
706 malloc(sizeof(struct ypmaplist))) == NULL) {
707 yp_error("malloc() failed");
709 yp_maplist_free(yp_maplist);
712 if ((cur->map = strdup(dirp->d_name)) == NULL) {
713 yp_error("strdup() failed: %s",strerror(errno));
715 yp_maplist_free(yp_maplist);
719 cur->next = yp_maplist;
722 yp_error("map: %s", yp_maplist->map);
731 ypproc_maplist_2_svc(domainname *argp, struct svc_req *rqstp)
733 static ypresp_maplist result = { 0, NULL };
736 if (yp_access(NULL, NULL, (struct svc_req *)rqstp)) {
738 if (yp_access(NULL, (struct svc_req *)rqstp)) {
740 result.stat = YP_YPERR;
745 result.stat = YP_BADARGS;
749 if (yp_validdomain(*argp)) {
750 result.stat = YP_NODOM;
755 * We have to construct a linked list for the ypproc_maplist
756 * procedure using dynamically allocated memory. Since the XDR
757 * layer won't free this list for us, we have to deal with it
758 * ourselves. We call yp_maplist_free() first to free any
759 * previously allocated data we may have accumulated to insure
760 * that we have only one linked list in memory at any given
764 yp_maplist_free(result.maps);
766 if ((result.maps = yp_maplist_create(*argp)) == NULL) {
767 yp_error("yp_maplist_create failed");
768 result.stat = YP_YPERR;
771 result.stat = YP_TRUE;
777 * NIS v1 support. The nullproc, domain and domain_nonack
778 * functions from v1 are identical to those in v2, so all
779 * we have to do is hand off to them.
781 * The other functions are mostly just wrappers around their v2
782 * counterparts. For example, for the v1 'match' procedure, we
783 * crack open the argument structure, make a request to the v2
784 * 'match' function, repackage the data into a v1 response and
785 * then send it on its way.
787 * Note that we don't support the pull, push and get procedures.
788 * There's little documentation available to show what they
789 * do, and I suspect they're meant largely for map transfers
790 * between master and slave servers.
794 ypoldproc_null_1_svc(void *argp, struct svc_req *rqstp)
796 return(ypproc_null_2_svc(argp, rqstp));
800 ypoldproc_domain_1_svc(domainname *argp, struct svc_req *rqstp)
802 return(ypproc_domain_2_svc(argp, rqstp));
806 ypoldproc_domain_nonack_1_svc(domainname *argp, struct svc_req *rqstp)
808 return (ypproc_domain_nonack_2_svc(argp, rqstp));
812 * the 'match' procedure sends a response of type YPRESP_VAL
815 ypoldproc_match_1_svc(yprequest *argp, struct svc_req *rqstp)
817 static ypresponse result;
818 ypresp_val *v2_result;
820 result.yp_resptype = YPRESP_VAL;
821 result.ypresponse_u.yp_resp_valtype.val.valdat_val = "";
822 result.ypresponse_u.yp_resp_valtype.val.valdat_len = 0;
824 if (argp->yp_reqtype != YPREQ_KEY) {
825 result.ypresponse_u.yp_resp_valtype.stat = YP_BADARGS;
829 v2_result = ypproc_match_2_svc(&argp->yprequest_u.yp_req_keytype,rqstp);
830 if (v2_result == NULL)
833 bcopy(v2_result, &result.ypresponse_u.yp_resp_valtype,
840 * the 'first' procedure sends a response of type YPRESP_KEY_VAL
843 ypoldproc_first_1_svc(yprequest *argp, struct svc_req *rqstp)
845 static ypresponse result;
846 ypresp_key_val *v2_result;
848 result.yp_resptype = YPRESP_KEY_VAL;
849 result.ypresponse_u.yp_resp_key_valtype.val.valdat_val =
850 result.ypresponse_u.yp_resp_key_valtype.key.keydat_val = "";
851 result.ypresponse_u.yp_resp_key_valtype.val.valdat_len =
852 result.ypresponse_u.yp_resp_key_valtype.key.keydat_len = 0;
854 if (argp->yp_reqtype != YPREQ_NOKEY) {
855 result.ypresponse_u.yp_resp_key_valtype.stat = YP_BADARGS;
859 v2_result = ypproc_first_2_svc(&argp->yprequest_u.yp_req_nokeytype,
861 if (v2_result == NULL)
864 bcopy(v2_result, &result.ypresponse_u.yp_resp_key_valtype,
865 sizeof(ypresp_key_val));
871 * the 'next' procedure sends a response of type YPRESP_KEY_VAL
874 ypoldproc_next_1_svc(yprequest *argp, struct svc_req *rqstp)
876 static ypresponse result;
877 ypresp_key_val *v2_result;
879 result.yp_resptype = YPRESP_KEY_VAL;
880 result.ypresponse_u.yp_resp_key_valtype.val.valdat_val =
881 result.ypresponse_u.yp_resp_key_valtype.key.keydat_val = "";
882 result.ypresponse_u.yp_resp_key_valtype.val.valdat_len =
883 result.ypresponse_u.yp_resp_key_valtype.key.keydat_len = 0;
885 if (argp->yp_reqtype != YPREQ_KEY) {
886 result.ypresponse_u.yp_resp_key_valtype.stat = YP_BADARGS;
890 v2_result = ypproc_next_2_svc(&argp->yprequest_u.yp_req_keytype,rqstp);
891 if (v2_result == NULL)
894 bcopy(v2_result, &result.ypresponse_u.yp_resp_key_valtype,
895 sizeof(ypresp_key_val));
901 * the 'poll' procedure sends a response of type YPRESP_MAP_PARMS
904 ypoldproc_poll_1_svc(yprequest *argp, struct svc_req *rqstp)
906 static ypresponse result;
907 ypresp_master *v2_result1;
908 ypresp_order *v2_result2;
910 result.yp_resptype = YPRESP_MAP_PARMS;
911 result.ypresponse_u.yp_resp_map_parmstype.domain =
912 argp->yprequest_u.yp_req_nokeytype.domain;
913 result.ypresponse_u.yp_resp_map_parmstype.map =
914 argp->yprequest_u.yp_req_nokeytype.map;
916 * Hmm... there is no 'status' value in the
917 * yp_resp_map_parmstype structure, so I have to
918 * guess at what to do to indicate a failure.
919 * I hope this is right.
921 result.ypresponse_u.yp_resp_map_parmstype.ordernum = 0;
922 result.ypresponse_u.yp_resp_map_parmstype.peer = "";
924 if (argp->yp_reqtype != YPREQ_MAP_PARMS) {
928 v2_result1 = ypproc_master_2_svc(&argp->yprequest_u.yp_req_nokeytype,
930 if (v2_result1 == NULL)
933 if (v2_result1->stat != YP_TRUE) {
937 v2_result2 = ypproc_order_2_svc(&argp->yprequest_u.yp_req_nokeytype,
939 if (v2_result2 == NULL)
942 if (v2_result2->stat != YP_TRUE) {
946 result.ypresponse_u.yp_resp_map_parmstype.peer =
948 result.ypresponse_u.yp_resp_map_parmstype.ordernum =
949 v2_result2->ordernum;
955 ypoldproc_push_1_svc(yprequest *argp, struct svc_req *rqstp)
957 static ypresponse result;
967 ypoldproc_pull_1_svc(yprequest *argp, struct svc_req *rqstp)
969 static ypresponse result;
979 ypoldproc_get_1_svc(yprequest *argp, struct svc_req *rqstp)
981 static ypresponse result;