From 9e6ae87a8a9ba1485715f6ec71560d2b8277158f Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Fri, 27 Jul 2001 01:53:05 +0000 Subject: [PATCH] * xdr_reference.c (xdr_reference): Remove cast in argument to memset * svc_auth_gssapi.c: In call to gss_accept_sec_context, pass OM_uint32 * instead of int *; * pmap_clnt.h, pmap_getport.c (pmap_getport): Prototype changed for protocol from unsigned int to rpc_u_int32 to match struct pmap. * getrpcport.c (gssrpc_getrpcport): Update to reflect proper calling conventions. * rpc.h (callrpc): Change prototype from expecting ints for prognum, versnum and procnum to rpc_u_int32 for consistancy. (getrpcport): Update arguments in similar fashion. * clnt_simple.c (gssrpc_callrpc): Update to reflect prototype change. * auth_gssapi_misc.c (auth_gssapi_display_status_1): Local variable msg_ctx should be OM_uint32 instead of int as argument to gss_display_status. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13645 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/rpc/ChangeLog | 24 ++++++++++++++++++++++++ src/lib/rpc/auth_gssapi_misc.c | 2 +- src/lib/rpc/clnt_simple.c | 1 + src/lib/rpc/getrpcport.c | 1 + src/lib/rpc/pmap_clnt.h | 2 +- src/lib/rpc/pmap_getport.c | 2 +- src/lib/rpc/rpc.h | 6 +++--- src/lib/rpc/svc_auth_gssapi.c | 3 ++- src/lib/rpc/unit-test/ChangeLog | 7 +++++++ src/lib/rpc/unit-test/client.c | 3 ++- src/lib/rpc/unit-test/server.c | 3 +-- src/lib/rpc/xdr_reference.c | 2 +- 12 files changed, 45 insertions(+), 11 deletions(-) diff --git a/src/lib/rpc/ChangeLog b/src/lib/rpc/ChangeLog index 7f5f83f8a..b17eeff87 100644 --- a/src/lib/rpc/ChangeLog +++ b/src/lib/rpc/ChangeLog @@ -1,3 +1,27 @@ +2001-07-26 Ezra Peisach + + * xdr_reference.c (xdr_reference): Remove cast in argument to memset. + + * svc_auth_gssapi.c: In call to gss_accept_sec_context, pass + OM_uint32 * instead of int *; + + * pmap_clnt.h, pmap_getport.c (pmap_getport): Prototype changed + for protocol from unsigned int to rpc_u_int32 to match struct + pmap. + + * getrpcport.c (gssrpc_getrpcport): Update to reflect proper + calling conventions. + + * rpc.h (callrpc): Change prototype from expecting ints for + prognum, versnum and procnum to rpc_u_int32 for consistancy. + (getrpcport): Update arguments in similar fashion. + + * clnt_simple.c (gssrpc_callrpc): Update to reflect prototype change. + + * auth_gssapi_misc.c (auth_gssapi_display_status_1): Local + variable msg_ctx should be OM_uint32 instead of int as argument to + gss_display_status. + 2001-07-25 Ezra Peisach * auth_gssapi.c (auth_gssapi_create): Change calling convention diff --git a/src/lib/rpc/auth_gssapi_misc.c b/src/lib/rpc/auth_gssapi_misc.c index 810bd7829..f1110132a 100644 --- a/src/lib/rpc/auth_gssapi_misc.c +++ b/src/lib/rpc/auth_gssapi_misc.c @@ -150,7 +150,7 @@ static void auth_gssapi_display_status_1(m, code, type, rec) { OM_uint32 gssstat, minor_stat; gss_buffer_desc msg; - int msg_ctx; + OM_uint32 msg_ctx; msg_ctx = 0; while (1) { diff --git a/src/lib/rpc/clnt_simple.c b/src/lib/rpc/clnt_simple.c index f6faf26a1..d3fe2d0e4 100644 --- a/src/lib/rpc/clnt_simple.c +++ b/src/lib/rpc/clnt_simple.c @@ -57,6 +57,7 @@ int gssrpc_callrpc(host, prognum, versnum, procnum, inproc, in, outproc, out) char *host; xdrproc_t inproc, outproc; + rpc_u_int32 prognum, versnum, procnum; char *in, *out; { register struct callrpc_private *crp = callrpc_private; diff --git a/src/lib/rpc/getrpcport.c b/src/lib/rpc/getrpcport.c index e553302ef..8c07bc7cc 100644 --- a/src/lib/rpc/getrpcport.c +++ b/src/lib/rpc/getrpcport.c @@ -45,6 +45,7 @@ static char sccsid[] = "@(#)getrpcport.c 1.3 87/08/11 SMI"; int gssrpc_getrpcport(host, prognum, versnum, proto) char *host; + rpc_u_int32 prognum, versnum, proto; { struct sockaddr_in addr; struct hostent *hp; diff --git a/src/lib/rpc/pmap_clnt.h b/src/lib/rpc/pmap_clnt.h index d4623c499..6cc4b68e9 100644 --- a/src/lib/rpc/pmap_clnt.h +++ b/src/lib/rpc/pmap_clnt.h @@ -80,4 +80,4 @@ enum clnt_stat clnt_broadcast(rpc_u_int32, rpc_u_int32, rpc_u_int32, caddr_t, resultproc_t); extern unsigned short pmap_getport(struct sockaddr_in *, rpc_u_int32, - rpc_u_int32, unsigned int); + rpc_u_int32, rpc_u_int32); diff --git a/src/lib/rpc/pmap_getport.c b/src/lib/rpc/pmap_getport.c index 7712f1195..0757a67cc 100644 --- a/src/lib/rpc/pmap_getport.c +++ b/src/lib/rpc/pmap_getport.c @@ -62,7 +62,7 @@ pmap_getport(address, program, version, protocol) struct sockaddr_in *address; rpc_u_int32 program; rpc_u_int32 version; - unsigned int protocol; + rpc_u_int32 protocol; { unsigned short port = 0; int sock = -1; diff --git a/src/lib/rpc/rpc.h b/src/lib/rpc/rpc.h index 917001537..484cd9d5c 100644 --- a/src/lib/rpc/rpc.h +++ b/src/lib/rpc/rpc.h @@ -91,10 +91,10 @@ extern int get_myaddress (struct sockaddr_in *); extern int bindresvport(int, struct sockaddr_in *); #define callrpc gssrpc_callrpc -extern int callrpc (char *, int, int, int, xdrproc_t, char *, - xdrproc_t , char *); +extern int callrpc (char *, rpc_u_int32, rpc_u_int32, rpc_u_int32, xdrproc_t, + char *, xdrproc_t , char *); #define getrpcport gssrpc_getrpcport -extern int getrpcport (char *, int, int, int); +extern int getrpcport (char *, rpc_u_int32, rpc_u_int32, rpc_u_int32); #endif /* ndef __RPC_HEADER__ */ diff --git a/src/lib/rpc/svc_auth_gssapi.c b/src/lib/rpc/svc_auth_gssapi.c index 633ba5bc6..af52e8e9b 100644 --- a/src/lib/rpc/svc_auth_gssapi.c +++ b/src/lib/rpc/svc_auth_gssapi.c @@ -132,7 +132,8 @@ enum auth_stat _gssrpc_svcauth_gssapi(rqst, msg, no_dispatch) OM_uint32 gssstat, minor_stat, time_rec; struct opaque_auth *cred, *verf; svc_auth_gssapi_data *client_data; - int ret_flags, ret, i; + int ret, i; + OM_uint32 ret_flags; rpc_u_int32 seq_num; PRINTF(("svcauth_gssapi: starting\n")); diff --git a/src/lib/rpc/unit-test/ChangeLog b/src/lib/rpc/unit-test/ChangeLog index 654060a55..9b25f22f0 100644 --- a/src/lib/rpc/unit-test/ChangeLog +++ b/src/lib/rpc/unit-test/ChangeLog @@ -1,3 +1,10 @@ +2001-07-26 Ezra Peisach + + * client.c: Change local variable count from int to unsigned int. + + * server.c (log_badauth_display_status_1): Argument to + gss_display_status should be OM_uint32 * instead of int *. + 2001-07-09 Ezra Peisach * rpc_test_clnt.c, rpc_test_svc.c: Include string.h for memset diff --git a/src/lib/rpc/unit-test/client.c b/src/lib/rpc/unit-test/client.c index ad1c60773..502001a54 100644 --- a/src/lib/rpc/unit-test/client.c +++ b/src/lib/rpc/unit-test/client.c @@ -56,7 +56,8 @@ main(argc, argv) CLIENT *clnt; AUTH *tmp_auth; struct rpc_err e; - int i, count, auth_once; + int i, auth_once; + unsigned int count; extern int optind; extern char *optarg; extern int svc_debug_gssapi, misc_debug_gssapi, auth_debug_gssapi; diff --git a/src/lib/rpc/unit-test/server.c b/src/lib/rpc/unit-test/server.c index 33ea3a08b..d4d06287c 100644 --- a/src/lib/rpc/unit-test/server.c +++ b/src/lib/rpc/unit-test/server.c @@ -231,9 +231,8 @@ void log_badauth_display_status(OM_uint32 major, OM_uint32 minor) void log_badauth_display_status_1(OM_uint32 code, int type, int rec) { - OM_uint32 gssstat, minor_stat; + OM_uint32 gssstat, minor_stat, msg_ctx; gss_buffer_desc msg; - int msg_ctx; msg_ctx = 0; while (1) { diff --git a/src/lib/rpc/xdr_reference.c b/src/lib/rpc/xdr_reference.c index 7c7f0c24e..56cc4425d 100644 --- a/src/lib/rpc/xdr_reference.c +++ b/src/lib/rpc/xdr_reference.c @@ -78,7 +78,7 @@ xdr_reference(xdrs, pp, size, proc) "xdr_reference: out of memory\n"); return (FALSE); } - memset(loc, 0, (int)size); + memset(loc, 0, size); break; case XDR_ENCODE: -- 2.26.2