source: scripts/patches/portmap-5beta-compilation_fixes-3.patch@ abc7c11

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since abc7c11 was 7f65c0e, checked in by Jim Gifford <clfs@…>, 19 years ago

r625@server (orig r623): jim | 2005-10-31 12:43:24 -0800
Final Move

  • Property mode set to 100644
File size: 20.0 KB
  • portmap_5beta

    Submitted By: Kevin P. Fleming <kpfleming at linuxfromscratch dot org>
    Date: 2004-05-02
    Initial Package Version: 5beta
    Origin: http://archives.linuxfromscratch.org/mail-archives/blfs-dev/2003-January/001960.html
    Description: The patch was created from the portmap modified package by Mark Heerdink.
    This patch provides the following improvements:
        * Link against dynamic tcp_wrappers.
        * Create an install target for portmap.
        * Compilation and security fixes.
        * Documentation fixes.
    
    Originally created by Tushar Teredesai, updated by kpfleming to ensure
    portmap will compile without tcp_wrappers installed.
    
    $LastChangedBy: randy $
    $Date: 2004-08-15 10:47:20 -0600 (Sun, 15 Aug 2004) $
    
    diff -Naur portmap_5beta/BLURB portmap_5beta.gimli/BLURB
    old new  
     1
     2###############################################################################
     3
    14@(#) BLURB 1.5 96/07/06 23:09:45
    25
    36This is the fifth replacement portmapper release.
  • portmap_5beta

    diff -Naur portmap_5beta/Makefile portmap_5beta.gimli/Makefile
    old new  
    88# if you disagree. See `man 3 syslog' for examples. Some syslog versions
    99# do not provide this flexibility.
    1010#
    11 FACILITY=LOG_MAIL
     11FACILITY=LOG_DAEMON
    1212
    1313# To disable tcp-wrapper style access control, comment out the following
    1414# macro definitions.  Access control can also be turned off by providing
     
    1616# daemon, is always treated as an authorized host.
    1717
    1818HOSTS_ACCESS= -DHOSTS_ACCESS
    19 WRAP_LIB = $(WRAP_DIR)/libwrap.a
     19#WRAP_LIB = $(WRAP_DIR)/libwrap.a
     20WRAP_LIB = -lwrap
    2021
    2122# Comment out if your RPC library does not allocate privileged ports for
    2223# requests from processes with root privilege, or the new portmap will
     
    7172# With verbose logging on, HP-UX 9.x and AIX 4.1 leave zombies behind when
    7273# SIGCHLD is not ignored. Enable next macro for a fix.
    7374#
    74 # ZOMBIES = -DIGNORE_SIGCHLD    # AIX 4.x, HP-UX 9.x
     75ZOMBIES = -DIGNORE_SIGCHLD      # AIX 4.x, HP-UX 9.x
    7576
    7677# Uncomment the following macro if your system does not have u_long.
    7778#
     
    8182# libwrap.a object library. WRAP_DIR should specify the directory with
    8283# that library.
    8384
    84 WRAP_DIR= ../tcp_wrappers
     85WRAP_DIR= $(TCPD_DIR)
    8586
    8687# Auxiliary object files that may be missing from your C library.
    8788#
     
    99100
    100101# Comment out if your compiler talks ANSI and understands const
    101102#
    102 CONST   = -Dconst=
     103#CONST   = -Dconst=
    103104
    104105### End of configurable stuff.
    105106##############################
    106107
     108GLIBC=$(shell grep -s -c __GLIBC__ /usr/include/features.h)
     109
     110ifeq ($(GLIBC),0)
     111LIBS   += # -lbsd
     112else
     113LIBS   += -lnsl
     114endif
     115
     116
    107117SHELL   = /bin/sh
    108118
    109 COPT    = $(CONST) -Dperror=xperror $(HOSTS_ACCESS) $(CHECK_PORT) \
     119COPT    = $(CONST) $(HOSTS_ACCESS) $(CHECK_PORT) \
    110120        $(SYS) -DFACILITY=$(FACILITY) $(ULONG) $(ZOMBIES) $(SA_LEN) \
    111121        $(LOOPBACK) $(SETPGRP)
    112 CFLAGS  = $(COPT) -O $(NSARCHS)
     122CFLAGS  = -Wall $(COPT) -O2 $(NSARCHS)
    113123OBJECTS = portmap.o pmap_check.o from_local.o $(AUX)
    114124
    115125all:    portmap pmap_dump pmap_set
    116126
    117 portmap: $(OBJECTS) $(WRAP_DIR)/libwrap.a
     127portmap: $(OBJECTS) # $(WRAP_DIR)/libwrap.a
    118128        $(CC) $(CFLAGS) -o $@ $(OBJECTS) $(WRAP_LIB) $(LIBS)
    119129
    120130pmap_dump: pmap_dump.c
     
    129139get_myaddress: get_myaddress.c
    130140        cc $(CFLAGS) -DTEST -o $@ get_myaddress.c $(LIBS)
    131141
     142install: all
     143        install -o root -g root -m 0755 -s portmap ${BASEDIR}/sbin
     144        install -o root -g root -m 0755 -s pmap_dump ${BASEDIR}/usr/sbin
     145        install -o root -g root -m 0755 -s pmap_set ${BASEDIR}/usr/sbin
     146        install -o root -g root -m 0644 portmap.8 ${BASEDIR}/usr/share/man/man8
     147        install -o root -g root -m 0644 pmap_dump.8 ${BASEDIR}/usr/share/man/man8
     148        install -o root -g root -m 0644 pmap_set.8 ${BASEDIR}/usr/share/man/man8
     149#       cat README BLURB >${BASEDIR}/usr/share/doc/portmap/portmapper.txt
     150#       gzip -9f ${BASEDIR}/usr/share/doc/portmap/portmapper.txt
     151
     152
    132153lint:   
    133154        lint $(COPT) $(OBJECTS:%.o=%.c)
    134155
  • portmap_5beta

    diff -Naur portmap_5beta/daemon.c portmap_5beta.gimli/daemon.c
    old new  
    3636#endif /* LIBC_SCCS and not lint */
    3737
    3838#include <fcntl.h>
    39 
    40 /* From unistd.h */
    41 #define STDIN_FILENO    0
    42 #define STDOUT_FILENO   1
    43 #define STDERR_FILENO   2
     39#include <unistd.h>
     40#include <sys/types.h>
    4441
    4542/* From paths.h */
    4643#define _PATH_DEVNULL   "/dev/null"
    4744
    48 daemon(nochdir, noclose)
     45int daemon(nochdir, noclose)
    4946        int nochdir, noclose;
    5047{
    5148        int cpid;
  • from_local.c

    diff -Naur portmap_5beta/from_local.c portmap_5beta.gimli/from_local.c
    old new  
    3535 * Mountain View, California  94043
    3636 */
    3737
    38 #ifndef lint
     38#ifdef lint
    3939static char sccsid[] = "@(#) from_local.c 1.3 96/05/31 15:52:57";
    4040#endif
    4141
     
    5151#include <net/if.h>
    5252#include <sys/ioctl.h>
    5353#include <syslog.h>
     54#include <stdlib.h>
     55#include <string.h>
     56#include <unistd.h>
    5457
    5558#ifndef TRUE
    5659#define TRUE    1
     
    9699
    97100/* find_local - find all IP addresses for this host */
    98101
    99 find_local()
     102int find_local()
    100103{
    101104    struct ifconf ifc;
    102105    struct ifreq ifreq;
     
    154157
    155158/* from_local - determine whether request comes from the local system */
    156159
    157 from_local(addr)
     160int from_local(addr)
    158161struct sockaddr_in *addr;
    159162{
    160163    int     i;
  • pmap_check.c

    diff -Naur portmap_5beta/pmap_check.c portmap_5beta.gimli/pmap_check.c
    old new  
    3232  * Computing Science, Eindhoven University of Technology, The Netherlands.
    3333  */
    3434
    35 #ifndef lint
     35#ifdef lint
    3636static char sccsid[] = "@(#) pmap_check.c 1.8 96/07/07 10:49:10";
    3737#endif
    3838
     
    4545#include <netinet/in.h>
    4646#include <rpc/rpcent.h>
    4747#endif
     48#include <sys/types.h>
     49#include <unistd.h>
     50#ifdef HOSTS_ACCESS
     51#include <tcpd.h>
     52#endif
    4853
    4954extern char *inet_ntoa();
    5055
     
    110113
    111114/* check_default - additional checks for NULL, DUMP, GETPORT and unknown */
    112115
    113 check_default(addr, proc, prog)
     116int check_default(addr, proc, prog)
    114117struct sockaddr_in *addr;
    115118u_long  proc;
    116119u_long  prog;
     
    128131
    129132/* check_privileged_port - additional checks for privileged-port updates */
    130133
    131 check_privileged_port(addr, proc, prog, port)
     134int check_privileged_port(addr, proc, prog, port)
    132135struct sockaddr_in *addr;
    133136u_long  proc;
    134137u_long  prog;
     
    173176
    174177#else
    175178
    176 check_setunset(addr, proc, prog, port)
     179int check_setunset(addr, proc, prog, port)
    177180struct sockaddr_in *addr;
    178181u_long  proc;
    179182u_long  prog;
     
    197200
    198201/* check_callit - additional checks for forwarded requests */
    199202
    200 check_callit(addr, proc, prog, aproc)
     203int check_callit(addr, proc, prog, aproc)
    201204struct sockaddr_in *addr;
    202205u_long  proc;
    203206u_long  prog;
     
    249252    };
    250253    struct proc_map *procp;
    251254    static struct proc_map procmap[] = {
    252         PMAPPROC_CALLIT, "callit",
    253         PMAPPROC_DUMP, "dump",
    254         PMAPPROC_GETPORT, "getport",
    255         PMAPPROC_NULL, "null",
    256         PMAPPROC_SET, "set",
    257         PMAPPROC_UNSET, "unset",
    258         0, 0,
     255        { PMAPPROC_CALLIT, "callit" },
     256        { PMAPPROC_DUMP, "dump" },
     257        { PMAPPROC_GETPORT, "getport" },
     258        { PMAPPROC_NULL, "null" },
     259        { PMAPPROC_SET, "set" },
     260        { PMAPPROC_UNSET, "unset" },
     261        { 0, 0 }
    259262    };
    260263
    261264    /*
     
    269272
    270273        if (prognum == 0) {
    271274            progname = "";
    272         } else if (rpc = getrpcbynumber((int) prognum)) {
     275        } else if ((rpc = getrpcbynumber((int) prognum)) != NULL) {
    273276            progname = rpc->r_name;
    274277        } else {
    275278            sprintf(progname = progbuf, "%lu", prognum);
  • portmap_5beta

    diff -Naur portmap_5beta/pmap_dump.8 portmap_5beta.gimli/pmap_dump.8
    old new  
     1.TH PMAP_DUMP 8 "21th June 1997" Linux "Linux Programmer's Manual"
     2.SH NAME
     3pmap_dump \- print a list of all registered RPC programs
     4.SH SYNOPSIS
     5.B pmap_dump
     6.SH DESCRIPTION
     7The
     8.B pmap_dump
     9command can be used to restart a running portmapper or to print
     10a list of all registered RPC programs on the local host. If you
     11want to use the program to restart the portmapper you have to
     12redirect the output of
     13.B pmap_dump
     14to a file. After this you can restart the portmapper and restore
     15the list of the registered RPC programs by feeding the output
     16of
     17.B pmap_dump
     18to the
     19.B pmap_set
     20command.
     21.SH SEE ALSO
     22.BR pmap_set (8),
     23.BR rpc.portmap (8)
     24
  • portmap_5beta

    diff -Naur portmap_5beta/pmap_dump.c portmap_5beta.gimli/pmap_dump.c
    old new  
    55  * Computing Science, Eindhoven University of Technology, The Netherlands.
    66  */
    77
    8 #ifndef lint
     8#ifdef lint
    99static char sccsid[] = "@(#) pmap_dump.c 1.1 92/06/11 22:53:15";
    1010#endif
    1111
     
    2323
    2424static char *protoname();
    2525
    26 main(argc, argv)
     26#ifndef INADDR_LOOPBACK
     27#define INADDR_LOOPBACK ntohl(inet_addr("127.0.0.1"))
     28#endif
     29
     30static void    get_myloopaddress(addrp)
     31struct sockaddr_in *addrp;
     32{
     33    memset((char *) addrp, 0, sizeof(*addrp));
     34    addrp->sin_family = AF_INET;
     35    addrp->sin_port = htons(PMAPPORT);
     36    addrp->sin_addr.s_addr = htonl(INADDR_LOOPBACK);
     37}
     38
     39int main(argc, argv)
    2740int     argc;
    2841char  **argv;
    2942{
     
    3144    register struct pmaplist *list;
    3245    register struct rpcent *rpc;
    3346
    34     get_myaddress(&addr);
     47    get_myloopaddress(&addr);
    3548
    3649    for (list = pmap_getmaps(&addr); list; list = list->pml_next) {
    3750        rpc = getrpcbynumber((int) list->pml_map.pm_prog);
  • portmap_5beta

    diff -Naur portmap_5beta/pmap_set.8 portmap_5beta.gimli/pmap_set.8
    old new  
     1.TH PMAP_SET 8 "21th June 1997" Linux "Linux Programmer's Manual"
     2.SH NAME
     3pmap_set \- set the list of registered RPC programs
     4.SH SYNOPSIS
     5.B pmap_set
     6.SH DESCRIPTION
     7The
     8.B pmap_set
     9command can be used to restart a running portmapper or to set
     10the list of registered RPC programs on the local host. If you
     11want to use the program to restart the portmapper you have to
     12redirect the output of
     13.B pmap_dump
     14to a file. After this you can restart the portmapper and restore
     15the list of the registered RPC programs by feeding the output
     16of
     17.B pmap_dump
     18to the
     19.B pmap_set
     20command.
     21.SH SEE ALSO
     22.BR pmap_dump (8),
     23.BR rpc.portmap (8)
     24
  • portmap_5beta

    diff -Naur portmap_5beta/pmap_set.c portmap_5beta.gimli/pmap_set.c
    old new  
    55  * Computing Science, Eindhoven University of Technology, The Netherlands.
    66  */
    77
    8 #ifndef lint
     8#ifdef lint
    99static char sccsid[] = "@(#) pmap_set.c 1.2 96/07/06 23:06:23";
    1010#endif
    1111
     
    1717#include <rpc/rpc.h>
    1818#include <rpc/pmap_clnt.h>
    1919
    20 main(argc, argv)
     20int parse_line(char *buf, u_long *prog, u_long *vers, int *prot, unsigned *port);
     21
     22int main(argc, argv)
    2123int     argc;
    2224char  **argv;
    2325{
     
    4042
    4143/* parse_line - convert line to numbers */
    4244
    43 parse_line(buf, prog, vers, prot, port)
     45int parse_line(buf, prog, vers, prot, port)
    4446char   *buf;
    4547u_long *prog;
    4648u_long *vers;
    4749int    *prot;
    4850unsigned *port;
    4951{
    50     char    proto_name[BUFSIZ];
     52    char    proto_name[256];
    5153
    52     if (sscanf(buf, "%lu %lu %s %u", prog, vers, proto_name, port) != 4) {
     54    if (sscanf(buf, "%lu %lu %255s %u", prog, vers, proto_name, port) != 4) {
    5355        return (0);
    5456    }
    5557    if (strcmp(proto_name, "tcp") == 0) {
  • portmap_5beta

    diff -Naur portmap_5beta/portmap.8 portmap_5beta.gimli/portmap.8
    old new  
     1.\" Copyright (c) 1987 Sun Microsystems
     2.\" Copyright (c) 1990, 1991 The Regents of the University of California.
     3.\" All rights reserved.
     4.\"
     5.\" Redistribution and use in source and binary forms, with or without
     6.\" modification, are permitted provided that the following conditions
     7.\" are met:
     8.\" 1. Redistributions of source code must retain the above copyright
     9.\"    notice, this list of conditions and the following disclaimer.
     10.\" 2. Redistributions in binary form must reproduce the above copyright
     11.\"    notice, this list of conditions and the following disclaimer in the
     12.\"    documentation and/or other materials provided with the distribution.
     13.\" 3. All advertising materials mentioning features or use of this software
     14.\"    must display the following acknowledgement:
     15.\"     This product includes software developed by the University of
     16.\"     California, Berkeley and its contributors.
     17.\" 4. Neither the name of the University nor the names of its contributors
     18.\"    may be used to endorse or promote products derived from this software
     19.\"    without specific prior written permission.
     20.\"
     21.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     22.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     23.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     24.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     25.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     26.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     27.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     28.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     29.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     30.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     31.\" SUCH DAMAGE.
     32.\"
     33.\"     from: @(#)portmap.8     5.3 (Berkeley) 3/16/91
     34.\"     $Id: portmap-5beta-compilation_fixes-3.patch,v 1.1 2004/06/08 04:53:09 jim Exp $
     35.\"
     36.Dd March 16, 1991
     37.Dt PORTMAP 8
     38.Os BSD 4.3
     39.Sh NAME
     40.Nm portmap
     41.Nd
     42.Tn DARPA
     43port to
     44.Tn RPC
     45program number mapper
     46.Sh SYNOPSIS
     47.Nm portmap
     48.Op Fl d
     49.Op Fl v
     50.Sh DESCRIPTION
     51.Nm Portmap
     52is a server that converts
     53.Tn RPC
     54program numbers into
     55.Tn DARPA
     56protocol port numbers.
     57It must be running in order to make
     58.Tn RPC
     59calls.
     60.Pp
     61When an
     62.Tn RPC
     63server is started, it will tell
     64.Nm portmap
     65what port number it is listening to, and what
     66.Tn RPC
     67program numbers it is prepared to serve.
     68When a client wishes to make an
     69.Tn RPC
     70call to a given program number,
     71it will first contact
     72.Nm portmap
     73on the server machine to determine
     74the port number where
     75.Tn RPC
     76packets should be sent.
     77.Pp
     78.Nm Portmap
     79must be started before any
     80.Tn RPC
     81servers are invoked.
     82.Pp
     83Normally
     84.Nm portmap
     85forks and dissociates itself from the terminal
     86like any other daemon.
     87.Nm Portmap
     88then logs errors using
     89.Xr syslog 3 .
     90.Pp
     91Option available:
     92.Bl -tag -width Ds
     93.It Fl d
     94(debug) prevents
     95.Nm portmap
     96from running as a daemon,
     97and causes errors and debugging information
     98to be printed to the standard error output.
     99.It Fl v
     100(verbose) run
     101.Nm portmap
     102in verbose mode.
     103.El
     104
     105This
     106.Nm portmap
     107version is protected by the
     108.Nm tcp_wrapper
     109library. You have to give the clients access to
     110.Nm portmap
     111if they should be allowed to use it. To allow connects from clients of
     112the .bar.com domain you could use the following line in /etc/hosts.allow:
     113
     114portmap: .bar.com
     115
     116You have to use the daemon name
     117.Nm portmap
     118for the daemon name (even if the binary has a different name). For the
     119client names you can only use the keyword ALL or IP addresses (NOT
     120host or domain names).
     121
     122For further information please have a look at the
     123.Xr tcpd 8 ,
     124.Xr hosts_allow 5
     125and
     126.Xr hosts_access 5
     127manual pages.
     128
     129.Sh SEE ALSO
     130.Xr inetd.conf 5 ,
     131.Xr rpcinfo 8 ,
     132.Xr pmap_set 8 ,
     133.Xr pmap_dump 8 ,
     134.Xr inetd 8
     135.Xr tcpd 8
     136.Xr hosts_access 5
     137.Xr hosts_options 5
     138.Sh BUGS
     139If
     140.Nm portmap
     141crashes, all servers must be restarted.
     142.Sh HISTORY
     143The
     144.Nm
     145command appeared in
     146.Bx 4.3
  • portmap_5beta

    diff -Naur portmap_5beta/portmap.c portmap_5beta.gimli/portmap.c
    old new  
    3737 All rights reserved.\n";
    3838#endif /* not lint */
    3939
    40 #ifndef lint
     40#ifdef lint
    4141static char sccsid[] = "@(#) portmap.c 1.6 96/07/06 23:06:23";
    4242#endif /* not lint */
    4343
     
    8080 * Mountain View, California  94043
    8181 */
    8282
     83#if defined(__GLIBC__)
     84#include <rpc/xdr.h>
     85#endif /* __GLIBC__ */
    8386#include <rpc/rpc.h>
    8487#include <rpc/pmap_prot.h>
    8588#include <stdio.h>
     
    9497#ifdef SYSV40
    9598#include <netinet/in.h>
    9699#endif
     100#include <sys/types.h>
     101#include <unistd.h>
    97102
    98103extern char *strerror();
    99104#include <stdlib.h>
     
    148153#endif
    149154#endif
    150155
    151 main(argc, argv)
     156int main(argc, argv)
    152157        int argc;
    153158        char **argv;
    154159{
     
    350355                 */
    351356                /* remote host authorization check */
    352357                check_default(svc_getcaller(xprt), rqstp->rq_proc, (u_long) 0);
    353                 if (!svc_sendreply(xprt, xdr_void, (caddr_t)0) && debugging) {
     358                if (!svc_sendreply(xprt, (xdrproc_t) xdr_void, (caddr_t)0) && debugging) {
    354359                        abort();
    355360                }
    356361                break;
     
    359364                /*
    360365                 * Set a program,version to port mapping
    361366                 */
    362                 if (!svc_getargs(xprt, xdr_pmap, &reg))
     367                if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (caddr_t) &reg))
    363368                        svcerr_decode(xprt);
    364369                else {
    365370                        /* reject non-local requests, protect priv. ports */
     
    401406                                ans = 1;
    402407                        }
    403408                done:
    404                         if ((!svc_sendreply(xprt, xdr_int, (caddr_t)&ans)) &&
     409                        if ((!svc_sendreply(xprt, (xdrproc_t) xdr_int, (caddr_t)&ans)) &&
    405410                            debugging) {
    406411                                (void) fprintf(stderr, "svc_sendreply\n");
    407412                                abort();
     
    413418                /*
    414419                 * Remove a program,version to port mapping.
    415420                 */
    416                 if (!svc_getargs(xprt, xdr_pmap, &reg))
     421                if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (caddr_t) &reg))
    417422                        svcerr_decode(xprt);
    418423                else {
    419424                        ans = 0;
     
    447452                                        prevpml->pml_next = pml;
    448453                                free(t);
    449454                        }
    450                         if ((!svc_sendreply(xprt, xdr_int, (caddr_t)&ans)) &&
     455                        if ((!svc_sendreply(xprt, (xdrproc_t) xdr_int, (caddr_t)&ans)) &&
    451456                            debugging) {
    452457                                (void) fprintf(stderr, "svc_sendreply\n");
    453458                                abort();
     
    459464                /*
    460465                 * Lookup the mapping for a program,version and return its port
    461466                 */
    462                 if (!svc_getargs(xprt, xdr_pmap, &reg))
     467                if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (caddr_t) &reg))
    463468                        svcerr_decode(xprt);
    464469                else {
    465470                        /* remote host authorization check */
     
    474479                                port = fnd->pml_map.pm_port;
    475480                        else
    476481                                port = 0;
    477                         if ((!svc_sendreply(xprt, xdr_int, (caddr_t)&port)) &&
     482                        if ((!svc_sendreply(xprt, (xdrproc_t) xdr_int, (caddr_t)&port)) &&
    478483                            debugging) {
    479484                                (void) fprintf(stderr, "svc_sendreply\n");
    480485                                abort();
     
    486491                /*
    487492                 * Return the current set of mapped program,version
    488493                 */
    489                 if (!svc_getargs(xprt, xdr_void, NULL))
     494                if (!svc_getargs(xprt, (xdrproc_t) xdr_void, (caddr_t) NULL))
    490495                        svcerr_decode(xprt);
    491496                else {
    492497                        /* remote host authorization check */
     
    497502                        } else {
    498503                                p = pmaplist;
    499504                        }
    500                         if ((!svc_sendreply(xprt, xdr_pmaplist,
     505                        if ((!svc_sendreply(xprt, (xdrproc_t) xdr_pmaplist,
    501506                            (caddr_t)&p)) && debugging) {
    502507                                (void) fprintf(stderr, "svc_sendreply\n");
    503508                                abort();
     
    645650        timeout.tv_sec = 5;
    646651        timeout.tv_usec = 0;
    647652        a.rmt_args.args = buf;
    648         if (!svc_getargs(xprt, xdr_rmtcall_args, &a))
     653        if (!svc_getargs(xprt, (xdrproc_t) xdr_rmtcall_args, (caddr_t) &a))
    649654                return;
    650655        /* host and service access control */
    651656        if (!check_callit(svc_getcaller(xprt),
     
    674679                           au->aup_uid, au->aup_gid, au->aup_len, au->aup_gids);
    675680                }
    676681                a.rmt_port = (u_long)port;
    677                 if (clnt_call(client, a.rmt_proc, xdr_opaque_parms, &a,
    678                     xdr_len_opaque_parms, &a, timeout) == RPC_SUCCESS) {
    679                         svc_sendreply(xprt, xdr_rmtcall_result, (caddr_t)&a);
     682                if (clnt_call(client, a.rmt_proc, (xdrproc_t) xdr_opaque_parms, (char*) &a,
     683                    (xdrproc_t) xdr_len_opaque_parms, (char*) &a, timeout) == RPC_SUCCESS) {
     684                        svc_sendreply(xprt, (xdrproc_t) xdr_rmtcall_result, (caddr_t)&a);
    680685                }
    681686                AUTH_DESTROY(client->cl_auth);
    682687                clnt_destroy(client);
Note: See TracBrowser for help on using the repository browser.