From 052836e76ac8a9aa1ccd7012af20f85dc9262445 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Sun, 18 Feb 2001 22:56:00 +0000 Subject: [PATCH] * xdr.h: Flush out prototypes for xdrmem_create(), xdrstdio_create(), xdrrec_create(), xdralloc_create(), xdralloc_release(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdrrec_eof(), xdralloc_getdata(). Add prototype for gssrpc_xdr_fre(). * xdr.c: Argument to gssrpc_xdr_free(0 changed from char * to void *. xdr_u_char() changed to take unsigned char * instead of char *. * auth_unix.c: Include unistd.h and string.h for prototypes. Declare marshal_new_auth() as static void instead of static bool_t based on usage. * auth.h, svc_auth.h: Provide full prototypes for a number of functions. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13010 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/rpc/ChangeLog | 18 ++++++++++++++++ src/lib/rpc/auth.h | 7 +++--- src/lib/rpc/auth_unix.c | 6 ++++-- src/lib/rpc/svc_auth.h | 5 ++++- src/lib/rpc/xdr.c | 4 ++-- src/lib/rpc/xdr.h | 47 ++++++++++++++++++++++++++++++++--------- 6 files changed, 69 insertions(+), 18 deletions(-) diff --git a/src/lib/rpc/ChangeLog b/src/lib/rpc/ChangeLog index 1f0a2779d..02f3b1aae 100644 --- a/src/lib/rpc/ChangeLog +++ b/src/lib/rpc/ChangeLog @@ -1,3 +1,21 @@ +Sun Feb 18 17:48:35 2001 Ezra Peisach + + * xdr.h: Flush out prototypes for xdrmem_create(), + xdrstdio_create(), xdrrec_create(), xdralloc_create(), + xdralloc_release(), xdrrec_endofrecord(), xdrrec_skiprecord(), + xdrrec_eof(), xdralloc_getdata(). Add prototype for + gssrpc_xdr_fre(). + + * xdr.c: Argument to gssrpc_xdr_free(0 changed from char * to void + *. xdr_u_char() changed to take unsigned char * instead of char *. + + * auth_unix.c: Include unistd.h and string.h for + prototypes. Declare marshal_new_auth() as static void instead of + static bool_t based on usage. + + * auth.h, svc_auth.h: Provide full prototypes for a number of + functions. + 2000-06-21 Tom Yu * svc_auth_gssapi.c (_svcauth_gssapi): Missed a rename. From diff --git a/src/lib/rpc/auth.h b/src/lib/rpc/auth.h index a27bdbae4..5a0ad0da9 100644 --- a/src/lib/rpc/auth.h +++ b/src/lib/rpc/auth.h @@ -184,9 +184,10 @@ int authany_wrap(), authany_unwrap(); #define authnone_create gssrpc_authnone_create #define authdes_create gssrpc_authdes_create -extern AUTH *authunix_create(); -extern AUTH *authunix_create_default(); /* takes no parameters */ -extern AUTH *authnone_create(); /* takes no parameters */ +extern AUTH *authunix_create(char *machname, int uid, int gid, int len, + int *aup_gids); +extern AUTH *authunix_create_default(void); /* takes no parameters */ +extern AUTH *authnone_create(void); /* takes no parameters */ extern AUTH *authdes_create(); /* diff --git a/src/lib/rpc/auth_unix.c b/src/lib/rpc/auth_unix.c index 4e96b82c6..789b3695b 100644 --- a/src/lib/rpc/auth_unix.c +++ b/src/lib/rpc/auth_unix.c @@ -44,6 +44,8 @@ static char sccsid[] = "@(#)auth_unix.c 1.19 87/08/11 Copyr 1984 Sun Micro"; */ #include +#include +#include #include #include @@ -82,7 +84,7 @@ struct audata { }; #define AUTH_PRIVATE(auth) ((struct audata *)auth->ah_private) -static bool_t marshal_new_auth(); +static void marshal_new_auth(); /* @@ -303,7 +305,7 @@ authunix_destroy(auth) * Marshals (pre-serializes) an auth struct. * sets private data, au_marshed and au_mpos */ -static bool_t +static void marshal_new_auth(auth) register AUTH *auth; { diff --git a/src/lib/rpc/svc_auth.h b/src/lib/rpc/svc_auth.h index 6a97e5b76..18c70d838 100644 --- a/src/lib/rpc/svc_auth.h +++ b/src/lib/rpc/svc_auth.h @@ -48,11 +48,14 @@ typedef struct { extern SVCAUTH svc_auth_any; +#include + /* * Server side authenticator */ #define _authenticate _gssrpc_authenticate -extern enum auth_stat _authenticate(); +extern enum auth_stat _authenticate(struct svc_req *rqst, struct rpc_msg *msg, + bool_t *no_dispatch); #define SVCAUTH_WRAP(auth, xdrs, xfunc, xwhere) \ ((*((auth)->svc_ah_ops->svc_ah_wrap))(auth, xdrs, xfunc, xwhere)) diff --git a/src/lib/rpc/xdr.c b/src/lib/rpc/xdr.c index df277fe3a..29085da52 100644 --- a/src/lib/rpc/xdr.c +++ b/src/lib/rpc/xdr.c @@ -66,7 +66,7 @@ static char xdr_zero[BYTES_PER_XDR_UNIT] = { 0, 0, 0, 0 }; void gssrpc_xdr_free(proc, objp) xdrproc_t proc; - char *objp; + void *objp; { XDR x; @@ -303,7 +303,7 @@ xdr_char(xdrs, cp) bool_t xdr_u_char(xdrs, cp) XDR *xdrs; - char *cp; + unsigned char *cp; { unsigned int u; diff --git a/src/lib/rpc/xdr.h b/src/lib/rpc/xdr.h index 7c2ae2f68..d6742dda4 100644 --- a/src/lib/rpc/xdr.h +++ b/src/lib/rpc/xdr.h @@ -38,6 +38,9 @@ #ifndef __XDR_HEADER__ #define __XDR_HEADER__ +/* We need FILE. */ +#include + /* * Make sure we have a definition for PROTOTYPE. */ @@ -285,7 +288,7 @@ PROTOTYPE((XDR *, enum_t *, char *, struct xdr_discrim *, xdrproc_t)); extern bool_t xdr_char PROTOTYPE((XDR *, char *)); extern bool_t xdr_u_char -PROTOTYPE((XDR *, char *)); +PROTOTYPE((XDR *, unsigned char *)); extern bool_t xdr_vector PROTOTYPE((XDR *, char *, unsigned int, unsigned int, xdrproc_t)); extern bool_t xdr_float @@ -335,14 +338,38 @@ PROTOTYPE((XDR *, rpc_u_int32 *)); #define xdrrec_eof gssrpc_xdrrec_eof #define xdralloc_getdata gssrpc_xdralloc_getdata -extern void xdrmem_create(); /* XDR using memory buffers */ -extern void xdrstdio_create(); /* XDR using stdio library */ -extern void xdrrec_create(); /* XDR pseudo records for tcp */ -extern void xdralloc_create(); /* XDR allocating memory buffer */ -extern void xdralloc_release(); /* destroy xdralloc, save buf */ -extern bool_t xdrrec_endofrecord(); /* make end of xdr record */ -extern bool_t xdrrec_skiprecord(); /* move to beginning of next record */ -extern bool_t xdrrec_eof(); /* true if no more input */ -extern caddr_t xdralloc_getdata(); /* get buffer from xdralloc */ +/* XDR allocating memory buffer */ +extern void xdralloc_create PROTOTYPE((XDR *xdrs, enum xdr_op op)); + +/* destroy xdralloc, save buf */ +extern void xdralloc_release PROTOTYPE((XDR *xdrs)); + +/* get buffer from xdralloc */ +extern caddr_t xdralloc_getdata PROTOTYPE((XDR *xdrs)); + +/* XDR using memory buffers */ +extern void xdrmem_create PROTOTYPE((XDR *xdrs, caddr_t addr, + unsigned int size, enum xdr_op xop)); + +/* XDR using stdio library */ +extern void xdrstdio_create PROTOTYPE((XDR *xdrs, FILE *file, + enum xdr_op op)); + +/* XDR pseudo records for tcp */ +extern void xdrrec_create PROTOTYPE((XDR *xdrs, unsigned int sendsize, + unsigned int recvsize, caddr_t tcp_handle, + int (*readit) (caddr_t, caddr_t, int), + int (*writeit) (caddr_t, caddr_t, int))); + +/* make end of xdr record */ +extern bool_t xdrrec_endofrecord PROTOTYPE((XDR *xdrs, bool_t sendnow)); + +/* move to beginning of next record */ +extern bool_t xdrrec_skiprecord PROTOTYPE((XDR *xdrs)); + +/* true if no more input */ +extern bool_t xdrrec_eof PROTOTYPE((XDR *xdrs)); +/* free memory buffers for xdr */ +extern void gssrpc_xdr_free PROTOTYPE((xdrproc_t proc, void *__objp)); #endif /* !__XDR_HEADER__ */ -- 2.26.2