source:
scripts/patches/portmap-5beta-compilation_fixes-3.patch@
c3ed84c
Last change on this file since c3ed84c was 7f65c0e, checked in by , 19 years ago | |
---|---|
|
|
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 1 4 @(#) BLURB 1.5 96/07/06 23:09:45 2 5 3 6 This is the fifth replacement portmapper release. -
portmap_5beta
diff -Naur portmap_5beta/Makefile portmap_5beta.gimli/Makefile
old new 8 8 # if you disagree. See `man 3 syslog' for examples. Some syslog versions 9 9 # do not provide this flexibility. 10 10 # 11 FACILITY=LOG_ MAIL11 FACILITY=LOG_DAEMON 12 12 13 13 # To disable tcp-wrapper style access control, comment out the following 14 14 # macro definitions. Access control can also be turned off by providing … … 16 16 # daemon, is always treated as an authorized host. 17 17 18 18 HOSTS_ACCESS= -DHOSTS_ACCESS 19 WRAP_LIB = $(WRAP_DIR)/libwrap.a 19 #WRAP_LIB = $(WRAP_DIR)/libwrap.a 20 WRAP_LIB = -lwrap 20 21 21 22 # Comment out if your RPC library does not allocate privileged ports for 22 23 # requests from processes with root privilege, or the new portmap will … … 71 72 # With verbose logging on, HP-UX 9.x and AIX 4.1 leave zombies behind when 72 73 # SIGCHLD is not ignored. Enable next macro for a fix. 73 74 # 74 #ZOMBIES = -DIGNORE_SIGCHLD # AIX 4.x, HP-UX 9.x75 ZOMBIES = -DIGNORE_SIGCHLD # AIX 4.x, HP-UX 9.x 75 76 76 77 # Uncomment the following macro if your system does not have u_long. 77 78 # … … 81 82 # libwrap.a object library. WRAP_DIR should specify the directory with 82 83 # that library. 83 84 84 WRAP_DIR= ../tcp_wrappers85 WRAP_DIR= $(TCPD_DIR) 85 86 86 87 # Auxiliary object files that may be missing from your C library. 87 88 # … … 99 100 100 101 # Comment out if your compiler talks ANSI and understands const 101 102 # 102 CONST = -Dconst=103 #CONST = -Dconst= 103 104 104 105 ### End of configurable stuff. 105 106 ############################## 106 107 108 GLIBC=$(shell grep -s -c __GLIBC__ /usr/include/features.h) 109 110 ifeq ($(GLIBC),0) 111 LIBS += # -lbsd 112 else 113 LIBS += -lnsl 114 endif 115 116 107 117 SHELL = /bin/sh 108 118 109 COPT = $(CONST) -Dperror=xperror$(HOSTS_ACCESS) $(CHECK_PORT) \119 COPT = $(CONST) $(HOSTS_ACCESS) $(CHECK_PORT) \ 110 120 $(SYS) -DFACILITY=$(FACILITY) $(ULONG) $(ZOMBIES) $(SA_LEN) \ 111 121 $(LOOPBACK) $(SETPGRP) 112 CFLAGS = $(COPT) -O$(NSARCHS)122 CFLAGS = -Wall $(COPT) -O2 $(NSARCHS) 113 123 OBJECTS = portmap.o pmap_check.o from_local.o $(AUX) 114 124 115 125 all: portmap pmap_dump pmap_set 116 126 117 portmap: $(OBJECTS) $(WRAP_DIR)/libwrap.a127 portmap: $(OBJECTS) # $(WRAP_DIR)/libwrap.a 118 128 $(CC) $(CFLAGS) -o $@ $(OBJECTS) $(WRAP_LIB) $(LIBS) 119 129 120 130 pmap_dump: pmap_dump.c … … 129 139 get_myaddress: get_myaddress.c 130 140 cc $(CFLAGS) -DTEST -o $@ get_myaddress.c $(LIBS) 131 141 142 install: 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 132 153 lint: 133 154 lint $(COPT) $(OBJECTS:%.o=%.c) 134 155 -
portmap_5beta
diff -Naur portmap_5beta/daemon.c portmap_5beta.gimli/daemon.c
old new 36 36 #endif /* LIBC_SCCS and not lint */ 37 37 38 38 #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> 44 41 45 42 /* From paths.h */ 46 43 #define _PATH_DEVNULL "/dev/null" 47 44 48 daemon(nochdir, noclose)45 int daemon(nochdir, noclose) 49 46 int nochdir, noclose; 50 47 { 51 48 int cpid; -
from_local.c
diff -Naur portmap_5beta/from_local.c portmap_5beta.gimli/from_local.c
old new 35 35 * Mountain View, California 94043 36 36 */ 37 37 38 #if ndef lint38 #ifdef lint 39 39 static char sccsid[] = "@(#) from_local.c 1.3 96/05/31 15:52:57"; 40 40 #endif 41 41 … … 51 51 #include <net/if.h> 52 52 #include <sys/ioctl.h> 53 53 #include <syslog.h> 54 #include <stdlib.h> 55 #include <string.h> 56 #include <unistd.h> 54 57 55 58 #ifndef TRUE 56 59 #define TRUE 1 … … 96 99 97 100 /* find_local - find all IP addresses for this host */ 98 101 99 find_local()102 int find_local() 100 103 { 101 104 struct ifconf ifc; 102 105 struct ifreq ifreq; … … 154 157 155 158 /* from_local - determine whether request comes from the local system */ 156 159 157 from_local(addr)160 int from_local(addr) 158 161 struct sockaddr_in *addr; 159 162 { 160 163 int i; -
pmap_check.c
diff -Naur portmap_5beta/pmap_check.c portmap_5beta.gimli/pmap_check.c
old new 32 32 * Computing Science, Eindhoven University of Technology, The Netherlands. 33 33 */ 34 34 35 #if ndef lint35 #ifdef lint 36 36 static char sccsid[] = "@(#) pmap_check.c 1.8 96/07/07 10:49:10"; 37 37 #endif 38 38 … … 45 45 #include <netinet/in.h> 46 46 #include <rpc/rpcent.h> 47 47 #endif 48 #include <sys/types.h> 49 #include <unistd.h> 50 #ifdef HOSTS_ACCESS 51 #include <tcpd.h> 52 #endif 48 53 49 54 extern char *inet_ntoa(); 50 55 … … 110 113 111 114 /* check_default - additional checks for NULL, DUMP, GETPORT and unknown */ 112 115 113 check_default(addr, proc, prog)116 int check_default(addr, proc, prog) 114 117 struct sockaddr_in *addr; 115 118 u_long proc; 116 119 u_long prog; … … 128 131 129 132 /* check_privileged_port - additional checks for privileged-port updates */ 130 133 131 check_privileged_port(addr, proc, prog, port)134 int check_privileged_port(addr, proc, prog, port) 132 135 struct sockaddr_in *addr; 133 136 u_long proc; 134 137 u_long prog; … … 173 176 174 177 #else 175 178 176 check_setunset(addr, proc, prog, port)179 int check_setunset(addr, proc, prog, port) 177 180 struct sockaddr_in *addr; 178 181 u_long proc; 179 182 u_long prog; … … 197 200 198 201 /* check_callit - additional checks for forwarded requests */ 199 202 200 check_callit(addr, proc, prog, aproc)203 int check_callit(addr, proc, prog, aproc) 201 204 struct sockaddr_in *addr; 202 205 u_long proc; 203 206 u_long prog; … … 249 252 }; 250 253 struct proc_map *procp; 251 254 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 } 259 262 }; 260 263 261 264 /* … … 269 272 270 273 if (prognum == 0) { 271 274 progname = ""; 272 } else if ( rpc = getrpcbynumber((int) prognum)) {275 } else if ((rpc = getrpcbynumber((int) prognum)) != NULL) { 273 276 progname = rpc->r_name; 274 277 } else { 275 278 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 3 pmap_dump \- print a list of all registered RPC programs 4 .SH SYNOPSIS 5 .B pmap_dump 6 .SH DESCRIPTION 7 The 8 .B pmap_dump 9 command can be used to restart a running portmapper or to print 10 a list of all registered RPC programs on the local host. If you 11 want to use the program to restart the portmapper you have to 12 redirect the output of 13 .B pmap_dump 14 to a file. After this you can restart the portmapper and restore 15 the list of the registered RPC programs by feeding the output 16 of 17 .B pmap_dump 18 to the 19 .B pmap_set 20 command. 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 5 5 * Computing Science, Eindhoven University of Technology, The Netherlands. 6 6 */ 7 7 8 #if ndef lint8 #ifdef lint 9 9 static char sccsid[] = "@(#) pmap_dump.c 1.1 92/06/11 22:53:15"; 10 10 #endif 11 11 … … 23 23 24 24 static char *protoname(); 25 25 26 main(argc, argv) 26 #ifndef INADDR_LOOPBACK 27 #define INADDR_LOOPBACK ntohl(inet_addr("127.0.0.1")) 28 #endif 29 30 static void get_myloopaddress(addrp) 31 struct 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 39 int main(argc, argv) 27 40 int argc; 28 41 char **argv; 29 42 { … … 31 44 register struct pmaplist *list; 32 45 register struct rpcent *rpc; 33 46 34 get_my address(&addr);47 get_myloopaddress(&addr); 35 48 36 49 for (list = pmap_getmaps(&addr); list; list = list->pml_next) { 37 50 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 3 pmap_set \- set the list of registered RPC programs 4 .SH SYNOPSIS 5 .B pmap_set 6 .SH DESCRIPTION 7 The 8 .B pmap_set 9 command can be used to restart a running portmapper or to set 10 the list of registered RPC programs on the local host. If you 11 want to use the program to restart the portmapper you have to 12 redirect the output of 13 .B pmap_dump 14 to a file. After this you can restart the portmapper and restore 15 the list of the registered RPC programs by feeding the output 16 of 17 .B pmap_dump 18 to the 19 .B pmap_set 20 command. 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 5 5 * Computing Science, Eindhoven University of Technology, The Netherlands. 6 6 */ 7 7 8 #if ndef lint8 #ifdef lint 9 9 static char sccsid[] = "@(#) pmap_set.c 1.2 96/07/06 23:06:23"; 10 10 #endif 11 11 … … 17 17 #include <rpc/rpc.h> 18 18 #include <rpc/pmap_clnt.h> 19 19 20 main(argc, argv) 20 int parse_line(char *buf, u_long *prog, u_long *vers, int *prot, unsigned *port); 21 22 int main(argc, argv) 21 23 int argc; 22 24 char **argv; 23 25 { … … 40 42 41 43 /* parse_line - convert line to numbers */ 42 44 43 parse_line(buf, prog, vers, prot, port)45 int parse_line(buf, prog, vers, prot, port) 44 46 char *buf; 45 47 u_long *prog; 46 48 u_long *vers; 47 49 int *prot; 48 50 unsigned *port; 49 51 { 50 char proto_name[ BUFSIZ];52 char proto_name[256]; 51 53 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) { 53 55 return (0); 54 56 } 55 57 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 43 port to 44 .Tn RPC 45 program number mapper 46 .Sh SYNOPSIS 47 .Nm portmap 48 .Op Fl d 49 .Op Fl v 50 .Sh DESCRIPTION 51 .Nm Portmap 52 is a server that converts 53 .Tn RPC 54 program numbers into 55 .Tn DARPA 56 protocol port numbers. 57 It must be running in order to make 58 .Tn RPC 59 calls. 60 .Pp 61 When an 62 .Tn RPC 63 server is started, it will tell 64 .Nm portmap 65 what port number it is listening to, and what 66 .Tn RPC 67 program numbers it is prepared to serve. 68 When a client wishes to make an 69 .Tn RPC 70 call to a given program number, 71 it will first contact 72 .Nm portmap 73 on the server machine to determine 74 the port number where 75 .Tn RPC 76 packets should be sent. 77 .Pp 78 .Nm Portmap 79 must be started before any 80 .Tn RPC 81 servers are invoked. 82 .Pp 83 Normally 84 .Nm portmap 85 forks and dissociates itself from the terminal 86 like any other daemon. 87 .Nm Portmap 88 then logs errors using 89 .Xr syslog 3 . 90 .Pp 91 Option available: 92 .Bl -tag -width Ds 93 .It Fl d 94 (debug) prevents 95 .Nm portmap 96 from running as a daemon, 97 and causes errors and debugging information 98 to be printed to the standard error output. 99 .It Fl v 100 (verbose) run 101 .Nm portmap 102 in verbose mode. 103 .El 104 105 This 106 .Nm portmap 107 version is protected by the 108 .Nm tcp_wrapper 109 library. You have to give the clients access to 110 .Nm portmap 111 if they should be allowed to use it. To allow connects from clients of 112 the .bar.com domain you could use the following line in /etc/hosts.allow: 113 114 portmap: .bar.com 115 116 You have to use the daemon name 117 .Nm portmap 118 for the daemon name (even if the binary has a different name). For the 119 client names you can only use the keyword ALL or IP addresses (NOT 120 host or domain names). 121 122 For further information please have a look at the 123 .Xr tcpd 8 , 124 .Xr hosts_allow 5 125 and 126 .Xr hosts_access 5 127 manual 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 139 If 140 .Nm portmap 141 crashes, all servers must be restarted. 142 .Sh HISTORY 143 The 144 .Nm 145 command appeared in 146 .Bx 4.3 -
portmap_5beta
diff -Naur portmap_5beta/portmap.c portmap_5beta.gimli/portmap.c
old new 37 37 All rights reserved.\n"; 38 38 #endif /* not lint */ 39 39 40 #if ndef lint40 #ifdef lint 41 41 static char sccsid[] = "@(#) portmap.c 1.6 96/07/06 23:06:23"; 42 42 #endif /* not lint */ 43 43 … … 80 80 * Mountain View, California 94043 81 81 */ 82 82 83 #if defined(__GLIBC__) 84 #include <rpc/xdr.h> 85 #endif /* __GLIBC__ */ 83 86 #include <rpc/rpc.h> 84 87 #include <rpc/pmap_prot.h> 85 88 #include <stdio.h> … … 94 97 #ifdef SYSV40 95 98 #include <netinet/in.h> 96 99 #endif 100 #include <sys/types.h> 101 #include <unistd.h> 97 102 98 103 extern char *strerror(); 99 104 #include <stdlib.h> … … 148 153 #endif 149 154 #endif 150 155 151 main(argc, argv)156 int main(argc, argv) 152 157 int argc; 153 158 char **argv; 154 159 { … … 350 355 */ 351 356 /* remote host authorization check */ 352 357 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) { 354 359 abort(); 355 360 } 356 361 break; … … 359 364 /* 360 365 * Set a program,version to port mapping 361 366 */ 362 if (!svc_getargs(xprt, xdr_pmap,®))367 if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (caddr_t) ®)) 363 368 svcerr_decode(xprt); 364 369 else { 365 370 /* reject non-local requests, protect priv. ports */ … … 401 406 ans = 1; 402 407 } 403 408 done: 404 if ((!svc_sendreply(xprt, xdr_int, (caddr_t)&ans)) &&409 if ((!svc_sendreply(xprt, (xdrproc_t) xdr_int, (caddr_t)&ans)) && 405 410 debugging) { 406 411 (void) fprintf(stderr, "svc_sendreply\n"); 407 412 abort(); … … 413 418 /* 414 419 * Remove a program,version to port mapping. 415 420 */ 416 if (!svc_getargs(xprt, xdr_pmap,®))421 if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (caddr_t) ®)) 417 422 svcerr_decode(xprt); 418 423 else { 419 424 ans = 0; … … 447 452 prevpml->pml_next = pml; 448 453 free(t); 449 454 } 450 if ((!svc_sendreply(xprt, xdr_int, (caddr_t)&ans)) &&455 if ((!svc_sendreply(xprt, (xdrproc_t) xdr_int, (caddr_t)&ans)) && 451 456 debugging) { 452 457 (void) fprintf(stderr, "svc_sendreply\n"); 453 458 abort(); … … 459 464 /* 460 465 * Lookup the mapping for a program,version and return its port 461 466 */ 462 if (!svc_getargs(xprt, xdr_pmap,®))467 if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (caddr_t) ®)) 463 468 svcerr_decode(xprt); 464 469 else { 465 470 /* remote host authorization check */ … … 474 479 port = fnd->pml_map.pm_port; 475 480 else 476 481 port = 0; 477 if ((!svc_sendreply(xprt, xdr_int, (caddr_t)&port)) &&482 if ((!svc_sendreply(xprt, (xdrproc_t) xdr_int, (caddr_t)&port)) && 478 483 debugging) { 479 484 (void) fprintf(stderr, "svc_sendreply\n"); 480 485 abort(); … … 486 491 /* 487 492 * Return the current set of mapped program,version 488 493 */ 489 if (!svc_getargs(xprt, xdr_void,NULL))494 if (!svc_getargs(xprt, (xdrproc_t) xdr_void, (caddr_t) NULL)) 490 495 svcerr_decode(xprt); 491 496 else { 492 497 /* remote host authorization check */ … … 497 502 } else { 498 503 p = pmaplist; 499 504 } 500 if ((!svc_sendreply(xprt, xdr_pmaplist,505 if ((!svc_sendreply(xprt, (xdrproc_t) xdr_pmaplist, 501 506 (caddr_t)&p)) && debugging) { 502 507 (void) fprintf(stderr, "svc_sendreply\n"); 503 508 abort(); … … 645 650 timeout.tv_sec = 5; 646 651 timeout.tv_usec = 0; 647 652 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)) 649 654 return; 650 655 /* host and service access control */ 651 656 if (!check_callit(svc_getcaller(xprt), … … 674 679 au->aup_uid, au->aup_gid, au->aup_len, au->aup_gids); 675 680 } 676 681 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); 680 685 } 681 686 AUTH_DESTROY(client->cl_auth); 682 687 clnt_destroy(client);
Note:
See TracBrowser
for help on using the repository browser.