From 18254e84b8f63ccfeb2f673e4cebba2135a298c4 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Tue, 5 Jun 2001 15:46:16 +0000 Subject: [PATCH] * clnt_perror.c (clnt_spcreateerror): Enumerate missing cases in switch. * getrpcport.c: Include string.h for memmove() prototype and pmap_clnt.h for pmap_getport() prototype. * rpc_dtablesize.c (_gssrpc_rpc_dtablesize): Declare as returning int. * get_myaddress.c (gssrpc_get_myaddress): Likewise. * rpc_prot.c (gssrpc_xdr_accepted_reply, sunrpc_seterr_reply): Enumerate missing cases for switch. (rejected): Fix typo: RPC_VERMISMATCH -> RPC_MISMATCH for enumerated switch. * svc_auth.c: Add braces to svcauthsw[] initialization. * svc_simple.c: Include pmap_clnt.h for pmap_unset prototype. * bindresvport.c, clnt_simple.c, clnt_tcp.c, clnt_udp.c, pmap_clnt.c, pmap_getmaps.c, pmap_gtport.c, pmap_rmt.c, svc_tcp.c, svc_udp.c: Include unistd.h for close() prototype. * xdr.c (xdr_opaque): Specify internal buffer as ints. (xdr_u_int32): Declare as returning bool_t. * clnt_generic.c, rpc_callmsg.c, svc_auth_unix.c, xdr_mem.c: Include string.h for memmove() prototype. * xdr_rec.c: Include string.h for memmove() prototype. Add dummy XDR_FREE cases for switches. * xdr_reference.c (xdr_reference): Add XDR_ENCODE case. (gcc warning). * xdr_array.c (xdr_array): Likewise. * auth.h: Include gssrpc/xdr.h and provide prototype for gssrpc_xdr_opaque_auth(). * auth_gssapi.h: Add prototypes for auth_gssapi_seal_seq() and auth_gssapi_unseal_seq(). * clnt.h: Add prototype for _gssrpc_rpc_dtablesize(). * rpc.h: Add prototypes for gssrpc_get_myaddress() and gssrpc_bindresvport(). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13269 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/rpc/ChangeLog | 47 ++++++++++++++++++++++++++++++++++++ src/lib/rpc/auth.h | 9 +++++++ src/lib/rpc/auth_gssapi.h | 7 ++++++ src/lib/rpc/bindresvport.c | 4 +++ src/lib/rpc/clnt.h | 4 +-- src/lib/rpc/clnt_generic.c | 1 + src/lib/rpc/clnt_perror.c | 19 +++++++++++++++ src/lib/rpc/clnt_simple.c | 3 +++ src/lib/rpc/clnt_tcp.c | 1 + src/lib/rpc/clnt_udp.c | 2 +- src/lib/rpc/get_myaddress.c | 1 + src/lib/rpc/getrpcport.c | 3 +++ src/lib/rpc/pmap_clnt.c | 1 + src/lib/rpc/pmap_getmaps.c | 1 + src/lib/rpc/pmap_getport.c | 1 + src/lib/rpc/pmap_rmt.c | 1 + src/lib/rpc/rpc.h | 10 ++++++++ src/lib/rpc/rpc_callmsg.c | 2 +- src/lib/rpc/rpc_dtablesize.c | 1 + src/lib/rpc/rpc_prot.c | 26 +++++++++++++++++++- src/lib/rpc/svc_auth.c | 10 ++++---- src/lib/rpc/svc_auth_unix.c | 1 + src/lib/rpc/svc_simple.c | 2 ++ src/lib/rpc/svc_tcp.c | 4 ++- src/lib/rpc/svc_udp.c | 2 ++ src/lib/rpc/xdr.c | 7 +++++- src/lib/rpc/xdr_array.c | 3 +++ src/lib/rpc/xdr_mem.c | 1 + src/lib/rpc/xdr_rec.c | 7 ++++++ src/lib/rpc/xdr_reference.c | 3 +++ 30 files changed, 172 insertions(+), 12 deletions(-) diff --git a/src/lib/rpc/ChangeLog b/src/lib/rpc/ChangeLog index 423ea0c0a..52e60ac01 100644 --- a/src/lib/rpc/ChangeLog +++ b/src/lib/rpc/ChangeLog @@ -1,3 +1,50 @@ +2001-06-05 Ezra Peisach + + * clnt_perror.c (clnt_spcreateerror): Enumerate missing cases in + switch. + + * getrpcport.c: Include string.h for memmove() prototype and + pmap_clnt.h for pmap_getport() prototype. + + * rpc_dtablesize.c (_gssrpc_rpc_dtablesize): Declare as returning int. + * get_myaddress.c (gssrpc_get_myaddress): Likewise. + + * rpc_prot.c (gssrpc_xdr_accepted_reply, sunrpc_seterr_reply): + Enumerate missing cases for switch. + (rejected): Fix typo: RPC_VERMISMATCH -> RPC_MISMATCH for + enumerated switch. + + * svc_auth.c: Add braces to svcauthsw[] initialization. + + * svc_simple.c: Include pmap_clnt.h for pmap_unset prototype. + + * bindresvport.c, clnt_simple.c, clnt_tcp.c, clnt_udp.c, pmap_clnt.c, + pmap_getmaps.c, pmap_gtport.c, pmap_rmt.c, svc_tcp.c, svc_udp.c: + Include unistd.h for close() prototype. + + * xdr.c (xdr_opaque): Specify internal buffer as ints. + (xdr_u_int32): Declare as returning bool_t. + + * clnt_generic.c, rpc_callmsg.c, svc_auth_unix.c, xdr_mem.c: + Include string.h for memmove() prototype. + + * xdr_rec.c: Include string.h for memmove() prototype. Add dummy + XDR_FREE cases for switches. + + * xdr_reference.c (xdr_reference): Add XDR_ENCODE case. (gcc warning). + * xdr_array.c (xdr_array): Likewise. + + * auth.h: Include gssrpc/xdr.h and provide prototype for + gssrpc_xdr_opaque_auth(). + + * auth_gssapi.h: Add prototypes for auth_gssapi_seal_seq() and + auth_gssapi_unseal_seq(). + + * clnt.h: Add prototype for _gssrpc_rpc_dtablesize(). + + * rpc.h: Add prototypes for gssrpc_get_myaddress() and + gssrpc_bindresvport(). + 2001-03-07 Ken Raeburn * configure.in: Check for strerror. diff --git a/src/lib/rpc/auth.h b/src/lib/rpc/auth.h index 5a0ad0da9..5f221c0a6 100644 --- a/src/lib/rpc/auth.h +++ b/src/lib/rpc/auth.h @@ -39,6 +39,8 @@ */ +#include + #define MAX_AUTH_BYTES 400 #define MAXNETNAMELEN 255 /* maximum length of network user's name */ @@ -207,3 +209,10 @@ extern AUTH *authdes_create(); * need to accept this value until 1.0 is dead. */ #define AUTH_GSSAPI_COMPAT 4 + +/* + * XDR an opaque authentication struct. + */ +#define xdr_opaque_auth gssrpc_xdr_opaque_auth + +extern bool_t xdr_opaque_auth (XDR *, struct opaque_auth *); diff --git a/src/lib/rpc/auth_gssapi.h b/src/lib/rpc/auth_gssapi.h index 2cdd20f2f..5f462a039 100644 --- a/src/lib/rpc/auth_gssapi.h +++ b/src/lib/rpc/auth_gssapi.h @@ -111,6 +111,13 @@ PROTOTYPE((CLIENT *clnt, char *service_name)); void auth_gssapi_display_status PROTOTYPE((char *msg, OM_uint32 major, OM_uint32 minor)); + +bool_t auth_gssapi_seal_seq +PROTOTYPE((gss_ctx_id_t context, rpc_u_int32 seq_num, gss_buffer_t out_buf)); + +bool_t auth_gssapi_unseal_seq +PROTOTYPE((gss_ctx_id_t context, gss_buffer_t in_buf, rpc_u_int32 *seq_num)); + bool_t _svcauth_gssapi_set_names PROTOTYPE((auth_gssapi_name *names, int num)); void _svcauth_gssapi_unset_names diff --git a/src/lib/rpc/bindresvport.c b/src/lib/rpc/bindresvport.c index b006e30f3..ca041dfc1 100644 --- a/src/lib/rpc/bindresvport.c +++ b/src/lib/rpc/bindresvport.c @@ -1,4 +1,6 @@ +#if !defined(lint) && defined(SCCSIDS) static char sccsid[] = "@(#)bindresvport.c 2.2 88/07/29 4.0 RPCSRC 1.8 88/02/08 SMI"; +#endif /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for * unrestricted use provided that this legend is included on all tape @@ -33,6 +35,7 @@ static char sccsid[] = "@(#)bindresvport.c 2.2 88/07/29 4.0 RPCSRC 1.8 88/02/08 */ #include +#include #include #include #include @@ -41,6 +44,7 @@ static char sccsid[] = "@(#)bindresvport.c 2.2 88/07/29 4.0 RPCSRC 1.8 88/02/08 /* * Bind a socket to a privileged IP port */ +int gssrpc_bindresvport(sd, sin) int sd; struct sockaddr_in *sin; diff --git a/src/lib/rpc/clnt.h b/src/lib/rpc/clnt.h index 1f82700d0..f308dd999 100644 --- a/src/lib/rpc/clnt.h +++ b/src/lib/rpc/clnt.h @@ -298,6 +298,8 @@ extern CLIENT *clnttcp_create(); extern CLIENT *clntudp_create(); extern CLIENT *clntudp_bufcreate(); +#define _rpc_dtablesize _gssrpc_rpc_dtablesize +extern int _rpc_dtablesize(void); /* * Print why creation failed */ @@ -339,8 +341,6 @@ extern struct rpc_createerr rpc_createerr; #define clnt_sperrno gssrpc_clnt_sperrno char *clnt_sperrno(/* enum clnt_stat num */); /* string */ - - #define UDPMSGSIZE 8800 /* rpc imposed limit on udp msg size */ #define RPCSMALLMSGSIZE 400 /* a more reasonable packet size */ diff --git a/src/lib/rpc/clnt_generic.c b/src/lib/rpc/clnt_generic.c index c59ac9429..b0eed3d32 100644 --- a/src/lib/rpc/clnt_generic.c +++ b/src/lib/rpc/clnt_generic.c @@ -33,6 +33,7 @@ static char sccsid[] = "@(#)clnt_generic.c 1.4 87/08/11 (C) 1987 SMI"; /* * Copyright (C) 1987, Sun Microsystems, Inc. */ +#include #include #include #include diff --git a/src/lib/rpc/clnt_perror.c b/src/lib/rpc/clnt_perror.c index 7d05cc476..50168dff4 100644 --- a/src/lib/rpc/clnt_perror.c +++ b/src/lib/rpc/clnt_perror.c @@ -282,6 +282,25 @@ clnt_spcreateerror(s) rpc_createerr.cf_error.re_errno); } break; + + case RPC_CANTSEND: + case RPC_CANTDECODERES: + case RPC_CANTENCODEARGS: + case RPC_SUCCESS: + case RPC_UNKNOWNPROTO: + case RPC_PROGNOTREGISTERED: + case RPC_FAILED: + case RPC_UNKNOWNHOST: + case RPC_CANTDECODEARGS: + case RPC_PROCUNAVAIL: + case RPC_PROGVERSMISMATCH: + case RPC_PROGUNAVAIL: + case RPC_AUTHERROR: + case RPC_VERSMISMATCH: + case RPC_TIMEDOUT: + case RPC_CANTRECV: + default: + break; } (void) strncat(str, "\n", BUFSIZ - 1 - strlen(str)); return (str); diff --git a/src/lib/rpc/clnt_simple.c b/src/lib/rpc/clnt_simple.c index 2f203d73f..f6faf26a1 100644 --- a/src/lib/rpc/clnt_simple.c +++ b/src/lib/rpc/clnt_simple.c @@ -39,6 +39,8 @@ static char sccsid[] = "@(#)clnt_simple.c 1.35 87/08/11 Copyr 1984 Sun Micro"; */ #include +/* for close() */ +#include #include #include #include @@ -51,6 +53,7 @@ static struct callrpc_private { char *oldhost; } *callrpc_private; +int gssrpc_callrpc(host, prognum, versnum, procnum, inproc, in, outproc, out) char *host; xdrproc_t inproc, outproc; diff --git a/src/lib/rpc/clnt_tcp.c b/src/lib/rpc/clnt_tcp.c index f87da78b1..6f81ea136 100644 --- a/src/lib/rpc/clnt_tcp.c +++ b/src/lib/rpc/clnt_tcp.c @@ -51,6 +51,7 @@ static char sccsid[] = "@(#)clnt_tcp.c 1.37 87/10/05 Copyr 1984 Sun Micro"; */ #include +#include #include #include #include diff --git a/src/lib/rpc/clnt_udp.c b/src/lib/rpc/clnt_udp.c index df3945a48..7a8b03c14 100644 --- a/src/lib/rpc/clnt_udp.c +++ b/src/lib/rpc/clnt_udp.c @@ -38,6 +38,7 @@ static char sccsid[] = "@(#)clnt_udp.c 1.39 87/08/11 Copyr 1984 Sun Micro"; */ #include +#include #include #include #include @@ -436,7 +437,6 @@ clntudp_control(cl, request, info) char *info; { register struct cu_data *cu = (struct cu_data *)cl->cl_private; - int len; switch (request) { case CLSET_TIMEOUT: diff --git a/src/lib/rpc/get_myaddress.c b/src/lib/rpc/get_myaddress.c index 13bafa009..9f79cda1b 100644 --- a/src/lib/rpc/get_myaddress.c +++ b/src/lib/rpc/get_myaddress.c @@ -48,6 +48,7 @@ static char sccsid[] = "@(#)get_myaddress.c 1.4 87/08/11 Copyr 1984 Sun Micro"; /* * don't use gethostbyname, which would invoke yellow pages */ +int gssrpc_get_myaddress(addr) struct sockaddr_in *addr; { diff --git a/src/lib/rpc/getrpcport.c b/src/lib/rpc/getrpcport.c index 4a80b9c2e..e553302ef 100644 --- a/src/lib/rpc/getrpcport.c +++ b/src/lib/rpc/getrpcport.c @@ -36,10 +36,13 @@ static char sccsid[] = "@(#)getrpcport.c 1.3 87/08/11 SMI"; */ #include +#include #include +#include #include #include +int gssrpc_getrpcport(host, prognum, versnum, proto) char *host; { diff --git a/src/lib/rpc/pmap_clnt.c b/src/lib/rpc/pmap_clnt.c index a82d8599f..e2d47ecad 100644 --- a/src/lib/rpc/pmap_clnt.c +++ b/src/lib/rpc/pmap_clnt.c @@ -38,6 +38,7 @@ static char sccsid[] = "@(#)pmap_clnt.c 1.37 87/08/11 Copyr 1984 Sun Micro"; * Copyright (C) 1984, Sun Microsystems, Inc. */ +#include #include #include #include diff --git a/src/lib/rpc/pmap_getmaps.c b/src/lib/rpc/pmap_getmaps.c index 9252aa137..187749338 100644 --- a/src/lib/rpc/pmap_getmaps.c +++ b/src/lib/rpc/pmap_getmaps.c @@ -45,6 +45,7 @@ static char sccsid[] = "@(#)pmap_getmaps.c 1.10 87/08/11 Copyr 1984 Sun Micro"; #include #include #include +#include #include #ifdef OSF1 #include diff --git a/src/lib/rpc/pmap_getport.c b/src/lib/rpc/pmap_getport.c index 2075280f2..6fbd14104 100644 --- a/src/lib/rpc/pmap_getport.c +++ b/src/lib/rpc/pmap_getport.c @@ -38,6 +38,7 @@ static char sccsid[] = "@(#)pmap_getport.c 1.9 87/08/11 Copyr 1984 Sun Micro"; * Copyright (C) 1984, Sun Microsystems, Inc. */ +#include #include #include #include diff --git a/src/lib/rpc/pmap_rmt.c b/src/lib/rpc/pmap_rmt.c index dc9735d84..faa1fc206 100644 --- a/src/lib/rpc/pmap_rmt.c +++ b/src/lib/rpc/pmap_rmt.c @@ -39,6 +39,7 @@ static char sccsid[] = "@(#)pmap_rmt.c 1.21 87/08/27 Copyr 1984 Sun Micro"; * Copyright (C) 1984, Sun Microsystems, Inc. */ +#include #include #include #include diff --git a/src/lib/rpc/rpc.h b/src/lib/rpc/rpc.h index 203e5ef09..bd12dcf01 100644 --- a/src/lib/rpc/rpc.h +++ b/src/lib/rpc/rpc.h @@ -80,4 +80,14 @@ #include /* structures and routines to parse /etc/rpc */ #endif +/* + * get the local host's IP address without consulting + * name service library functions + */ +#define get_myaddress gssrpc_get_myaddress +extern void get_myaddress (struct sockaddr_in *); + +#define bindresvport gssrpc_bindresvport +extern int bindresvport(int, struct sockaddr_in *); + #endif /* ndef __RPC_HEADER__ */ diff --git a/src/lib/rpc/rpc_callmsg.c b/src/lib/rpc/rpc_callmsg.c index 83ce05712..a1de54464 100644 --- a/src/lib/rpc/rpc_callmsg.c +++ b/src/lib/rpc/rpc_callmsg.c @@ -39,7 +39,7 @@ static char sccsid[] = "@(#)rpc_callmsg.c 1.4 87/08/11 Copyr 1984 Sun Micro"; */ #include - +#include #include /* diff --git a/src/lib/rpc/rpc_dtablesize.c b/src/lib/rpc/rpc_dtablesize.c index d7b07c867..c26f87b96 100644 --- a/src/lib/rpc/rpc_dtablesize.c +++ b/src/lib/rpc/rpc_dtablesize.c @@ -37,6 +37,7 @@ static char sccsid[] = "@(#)rpc_dtablesize.c 1.2 87/08/11 Copyr 1987 Sun Micro"; * Cache the result of getdtablesize(), so we don't have to do an * expensive system call every time. */ +int _gssrpc_rpc_dtablesize() { static int size; diff --git a/src/lib/rpc/rpc_prot.c b/src/lib/rpc/rpc_prot.c index 853dca79d..92391118a 100644 --- a/src/lib/rpc/rpc_prot.c +++ b/src/lib/rpc/rpc_prot.c @@ -102,6 +102,12 @@ gssrpc_xdr_accepted_reply(xdrs, ar) if (! xdr_u_int32(xdrs, &(ar->ar_vers.low))) return (FALSE); return (xdr_u_int32(xdrs, &(ar->ar_vers.high))); + + case GARBAGE_ARGS: + case SYSTEM_ERR: + case PROC_UNAVAIL: + case PROG_UNAVAIL: + break; } return (TRUE); /* TRUE => open ended set of problems */ } @@ -225,7 +231,7 @@ rejected(rjct_stat, error) switch (rjct_stat) { - case RPC_VERSMISMATCH: + case RPC_MISMATCH: error->re_status = RPC_VERSMISMATCH; return; @@ -283,5 +289,23 @@ sunrpc_seterr_reply(msg, error) error->re_vers.low = msg->acpted_rply.ar_vers.low; error->re_vers.high = msg->acpted_rply.ar_vers.high; break; + + case RPC_FAILED: + case RPC_SUCCESS: + case RPC_PROGNOTREGISTERED: + case RPC_PMAPFAILURE: + case RPC_UNKNOWNPROTO: + case RPC_UNKNOWNHOST: + case RPC_SYSTEMERROR: + case RPC_CANTDECODEARGS: + case RPC_PROCUNAVAIL: + case RPC_PROGUNAVAIL: + case RPC_TIMEDOUT: + case RPC_CANTRECV: + case RPC_CANTSEND: + case RPC_CANTDECODERES: + case RPC_CANTENCODEARGS: + default: + break; } } diff --git a/src/lib/rpc/svc_auth.c b/src/lib/rpc/svc_auth.c index e0e3dc50e..b5b3eb571 100644 --- a/src/lib/rpc/svc_auth.c +++ b/src/lib/rpc/svc_auth.c @@ -65,11 +65,11 @@ static struct svcauthsw_type { unsigned int flavor; enum auth_stat (*authenticator)(); } svcauthsw[] = { - AUTH_GSSAPI, _svcauth_gssapi, /* AUTH_GSSAPI */ - AUTH_NONE, _svcauth_null, /* AUTH_NULL */ - AUTH_GSSAPI_COMPAT, _svcauth_gssapi, /* AUTH_GSSAPI_COMPAT */ - AUTH_UNIX, _svcauth_unix, /* AUTH_UNIX */ - AUTH_SHORT, _svcauth_short, /* AUTH_SHORT */ + {AUTH_GSSAPI, _svcauth_gssapi}, /* AUTH_GSSAPI */ + {AUTH_NONE, _svcauth_null}, /* AUTH_NULL */ + {AUTH_GSSAPI_COMPAT, _svcauth_gssapi}, /* AUTH_GSSAPI_COMPAT */ + {AUTH_UNIX, _svcauth_unix}, /* AUTH_UNIX */ + {AUTH_SHORT, _svcauth_short}, /* AUTH_SHORT */ }; static int svcauthnum = sizeof(svcauthsw) / sizeof(struct svcauthsw_type); diff --git a/src/lib/rpc/svc_auth_unix.c b/src/lib/rpc/svc_auth_unix.c index 781b350fd..48632b224 100644 --- a/src/lib/rpc/svc_auth_unix.c +++ b/src/lib/rpc/svc_auth_unix.c @@ -43,6 +43,7 @@ static char sccsid[] = "@(#)svc_auth_unix.c 1.28 88/02/08 Copyr 1984 Sun Micro"; */ #include +#include #include /* diff --git a/src/lib/rpc/svc_simple.c b/src/lib/rpc/svc_simple.c index 780eafff5..9a58cf626 100644 --- a/src/lib/rpc/svc_simple.c +++ b/src/lib/rpc/svc_simple.c @@ -40,6 +40,7 @@ static char sccsid[] = "@(#)svc_simple.c 1.18 87/08/11 Copyr 1984 Sun Micro"; #include #include +#include #include #include @@ -54,6 +55,7 @@ static void universal(); static SVCXPRT *transp; static struct proglst *pl; +int gssrpc_registerrpc(prognum, versnum, procnum, progname, inproc, outproc) char *(*progname)(); xdrproc_t inproc, outproc; diff --git a/src/lib/rpc/svc_tcp.c b/src/lib/rpc/svc_tcp.c index cece276cd..6fe3b3005 100644 --- a/src/lib/rpc/svc_tcp.c +++ b/src/lib/rpc/svc_tcp.c @@ -42,12 +42,14 @@ static char sccsid[] = "@(#)svc_tcp.c 1.21 87/08/11 Copyr 1984 Sun Micro"; */ #include +#include #include #include #include #include -/*extern bool_t abort();*. +/*extern bool_t abort(); extern errno; +*/ /* * Ops vector for TCP/IP based rpc service handle diff --git a/src/lib/rpc/svc_udp.c b/src/lib/rpc/svc_udp.c index c17b4acbb..7dca8a083 100644 --- a/src/lib/rpc/svc_udp.c +++ b/src/lib/rpc/svc_udp.c @@ -40,6 +40,7 @@ static char sccsid[] = "@(#)svc_udp.c 1.24 87/08/11 Copyr 1984 Sun Micro"; */ #include +#include #include #include #include @@ -378,6 +379,7 @@ struct udp_cache { * Enable use of the cache. * Note: there is no disable. */ +int gssrpc_svcudp_enablecache(transp, size) SVCXPRT *transp; rpc_u_int32 size; diff --git a/src/lib/rpc/xdr.c b/src/lib/rpc/xdr.c index 29085da52..755c0dc41 100644 --- a/src/lib/rpc/xdr.c +++ b/src/lib/rpc/xdr.c @@ -119,6 +119,8 @@ xdr_int(xdrs, ip) } else { return (xdr_short(xdrs, (short *)ip)); } + /*NOTREACHED*/ + return(FALSE); #endif } @@ -383,7 +385,7 @@ xdr_opaque(xdrs, cp, cnt) register unsigned int cnt; { register unsigned int rndup; - static crud[BYTES_PER_XDR_UNIT]; + static int crud[BYTES_PER_XDR_UNIT]; /* * if no data we are done @@ -515,6 +517,7 @@ xdr_int32(xdrs, ip) } } +bool_t xdr_u_int32(xdrs, up) XDR *xdrs; rpc_u_int32 *up; @@ -619,6 +622,8 @@ xdr_string(xdrs, cpp, maxsize) case XDR_ENCODE: size = strlen(sp); break; + case XDR_DECODE: + break; } if (! xdr_u_int(xdrs, &size)) { return (FALSE); diff --git a/src/lib/rpc/xdr_array.c b/src/lib/rpc/xdr_array.c index 7c4c70e36..a1841abe7 100644 --- a/src/lib/rpc/xdr_array.c +++ b/src/lib/rpc/xdr_array.c @@ -100,6 +100,9 @@ xdr_array(xdrs, addrp, sizep, maxsize, elsize, elproc) case XDR_FREE: return (TRUE); + + case XDR_ENCODE: + break; } /* diff --git a/src/lib/rpc/xdr_mem.c b/src/lib/rpc/xdr_mem.c index d32b39136..c09b21245 100644 --- a/src/lib/rpc/xdr_mem.c +++ b/src/lib/rpc/xdr_mem.c @@ -47,6 +47,7 @@ static char sccsid[] = "@(#)xdr_mem.c 1.19 87/08/11 Copyr 1984 Sun Micro"; #include #include #include +#include static bool_t xdrmem_getlong(); static bool_t xdrmem_putlong(); diff --git a/src/lib/rpc/xdr_rec.c b/src/lib/rpc/xdr_rec.c index 01605be06..fd140f1ba 100644 --- a/src/lib/rpc/xdr_rec.c +++ b/src/lib/rpc/xdr_rec.c @@ -54,6 +54,7 @@ static char sccsid[] = "@(#)xdr_rec.c 1.21 87/08/11 Copyr 1984 Sun Micro"; #include #include +#include static unsigned int fix_buf_size(); static bool_t flush_out(); @@ -360,6 +361,9 @@ xdrrec_setpos(xdrs, pos) return (TRUE); } break; + + case XDR_FREE: + break; } return (FALSE); } @@ -389,6 +393,9 @@ xdrrec_inline(xdrs, len) rstrm->in_finger += len; } break; + + case XDR_FREE: + break; } return (buf); } diff --git a/src/lib/rpc/xdr_reference.c b/src/lib/rpc/xdr_reference.c index 7d891a816..501f62121 100644 --- a/src/lib/rpc/xdr_reference.c +++ b/src/lib/rpc/xdr_reference.c @@ -79,6 +79,9 @@ xdr_reference(xdrs, pp, size, proc) } memset(loc, 0, (int)size); break; + + case XDR_ENCODE: + break; } stat = (*proc)(xdrs, loc, LASTUNSIGNED); -- 2.26.2