|
|
# --- ROCK-COPYRIGHT-NOTE-BEGIN --- # # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # Please add additional copyright information _after_ the line containing # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/base/portmap/misc.patch # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # # --- ROCK-COPYRIGHT-NOTE-END ---
diff -Nur portmap_4.orig/portmap.c portmap_4/portmap.c
--- portmap_4.orig/portmap.c 1996-05-31 15:52:59.000000000 +0200
+++ portmap_4/portmap.c 2005-01-19 20:47:00.000000000 +0100
@@ -80,6 +80,10 @@
* Mountain View, California 94043 */ +#if defined(__GLIBC__)
+#include <rpc/xdr.h>
+#endif /* __GLIBC__ */
+
#include <rpc/rpc.h> #include <rpc/pmap_prot.h> #include <stdio.h> @@ -95,6 +99,9 @@
#include <netinet/in.h> #endif +#include <sys/types.h>
+#include <unistd.h>
+
extern char *strerror(); #include <stdlib.h> @@ -290,7 +298,7 @@
*/ /* remote host authorization check */ check_default(svc_getcaller(xprt), rqstp->rq_proc, (u_long) 0); - if (!svc_sendreply(xprt, xdr_void, (caddr_t)0) && debugging) {
+ if (!svc_sendreply(xprt, (xdrproc_t)xdr_void, (caddr_t)0) && debugging) {
abort(); } break; @@ -299,7 +307,7 @@
/* * Set a program,version to port mapping */ - if (!svc_getargs(xprt, xdr_pmap, ®))
+ if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)®))
svcerr_decode(xprt); else { /* reject non-local requests, protect priv. ports */ @@ -341,7 +349,7 @@
ans = 1; } done: - if ((!svc_sendreply(xprt, xdr_int, (caddr_t)&ans)) &&
+ if ((!svc_sendreply(xprt, (xdrproc_t)xdr_int, (caddr_t)&ans)) &&
debugging) { (void) fprintf(stderr, "svc_sendreply\n"); abort(); @@ -353,7 +361,7 @@
/* * Remove a program,version to port mapping. */ - if (!svc_getargs(xprt, xdr_pmap, ®))
+ if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)®))
svcerr_decode(xprt); else { ans = 0; @@ -387,7 +395,7 @@
prevpml->pml_next = pml; free(t); } - if ((!svc_sendreply(xprt, xdr_int, (caddr_t)&ans)) &&
+ if ((!svc_sendreply(xprt, (xdrproc_t)xdr_int, (caddr_t)&ans)) &&
debugging) { (void) fprintf(stderr, "svc_sendreply\n"); abort(); @@ -399,7 +407,7 @@
/* * Lookup the mapping for a program,version and return its port */ - if (!svc_getargs(xprt, xdr_pmap, ®))
+ if (!svc_getargs(xprt, (xdrproc_t)xdr_pmap, (char *)®))
svcerr_decode(xprt); else { /* remote host authorization check */ @@ -414,7 +422,7 @@
port = fnd->pml_map.pm_port; else port = 0; - if ((!svc_sendreply(xprt, xdr_int, (caddr_t)&port)) &&
+ if ((!svc_sendreply(xprt, (xdrproc_t)xdr_int, (caddr_t)&port)) &&
debugging) { (void) fprintf(stderr, "svc_sendreply\n"); abort(); @@ -426,7 +434,7 @@
/* * Return the current set of mapped program,version */ - if (!svc_getargs(xprt, xdr_void, NULL))
+ if (!svc_getargs(xprt, (xdrproc_t)xdr_void, NULL))
svcerr_decode(xprt); else { /* remote host authorization check */ @@ -437,7 +445,7 @@
} else { p = pmaplist; } - if ((!svc_sendreply(xprt, xdr_pmaplist,
+ if ((!svc_sendreply(xprt, (xdrproc_t)xdr_pmaplist,
(caddr_t)&p)) && debugging) { (void) fprintf(stderr, "svc_sendreply\n"); abort(); @@ -481,7 +489,7 @@
struct encap_parms *epp; { - return (xdr_bytes(xdrs, &(epp->args), &(epp->arglen), ARGSIZE));
+ return (xdr_bytes(xdrs, &(epp->args), (u_int *)&(epp->arglen), ARGSIZE));
} struct rmtcallargs { @@ -585,7 +593,7 @@
timeout.tv_sec = 5; timeout.tv_usec = 0; a.rmt_args.args = buf; - if (!svc_getargs(xprt, xdr_rmtcall_args, &a))
+ if (!svc_getargs(xprt, (xdrproc_t)xdr_rmtcall_args, (char *)&a))
return; /* host and service access control */ if (!check_callit(svc_getcaller(xprt), @@ -614,9 +622,9 @@
au->aup_uid, au->aup_gid, au->aup_len, au->aup_gids); } a.rmt_port = (u_long)port; - if (clnt_call(client, a.rmt_proc, xdr_opaque_parms, &a,
- xdr_len_opaque_parms, &a, timeout) == RPC_SUCCESS) {
- svc_sendreply(xprt, xdr_rmtcall_result, (caddr_t)&a);
+ if (clnt_call(client, (u_long)a.rmt_proc, (xdrproc_t)xdr_opaque_parms, (char *)&a,
+ (xdrproc_t)xdr_len_opaque_parms, (char *)&a, timeout) == RPC_SUCCESS) {
+ svc_sendreply(xprt, (xdrproc_t)xdr_rmtcall_result, (caddr_t)&a);
} AUTH_DESTROY(client->cl_auth); clnt_destroy(client);
|