1*043fbe51Sderaadt /* $OpenBSD: yppush_proc.c,v 1.9 2009/10/27 23:59:58 deraadt Exp $ */
2bbfaf3a3Sderaadt
363ab8f9cSdm /*
463ab8f9cSdm * Copyright (c) 1996 Mats O Jansson <moj@stacken.kth.se>
563ab8f9cSdm * All rights reserved.
663ab8f9cSdm *
763ab8f9cSdm * Redistribution and use in source and binary forms, with or without
863ab8f9cSdm * modification, are permitted provided that the following conditions
963ab8f9cSdm * are met:
1063ab8f9cSdm * 1. Redistributions of source code must retain the above copyright
1163ab8f9cSdm * notice, this list of conditions and the following disclaimer.
1263ab8f9cSdm * 2. Redistributions in binary form must reproduce the above copyright
1363ab8f9cSdm * notice, this list of conditions and the following disclaimer in the
1463ab8f9cSdm * documentation and/or other materials provided with the distribution.
1563ab8f9cSdm *
1663ab8f9cSdm * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
1763ab8f9cSdm * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1863ab8f9cSdm * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1963ab8f9cSdm * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
2063ab8f9cSdm * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2163ab8f9cSdm * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2263ab8f9cSdm * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2363ab8f9cSdm * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2463ab8f9cSdm * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2563ab8f9cSdm * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2663ab8f9cSdm * SUCH DAMAGE.
2763ab8f9cSdm */
2863ab8f9cSdm
295325fcc5Sderaadt #include <sys/types.h>
305325fcc5Sderaadt #include <rpcsvc/yp.h>
3163ab8f9cSdm #include <stdio.h>
3263ab8f9cSdm #include "yppush.h"
3363ab8f9cSdm
3499f3ea77Smaja extern int Verbose;
3599f3ea77Smaja
3663ab8f9cSdm void *
yppushproc_null_1_svc(void * argp,struct svc_req * rqstp)3733dd5606Sderaadt yppushproc_null_1_svc(void *argp, struct svc_req *rqstp)
3863ab8f9cSdm {
3963ab8f9cSdm static char *result;
4063ab8f9cSdm
4163ab8f9cSdm /*
4263ab8f9cSdm * insert server code here
4363ab8f9cSdm */
4463ab8f9cSdm return((void *) &result);
4563ab8f9cSdm }
4663ab8f9cSdm
475325fcc5Sderaadt yppushresp_xfr *
yppushproc_xfrresp_1_svc(void * v,struct svc_req * rqstp)485325fcc5Sderaadt yppushproc_xfrresp_1_svc(void *v, struct svc_req *rqstp)
4963ab8f9cSdm {
505325fcc5Sderaadt yppushresp_xfr *argp = (yppushresp_xfr *)v;
5163ab8f9cSdm static char *result;
5263ab8f9cSdm
5363ab8f9cSdm /*
5463ab8f9cSdm * insert server code here
5563ab8f9cSdm */
5699f3ea77Smaja if ((argp->status < YPPUSH_SUCC) || Verbose)
5763ab8f9cSdm fprintf(stderr, "yppush: %s\n",
5863ab8f9cSdm yppush_err_string(argp->status));
595325fcc5Sderaadt return((yppushresp_xfr *) &result);
6063ab8f9cSdm }
61