+Fri Feb 13 20:57:49 1998 Tom Yu <tlyu@mit.edu>
+
+ * auth.h: Renames.
+ * auth_any.c: Update header locations.
+ * auth_gssapi.c: Punt naughty RCS keywords. Update header
+ locations. Remove explicit extern decl of rpc_createrr (clnt.h
+ gets it). Renames.
+ * auth_gssapi.h: Punt naughty RCS keywords.
+ * auth_gssapi_misc.c: Punt naught RCS keywords. Update header
+ locations.
+ * auth_none.c: Update header locations. Renames.
+ * auth_unix.c: Update header locations. Renames.
+ * auth_unix.h: Renames.
+ * authunix_prot.c: Update header locations.
+ * bindresvport.c: Renames.
+ * clnt.h: Renames.
+ * clnt_generic.c: Update header locations.
+ * clnt_perror.c: Update header locations.
+ * clnt_raw.c: Update header locations. Renames.
+ * clnt_simple.c: Update header locations. Renames.
+ * clnt_tcp.c: Update header locations. Renames.
+ * clnt_udp.c: Upate header loations. Renames.
+ * get_myaddress.c: Update header locations. Renames.
+ * getrpcent.c: Update header locations.
+ * getrpcport.c: Update header locations. Renames.
+ * netdb.h: Update header locations.
+ * pmap_clnt.c: Update header locations. Renames.
+ * pmap_clnt.h: Renames.
+ * pmap_getmaps.c: Update header locations.
+ * pmap_getport.c: Update header locations.
+ * pmap_prot.c: Update header locations.
+ * pmap_prot.h: Renames.
+ * pmap_prot2.c: Update header locations.
+ * pmap_rmt.c: Update header locations. Renames.
+ * pmap_rmt.h: Renames.
+ * rpc.h: Update header locations. No longer include rpc/netdb.h.
+ * rpc_callmsg.c: Update header locations. Renames.
+ * rpc_commondata.c: Update header locations.
+ * rpc_dtablesize.c: Renames.
+ * rpc_msg.h: Renames.
+ * rpc_prot.c: Update header locations. Renames.
+ * svc.c: Update header locations. Renames.
+ * svc.h: Renames.
+ * svc_auth.c: Update header locations. Renames.
+ * svc_auth.h: Renames.
+ * svc_auth_any.c: Update header locations.
+ * svc_auth_gssapi.c: Punt naughty RCS keywords. Update header
+ locations. Renames.
+ * svc_auth_unix.c: Renames.
+ * svc_raw.c: Update header locations.
+ * svc_run.c: Update header locations. Renames.
+ * svc_simple.c: Update header locations. Renames. Make pl
+ static.
+ * svc_tcp.c: Update header locations. Renames.
+ * svc_udp.c: Update header locations. Renames.
+ * xdr.c: Update header locations. Renames.
+ * xdr.h: Renames.
+ * xdr_alloc.c: Punt naughty RCS keywords. Update header
+ locations.
+ * xdr_array.c: Update header locations.
+ * xdr_float.c: Update header locations.
+ * xdr_mem.c: Update header locations.
+ * xdr_rec.c: Update header locations.
+ * xdr_reference.c: Update header locations.
+ * xdr_stdio.c: Update header locations.
+
+ * Makefile.in: Bump major version due to changes. Don't build
+ getrpcent.o, since we don't use it, and dealing with the
+ rpc/netdb.h lossage was a major pain. Also, rename HDRDIR to
+ $(BUILDTOP)/gssrpc in order to avoid problems with system headers
+ including rpc/*.h.
+
Thu Feb 12 16:18:22 1998 Tom Yu <tlyu@mit.edu>
* configure.in: Add commented out AC_OUTPUT to force autoreconf to
##DOSLIBNAME=libgssrpc.lib
LIB=gssrpc
-LIBMAJOR=1
+LIBMAJOR=2
LIBMINOR=0
STOBJLISTS=OBJS.ST
SHLIB_EXPDEPS= \
$(srcdir)/clnt_udp.c \
$(srcdir)/rpc_dtablesize.c \
$(srcdir)/get_myaddress.c \
- $(srcdir)/getrpcent.c \
$(srcdir)/getrpcport.c \
$(srcdir)/pmap_clnt.c \
$(srcdir)/pmap_getmaps.c \
clnt_udp.$(OBJEXT) \
rpc_dtablesize.$(OBJEXT) \
get_myaddress.$(OBJEXT) \
- getrpcent.$(OBJEXT) \
getrpcport.$(OBJEXT) \
pmap_clnt.$(OBJEXT) \
pmap_getmaps.$(OBJEXT) \
clnt_udp.o \
rpc_dtablesize.o \
get_myaddress.o \
- getrpcent.o \
getrpcport.o \
pmap_clnt.o \
pmap_getmaps.o \
xdr_stdio.o \
xdr_alloc.o
-HDRDIR=$(BUILDTOP)/include/rpc
+HDRDIR=$(BUILDTOP)/include/gssrpc
HDRS= $(HDRDIR)/auth.h \
$(HDRDIR)/auth_gssapi.h \
char c[8];
};
typedef union des_block des_block;
+#define xdr_des_block gssrpc_xdr_des_block
extern bool_t xdr_des_block();
/*
((*((auth)->ah_ops->ah_destroy))(auth))
+#define _null_auth _gssrpc_null_auth
extern struct opaque_auth _null_auth;
* Any style authentication. These routines can be used by any
* authentication style that does not use the wrap/unwrap functions.
*/
+
+#define authany_wrap gssrpc_authany_wrap
+#define authany_unwrap gssrpc_authany_unwrap
+
int authany_wrap(), authany_unwrap();
/*
* int len;
* int *aup_gids;
*/
+#define authunix_create gssrpc_authunix_create
+#define authunix_create_default gssrpc_authunix_create_default
+#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 */
*/
#include <stdio.h>
-#include <rpc/types.h>
-#include <rpc/xdr.h>
-#include <rpc/auth.h>
+#include <gssrpc/types.h>
+#include <gssrpc/xdr.h>
+#include <gssrpc/auth.h>
int authany_wrap(auth, xdrs, xfunc, xwhere)
AUTH *auth;
/*
* Copyright 1993 OpenVision Technologies, Inc., All Rights Reserved.
*
- * $Header$
- *
*/
-#if !defined(lint) && !defined(__CODECENTER__)
-static char *rcsid = "$Header$";
-#endif
-
#include <stdio.h>
#include <string.h>
#include <sys/errno.h>
#include <gssapi/gssapi_krb5.h>
#endif
-#include <rpc/rpc.h>
-#include <rpc/auth_gssapi.h>
+#include <gssrpc/rpc.h>
+#include <gssrpc/auth_gssapi.h>
#ifdef __CODECENTER__
#define DEBUG_GSSAPI 1
};
#define AUTH_PRIVATE(auth) ((struct auth_gssapi_data *)auth->ah_private)
-extern struct rpc_createerr rpc_createerr;
-
/*
* Function: auth_gssapi_create_default
*
AUTH_PRIVATE(auth)->seq_num));
/* we no longer need these results.. */
- xdr_free(xdr_authgssapi_init_res, &call_res);
+ gssrpc_xdr_free(xdr_authgssapi_init_res, &call_res);
}
} else if (call_res.signed_isn.length != 0) {
PRINTF(("gssapi_create: got signed isn, can't check yet\n"));
auth->ah_verf.oa_base = out_buf.value;
auth->ah_verf.oa_length = out_buf.length;
- if (! xdr_opaque_auth(xdrs, &auth->ah_cred) ||
- ! xdr_opaque_auth(xdrs, &auth->ah_verf)) {
+ if (! gssrpc_xdr_opaque_auth(xdrs, &auth->ah_cred) ||
+ ! gssrpc_xdr_opaque_auth(xdrs, &auth->ah_verf)) {
(void) gss_release_buffer(&minor_stat, &out_buf);
return FALSE;
}
auth->ah_verf.oa_base = NULL;
auth->ah_verf.oa_length = 0;
- if (! xdr_opaque_auth(xdrs, &auth->ah_cred) ||
- ! xdr_opaque_auth(xdrs, &auth->ah_verf)) {
+ if (! gssrpc_xdr_opaque_auth(xdrs, &auth->ah_cred) ||
+ ! gssrpc_xdr_opaque_auth(xdrs, &auth->ah_verf)) {
return FALSE;
}
}
* Copyright 1993 OpenVision Technologies, Inc., All Rights Reserved.
*
* $Id$
- * $Source$
- *
- * $Log$
- * Revision 1.19 1996/08/14 00:01:34 tlyu
- * * getrpcent.c: Add PROTOTYPE and conditionalize function
- * prototypes.
- *
- * * xdr.h: Add PROTOTYPE and conditionalize function prototypes.
- *
- * * svc_auth_gssapi.c: Remove ANSI string concatenation, de-ANSI-fy
- * function definitions.
- *
- * * auth_gssapi_misc.c (auth_gssapi_display_status_1): Remove ANSI
- * string concatenation, de-ANSI-fy function definitions.
- *
- * * auth_gssapi.h: Add PROTOTYPE and conditionalize function
- * prototypes.
- *
- * * auth_gssapi.c (auth_gssapi_create): remove ANSI-ish string
- * concatenation, de-ANSI-fy function definitions.
- *
- * Revision 1.18 1996/07/22 20:39:41 marc
- * this commit includes all the changes on the OV_9510_INTEGRATION and
- * OV_MERGE branches. This includes, but is not limited to, the new openvision
- * admin system, and major changes to gssapi to add functionality, and bring
- * the implementation in line with rfc1964. before committing, the
- * code was built and tested for netbsd and solaris.
- *
- * Revision 1.17.4.1 1996/07/18 04:18:31 marc
- * merged in changes from OV_9510_BP to OV_9510_FINAL1
- *
- * Revision 1.17.2.1 1996/06/20 23:35:44 marc
- * File added to the repository on a branch
- *
- * Revision 1.17 1996/05/12 06:11:38 marc
- * renamed lots of types: u_foo to unsigned foo, and foo32 to rpc_foo32. This is to make autoconfiscation less painful.
- *
- * Revision 1.16 1996/01/31 19:16:16 grier
- * [secure/3570]
- * Remove (void *) casts to memcpy() args
- *
- * Revision 1.15 1995/12/28 17:54:34 jik
- * Don't define DEBUG_GSSAPI here.
- *
- * Revision 1.14 1995/12/13 14:03:01 grier
- * Longs to ints for Alpha
- *
- * Revision 1.13 1995/11/07 23:15:26 grier
- * memcpy() casts
- *
- * Revision 1.12 1995/05/25 18:35:59 bjaspan
- * [secure-rpc/3103] log misc errors from RPC
- *
- * Revision 1.11 1994/10/27 12:39:14 jik
- * [secure-rpc/2808: add credential versioning]
- *
- * Sandbox:
- *
- * [secure-rpc/2808] add version field to client creds
- *
- * Revision 1.11 1994/10/26 20:04:00 bjaspan
- * [secure-rpc/2808] add version field to client creds
- *
- * Revision 1.10 1993/11/12 02:32:50 bjaspan
- * add badauth, don't use const_gss_OID
- *
- * Revision 1.9 1993/11/03 23:46:15 bjaspan
- * new log_badverf format
- *
- * Revision 1.8 1993/11/03 21:21:38 bjaspan
- * added log_badverf
- *
- * Revision 1.7 1993/11/03 01:29:56 bjaspan
- * add const to gss_nt_*
*
*/
/*
* Copyright 1993 OpenVision Technologies, Inc., All Rights Reserved.
*
- * $Header$
- *
- * $Log$
- * Revision 1.15 1996/08/14 00:01:37 tlyu
- * * getrpcent.c: Add PROTOTYPE and conditionalize function
- * prototypes.
- *
- * * xdr.h: Add PROTOTYPE and conditionalize function prototypes.
- *
- * * svc_auth_gssapi.c: Remove ANSI string concatenation, de-ANSI-fy
- * function definitions.
- *
- * * auth_gssapi_misc.c (auth_gssapi_display_status_1): Remove ANSI
- * string concatenation, de-ANSI-fy function definitions.
- *
- * * auth_gssapi.h: Add PROTOTYPE and conditionalize function
- * prototypes.
- *
- * * auth_gssapi.c (auth_gssapi_create): remove ANSI-ish string
- * concatenation, de-ANSI-fy function definitions.
- *
- * Revision 1.14 1996/07/22 20:39:44 marc
- * this commit includes all the changes on the OV_9510_INTEGRATION and
- * OV_MERGE branches. This includes, but is not limited to, the new openvision
- * admin system, and major changes to gssapi to add functionality, and bring
- * the implementation in line with rfc1964. before committing, the
- * code was built and tested for netbsd and solaris.
- *
- * Revision 1.13.4.1 1996/07/18 04:18:32 marc
- * merged in changes from OV_9510_BP to OV_9510_FINAL1
- *
- * Revision 1.13.2.1 1996/06/20 23:35:49 marc
- * File added to the repository on a branch
- *
- * Revision 1.13 1996/05/12 06:11:38 marc
- * renamed lots of types: u_foo to unsigned foo, and foo32 to rpc_foo32. This is to make autoconfiscation less painful.
- *
- * Revision 1.12 1996/02/25 15:53:57 grier
- * [secure/3570]
- * OSF1 long changes
- *
- * Revision 1.11 1995/12/13 14:03:30 grier
- * Longs to ints for Alpha
- *
- * Revision 1.10 1994/10/27 12:39:23 jik
- * [secure-rpc/2808: add credential versioning]
- *
- * Sandbox:
- *
- * [secure-rpc/2808] back out the backwards compat hack (I only put it
- * there in case we ever decide we want it, which we won't) and just
- * handle the version field as if it were always there
- *
- * [secure-rpc/2808] add a backwards-compatible version field encoder
- *
- * change to use GSS_ERROR &c macros; I don't think this is correct
- * =============================================================================
- *
- * Revision 1.12 1994/10/26 19:48:45 bjaspan
- * [secure-rpc/2808] back out the backwards compat hack (I only put it
- * there in case we ever decide we want it, which we won't) and just
- * handle the version field as if it were always there
- *
- * Revision 1.11 1994/10/26 19:47:42 bjaspan
- * [secure-rpc/2808] add a backwards-compatible version field encoder
- *
- * Revision 1.10 1993/12/19 22:19:40 bjaspan
- * [secure-rpc/1077] use free instead of xdr_free(xdr_bytes,...) because
- * xdr_bytes takes non-standard arguments
- *
- * Revision 1.9 1993/12/08 21:43:37 bjaspan
- * use AUTH_GSSAPI_DISPLAY_STATUS macro, reindent
- *
- * Revision 1.8 1993/12/06 21:21:21 bjaspan
- * debugging levels
- *
- * Revision 1.7 1993/11/03 23:46:34 bjaspan
- * add debugging printfs showing amount of data wrapped/unwrapped
- *
- * Revision 1.6 1993/11/03 21:21:53 bjaspan
- * unstatic misc_debug_gssapi
- *
- * Revision 1.5 1993/11/01 19:55:54 bjaspan
- * improve display_status messages, and include gss_{major,minor}
- *
- * Revision 1.4 1993/10/28 22:08:21 bjaspan
- * wrap/unwrap_data include sequence number in arg/result block
- *
- * Revision 1.3 1993/10/27 18:26:16 bjaspan
- * use xdr_free instead of free(in_buf.value); doesn't actually make a
- * difference, though
- *
- * Revision 1.2 1993/10/26 21:12:38 bjaspan
- * cleaning
- *
- * Revision 1.1 1993/10/19 03:12:28 bjaspan
- * Initial revision
- *
*/
-#if !defined(lint) && !defined(__CODECENTER__)
-static char *rcsid = "$Header$";
-#endif
-
-#include <rpc/rpc.h>
+#include <gssrpc/rpc.h>
#include <stdio.h>
#include <gssapi/gssapi.h>
-#include <rpc/auth_gssapi.h>
+#include <gssrpc/auth_gssapi.h>
#ifdef __CODECENTER__
#define DEBUG_GSSAPI 1
* Copyright (C) 1984, Sun Microsystems, Inc.
*/
-#include <rpc/types.h>
-#include <rpc/xdr.h>
-#include <rpc/auth.h>
+#include <gssrpc/types.h>
+#include <gssrpc/xdr.h>
+#include <gssrpc/auth.h>
#include <stdlib.h>
#define MAX_MARSHEL_SIZE 20
xdrs = &xdr_stream;
xdrmem_create(xdrs, ap->marshalled_client, (unsigned int)MAX_MARSHEL_SIZE,
XDR_ENCODE);
- (void)xdr_opaque_auth(xdrs, &ap->no_client.ah_cred);
- (void)xdr_opaque_auth(xdrs, &ap->no_client.ah_verf);
+ (void)gssrpc_xdr_opaque_auth(xdrs, &ap->no_client.ah_cred);
+ (void)gssrpc_xdr_opaque_auth(xdrs, &ap->no_client.ah_verf);
ap->mcnt = XDR_GETPOS(xdrs);
XDR_DESTROY(xdrs);
}
#include <stdio.h>
-#include <rpc/types.h>
-#include <rpc/xdr.h>
-#include <rpc/auth.h>
-#include <rpc/auth_unix.h>
+#include <gssrpc/types.h>
+#include <gssrpc/xdr.h>
+#include <gssrpc/auth.h>
+#include <gssrpc/auth_unix.h>
/*
au->au_shcred.oa_length);
au->au_shcred.oa_base = NULL;
}
- if (xdr_opaque_auth(&xdrs, &au->au_shcred)) {
+ if (gssrpc_xdr_opaque_auth(&xdrs, &au->au_shcred)) {
auth->ah_cred = au->au_shcred;
} else {
xdrs.x_op = XDR_FREE;
- (void)xdr_opaque_auth(&xdrs, &au->au_shcred);
+ (void)gssrpc_xdr_opaque_auth(&xdrs, &au->au_shcred);
au->au_shcred.oa_base = NULL;
auth->ah_cred = au->au_origcred;
}
register struct audata *au = AUTH_PRIVATE(auth);
xdrmem_create(xdrs, au->au_marshed, MAX_AUTH_BYTES, XDR_ENCODE);
- if ((! xdr_opaque_auth(xdrs, &(auth->ah_cred))) ||
- (! xdr_opaque_auth(xdrs, &(auth->ah_verf)))) {
+ if ((! gssrpc_xdr_opaque_auth(xdrs, &(auth->ah_cred))) ||
+ (! gssrpc_xdr_opaque_auth(xdrs, &(auth->ah_verf)))) {
perror("auth_none.c - Fatal marshalling problem");
} else {
au->au_mpos = XDR_GETPOS(xdrs);
int *aup_gids;
};
+#define xdr_authunix_parms gssrpc_xdr_authunix_parms
extern bool_t xdr_authunix_parms();
/*
*/
-#include <rpc/types.h>
-#include <rpc/xdr.h>
-#include <rpc/auth.h>
-#include <rpc/auth_unix.h>
+#include <gssrpc/types.h>
+#include <gssrpc/xdr.h>
+#include <gssrpc/auth.h>
+#include <gssrpc/auth_unix.h>
/*
* XDR for unix authentication parameters.
/*
* Bind a socket to a privileged IP port
*/
-bindresvport(sd, sin)
+gssrpc_bindresvport(sd, sin)
int sd;
struct sockaddr_in *sin;
{
* rpc_u_int32 prog;
* rpc_u_int32 vers;
*/
+#define clntraw_create gssrpc_clntraw_create
extern CLIENT *clntraw_create();
/*
* Generic client creation routine. Supported protocols are "udp" and "tcp"
*/
+#define clnt_create gssrpc_clnt_create
extern CLIENT *
clnt_create(/*host, prog, vers, prot*/); /*
char *host; -- hostname
* unsigned int sendsz;
* unsigned int recvsz;
*/
+#define clnttcp_create gssrpc_clnttcp_create
extern CLIENT *clnttcp_create();
/*
* unsigned int sendsz;
* unsigned int recvsz;
*/
+#define clntudp_create gssrpc_clntudp_create
+#define clntudp_bufcreate gssrpc_clntudp_bufcreate
extern CLIENT *clntudp_create();
extern CLIENT *clntudp_bufcreate();
/*
* Print why creation failed
*/
+#define clnt_pcreateerror gssrpc_clnt_pcreateerror
+#define clnt_spcreateerror gssrpc_clnt_spcreateerror
void clnt_pcreateerror(/* char *msg */); /* stderr */
char *clnt_spcreateerror(/* char *msg */); /* string */
/*
* Like clnt_perror(), but is more verbose in its output
*/
+#define clnt_perrno gssrpc_clnt_perrno
void clnt_perrno(/* enum clnt_stat num */); /* stderr */
/*
* Print an English error message, given the client error code
*/
+#define clnt_perror gssrpc_clnt_perror
+#define clnt_sperror gssrpc_clnt_sperror
void clnt_perror(/* CLIENT *clnt, char *msg */); /* stderr */
char *clnt_sperror(/* CLIENT *clnt, char *msg */); /* string */
/*
* If a creation fails, the following allows the user to figure out why.
*/
+#define rpc_createerr gssrpc_rpc_createrr
struct rpc_createerr {
enum clnt_stat cf_stat;
struct rpc_err cf_error; /* useful when cf_stat == RPC_PMAPFAILURE */
/*
* Copy error message to buffer.
*/
+#define clnt_sperrno gssrpc_clnt_sperrno
char *clnt_sperrno(/* enum clnt_stat num */); /* string */
/*
* Copyright (C) 1987, Sun Microsystems, Inc.
*/
-#include <rpc/rpc.h>
+#include <gssrpc/rpc.h>
#include <sys/socket.h>
#include <sys/errno.h>
#include <netdb.h>
#include <string.h>
#include <errno.h>
-#include <rpc/types.h>
-#include <rpc/auth.h>
-#include <rpc/clnt.h>
+#include <gssrpc/types.h>
+#include <gssrpc/auth.h>
+#include <gssrpc/clnt.h>
#ifdef NEED_SYS_ERRLIST
extern char *sys_errlist[];
* any interference from the kernal.
*/
-#include <rpc/rpc.h>
+#include <gssrpc/rpc.h>
#define MCALL_MSG_SIZE 24
}
if (msg.acpted_rply.ar_verf.oa_base != NULL) {
xdrs->x_op = XDR_FREE;
- (void)xdr_opaque_auth(xdrs, &(msg.acpted_rply.ar_verf));
+ (void)gssrpc_xdr_opaque_auth(xdrs, &(msg.acpted_rply.ar_verf));
}
}
*/
#include <stdio.h>
-#include <rpc/rpc.h>
+#include <gssrpc/rpc.h>
#include <sys/socket.h>
#include <netdb.h>
#include <string.h>
char *oldhost;
} *callrpc_private;
-callrpc(host, prognum, versnum, procnum, inproc, in, outproc, out)
+gssrpc_callrpc(host, prognum, versnum, procnum, inproc, in, outproc, out)
char *host;
xdrproc_t inproc, outproc;
char *in, *out;
*/
#include <stdio.h>
-#include <rpc/rpc.h>
+#include <gssrpc/rpc.h>
#include <sys/socket.h>
#include <netdb.h>
#include <errno.h>
-#include <rpc/pmap_clnt.h>
+#include <gssrpc/pmap_clnt.h>
#define MCALL_MSG_SIZE 24
*/
if (*sockp < 0) {
*sockp = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
- (void)bindresvport(*sockp, (struct sockaddr_in *)0);
+ (void)gssrpc_bindresvport(*sockp, (struct sockaddr_in *)0);
if ((*sockp < 0)
|| (connect(*sockp, (struct sockaddr *)raddr,
sizeof(*raddr)) < 0)) {
if ((reply_msg.rm_reply.rp_stat == MSG_ACCEPTED) &&
(reply_msg.acpted_rply.ar_verf.oa_base != NULL)) {
xdrs->x_op = XDR_FREE;
- (void)xdr_opaque_auth(xdrs, &(reply_msg.acpted_rply.ar_verf));
+ (void)gssrpc_xdr_opaque_auth(xdrs, &(reply_msg.acpted_rply.ar_verf));
}
return (ct->ct_error.re_status);
}
#endif /* def FD_SETSIZE */
while (TRUE) {
readfds = mask;
- switch (select(_rpc_dtablesize(), &readfds, (fd_set*)NULL, (fd_set*)NULL,
+ switch (select(_gssrpc_rpc_dtablesize(), &readfds, (fd_set*)NULL, (fd_set*)NULL,
&(ct->ct_wait))) {
case 0:
ct->ct_error.re_status = RPC_TIMEDOUT;
*/
#include <stdio.h>
-#include <rpc/rpc.h>
+#include <gssrpc/rpc.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#if defined(sun)
#endif
#include <netdb.h>
#include <errno.h>
-#include <rpc/pmap_clnt.h>
+#include <gssrpc/pmap_clnt.h>
extern int errno;
goto fooy;
}
/* attempt to bind to prov port */
- (void)bindresvport(*sockp, (struct sockaddr_in *)0);
+ (void)gssrpc_bindresvport(*sockp, (struct sockaddr_in *)0);
/* the sockets rpc controls are non-blocking */
(void)ioctl(*sockp, FIONBIO, (char *) &dontblock);
cu->cu_closeit = TRUE;
#endif /* def FD_SETSIZE */
for (;;) {
readfds = mask;
- switch (select(_rpc_dtablesize(), &readfds, (fd_set *)NULL,
+ switch (select(_gssrpc_rpc_dtablesize(), &readfds, (fd_set *)NULL,
(fd_set *)NULL, &(cu->cu_wait))) {
case 0:
if ((reply_msg.rm_reply.rp_stat == MSG_ACCEPTED) &&
(reply_msg.acpted_rply.ar_verf.oa_base != NULL)) {
xdrs->x_op = XDR_FREE;
- (void)xdr_opaque_auth(xdrs,
+ (void)gssrpc_xdr_opaque_auth(xdrs,
&(reply_msg.acpted_rply.ar_verf));
}
} /* end of valid reply message */
#ifdef GSSAPI_KRB5
#include <string.h>
-#include <rpc/types.h>
-#include <rpc/pmap_prot.h>
+#include <gssrpc/types.h>
+#include <gssrpc/pmap_prot.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <krb5.h>
/*
* don't use gethostbyname, which would invoke yellow pages
*/
-get_myaddress(addr)
+gssrpc_get_myaddress(addr)
struct sockaddr_in *addr;
{
krb5_address **addrs, **a;
}
#else /* !GSSAPI_KRB5 */
-#include <rpc/types.h>
-#include <rpc/pmap_prot.h>
+#include <gssrpc/types.h>
+#include <gssrpc/pmap_prot.h>
#include <sys/socket.h>
#if defined(sun)
#include <sys/sockio.h>
#include <stdio.h>
#include <sys/types.h>
#include <netdb.h>
-#include <rpc/rpc.h>
+#include <gssrpc/rpc.h>
#include <string.h>
#include <sys/socket.h>
*/
#include <stdio.h>
-#include <rpc/rpc.h>
+#include <gssrpc/rpc.h>
#include <netdb.h>
#include <sys/socket.h>
-getrpcport(host, prognum, versnum, proto)
+gssrpc_getrpcport(host, prognum, versnum, proto)
char *host;
{
struct sockaddr_in addr;
* Mountain View, California 94043
*/
/* @(#)rpc.h 1.8 87/07/24 SMI */
-#include <rpc/types.h>
+#include <gssrpc/types.h>
/* since the gssrpc library requires that any application using it be
built with these header files, I am making the decision that any app
which uses the rpcent routines must use this header file, or something
* Copyright (C) 1984, Sun Microsystems, Inc.
*/
-#include <rpc/rpc.h>
-#include <rpc/pmap_prot.h>
-#include <rpc/pmap_clnt.h>
+#include <gssrpc/rpc.h>
+#include <gssrpc/pmap_prot.h>
+#include <gssrpc/pmap_clnt.h>
static struct timeval timeout = { 5, 0 };
static struct timeval tottimeout = { 60, 0 };
+#define clnt_perror gssrpc_clnt_perror
void clnt_perror();
+#define get_myaddress gssrpc_get_myaddress
/*
* Set a mapping between program,version and port.
* address if the responder to the broadcast.
*/
+#define pmap_set gssrpc_pmap_set
+#define pmap_unset gssrpc_pmap_unset
+#define pmap_getmaps gssrpc_pmap_getmaps
+#define pmap_rmtcall gssrpc_pmap_rmtcall
+#define clnt_broadcast gssrpc_clnt_broadcast
+#define pmap_getport gssrpc_pmap_getport
+
extern bool_t pmap_set();
extern bool_t pmap_unset();
extern struct pmaplist *pmap_getmaps();
* Copyright (C) 1984, Sun Microsystems, Inc.
*/
-#include <rpc/rpc.h>
-#include <rpc/pmap_prot.h>
-#include <rpc/pmap_clnt.h>
+#include <gssrpc/rpc.h>
+#include <gssrpc/pmap_prot.h>
+#include <gssrpc/pmap_clnt.h>
#include <sys/socket.h>
#include <netdb.h>
#include <stdio.h>
* Copyright (C) 1984, Sun Microsystems, Inc.
*/
-#include <rpc/rpc.h>
-#include <rpc/pmap_prot.h>
-#include <rpc/pmap_clnt.h>
+#include <gssrpc/rpc.h>
+#include <gssrpc/pmap_prot.h>
+#include <gssrpc/pmap_clnt.h>
#include <sys/socket.h>
#ifdef OSF1
#include <net/route.h>
* Copyright (C) 1984, Sun Microsystems, Inc.
*/
-#include <rpc/types.h>
-#include <rpc/xdr.h>
-#include <rpc/pmap_prot.h>
+#include <gssrpc/types.h>
+#include <gssrpc/xdr.h>
+#include <gssrpc/pmap_prot.h>
bool_t
rpc_u_int32 pm_port;
};
+#define xdr_pmap gssrpc_xdr_pmap
extern bool_t xdr_pmap();
struct pmaplist {
struct pmaplist *pml_next;
};
+#define xdr_pmaplist gssrpc_xdr_pmaplist
extern bool_t xdr_pmaplist();
* Copyright (C) 1984, Sun Microsystems, Inc.
*/
-#include <rpc/types.h>
-#include <rpc/xdr.h>
-#include <rpc/pmap_prot.h>
+#include <gssrpc/types.h>
+#include <gssrpc/xdr.h>
+#include <gssrpc/pmap_prot.h>
/*
* Copyright (C) 1984, Sun Microsystems, Inc.
*/
-#include <rpc/rpc.h>
-#include <rpc/pmap_prot.h>
-#include <rpc/pmap_clnt.h>
-#include <rpc/pmap_rmt.h>
+#include <gssrpc/rpc.h>
+#include <gssrpc/pmap_prot.h>
+#include <gssrpc/pmap_clnt.h>
+#include <gssrpc/pmap_rmt.h>
#include <sys/socket.h>
#ifdef sun
#include <sys/sockio.h>
msg.acpted_rply.ar_results.where = (caddr_t)&r;
msg.acpted_rply.ar_results.proc = xdr_rmtcallres;
readfds = mask;
- switch (select(_rpc_dtablesize(), &readfds, (fd_set *)NULL,
+ switch (select(_gssrpc_rpc_dtablesize(), &readfds, (fd_set *)NULL,
(fd_set *)NULL, &t)) {
case 0: /* timed out */
xdrproc_t xdr_args;
};
+#define xdr_rmtcall_args gssrpc_xdr_rmtcall_args
bool_t xdr_rmtcall_args();
struct rmtcallres {
xdrproc_t xdr_results;
};
+#define xdr_rmtcallres gssrpc_xdr_rmtcallres
bool_t xdr_rmtcallres();
#ifndef __RPC_HEADER__
#define __RPC_HEADER__
-#include <rpc/types.h> /* some typedefs */
+#include <gssrpc/types.h> /* some typedefs */
#include <netinet/in.h>
/* external data representation interfaces */
-#include <rpc/xdr.h> /* generic (de)serializer */
+#include <gssrpc/xdr.h> /* generic (de)serializer */
/* Client side only authentication */
-#include <rpc/auth.h> /* generic authenticator (client side) */
+#include <gssrpc/auth.h> /* generic authenticator (client side) */
/* Client side (mostly) remote procedure call */
-#include <rpc/clnt.h> /* generic rpc stuff */
+#include <gssrpc/clnt.h> /* generic rpc stuff */
/* semi-private protocol headers */
-#include <rpc/rpc_msg.h> /* protocol for rpc messages */
-#include <rpc/auth_unix.h> /* protocol for unix style cred */
+#include <gssrpc/rpc_msg.h> /* protocol for rpc messages */
+#include <gssrpc/auth_unix.h> /* protocol for unix style cred */
/*
* Uncomment-out the next line if you are building the rpc library with
* DES Authentication (see the README file in the secure_rpc/ directory).
*/
-/*#include <rpc/auth_des.h> protocol for des style cred */
+/*#include <gssrpc/auth_des.h> protocol for des style cred */
/* Server side only remote procedure callee */
-#include <rpc/svc_auth.h> /* service side authenticator */
-#include <rpc/svc.h> /* service manager and multiplexer */
+#include <gssrpc/svc_auth.h> /* service side authenticator */
+#include <gssrpc/svc.h> /* service manager and multiplexer */
+/*
+ * Punt the rpc/netdb.h everywhere because it just makes things much more
+ * difficult. We don't use the *rpcent functions anyway.
+ */
+#if 0
/*
* COMMENT OUT THE NEXT INCLUDE IF RUNNING ON SUN OS OR ON A VERSION
* OF UNIX BASED ON NFSSRC. These systems will already have the structures
#include <netdb.h>
#endif
-#include <rpc/netdb.h> /* structures and routines to parse /etc/rpc */
+#include <gssrpc/netdb.h> /* structures and routines to parse /etc/rpc */
+#endif
#endif /* ndef __RPC_HEADER__ */
#include <sys/param.h>
-#include <rpc/rpc.h>
+#include <gssrpc/rpc.h>
/*
* XDR a call message
xdr_u_int32(xdrs, &(cmsg->rm_call.cb_prog)) &&
xdr_u_int32(xdrs, &(cmsg->rm_call.cb_vers)) &&
xdr_u_int32(xdrs, &(cmsg->rm_call.cb_proc)) &&
- xdr_opaque_auth(xdrs, &(cmsg->rm_call.cb_cred)) )
- return (xdr_opaque_auth(xdrs, &(cmsg->rm_call.cb_verf)));
+ gssrpc_xdr_opaque_auth(xdrs, &(cmsg->rm_call.cb_cred)) )
+ return (gssrpc_xdr_opaque_auth(xdrs, &(cmsg->rm_call.cb_verf)));
return (FALSE);
}
* 2550 Garcia Avenue
* Mountain View, California 94043
*/
-#include <rpc/rpc.h>
+#include <gssrpc/rpc.h>
/*
* This file should only contain common data (global data) that is exported
* by public interfaces
* Cache the result of getdtablesize(), so we don't have to do an
* expensive system call every time.
*/
-_rpc_dtablesize()
+_gssrpc_rpc_dtablesize()
{
static int size;
* XDR *xdrs;
* struct rpc_msg *cmsg;
*/
+#define xdr_callmsg gssrpc_xdr_callmsg
extern bool_t xdr_callmsg();
/*
* XDR *xdrs;
* struct rpc_msg *cmsg;
*/
+#define xdr_callhdr gssrpc_xdr_callhdr
extern bool_t xdr_callhdr();
/*
* XDR *xdrs;
* struct rpc_msg *rmsg;
*/
+#define xdr_replymsg gssrpc_xdr_replymsg
extern bool_t xdr_replymsg();
/*
* struct rpc_msg *msg;
* struct rpc_err *error;
*/
+#define _seterr_reply _gssrpc_seterr_reply
+#define sunrpc_seterr_reply _seterr_reply
extern void _seterr_reply();
#include <sys/param.h>
-#include <rpc/rpc.h>
+#include <gssrpc/rpc.h>
/* * * * * * * * * * * * * * XDR Authentication * * * * * * * * * * * */
* (see auth.h)
*/
bool_t
-xdr_opaque_auth(xdrs, ap)
+gssrpc_xdr_opaque_auth(xdrs, ap)
register XDR *xdrs;
register struct opaque_auth *ap;
{
* XDR the MSG_ACCEPTED part of a reply message union
*/
bool_t
-xdr_accepted_reply(xdrs, ar)
+gssrpc_xdr_accepted_reply(xdrs, ar)
register XDR *xdrs;
register struct accepted_reply *ar;
{
/* personalized union, rather than calling xdr_union */
- if (! xdr_opaque_auth(xdrs, &(ar->ar_verf)))
+ if (! gssrpc_xdr_opaque_auth(xdrs, &(ar->ar_verf)))
return (FALSE);
if (! xdr_enum(xdrs, (enum_t *)&(ar->ar_stat)))
return (FALSE);
* XDR the MSG_DENIED part of a reply message union
*/
bool_t
-xdr_rejected_reply(xdrs, rr)
+gssrpc_xdr_rejected_reply(xdrs, rr)
register XDR *xdrs;
register struct rejected_reply *rr;
{
}
static struct xdr_discrim reply_dscrm[3] = {
- { (int)MSG_ACCEPTED, xdr_accepted_reply },
- { (int)MSG_DENIED, xdr_rejected_reply },
+ { (int)MSG_ACCEPTED, gssrpc_xdr_accepted_reply },
+ { (int)MSG_DENIED, gssrpc_xdr_rejected_reply },
{ __dontcare__, NULL_xdrproc_t } };
/*
*/
#include <sys/errno.h>
-#include <rpc/rpc.h>
-#include <rpc/pmap_clnt.h>
+#include <gssrpc/rpc.h>
+#include <gssrpc/pmap_clnt.h>
#include <stdio.h>
extern int errno;
xports = (SVCXPRT **)
mem_alloc(FD_SETSIZE * sizeof(SVCXPRT *));
}
- if (sock < _rpc_dtablesize()) {
+ if (sock < _gssrpc_rpc_dtablesize()) {
xports[sock] = xprt;
FD_SET(sock, &svc_fdset);
}
register int sock = xprt->xp_sock;
#ifdef FD_SETSIZE
- if ((sock < _rpc_dtablesize()) && (xports[sock] == xprt)) {
+ if ((sock < _gssrpc_rpc_dtablesize()) && (xports[sock] == xprt)) {
xports[sock] = (SVCXPRT *)0;
FD_CLR(sock, &svc_fdset);
}
r.rq_clntcred = &(cred_area[2*MAX_AUTH_BYTES]);
#ifdef FD_SETSIZE
- setsize = _rpc_dtablesize();
+ setsize = _gssrpc_rpc_dtablesize();
maskp = (rpc_u_int32 *)readfds->fds_bits;
for (sock = 0; sock < setsize; sock += NFDBITS) {
* void (*dispatch)();
* int protocol; like TCP or UDP, zero means do not register
*/
+#define svc_register gssrpc_svc_register
extern bool_t svc_register();
/*
* rpc_u_int32 prog;
* rpc_u_int32 vers;
*/
+#define svc_unregister gssrpc_svc_unregister
extern void svc_unregister();
/*
* xprt_register(xprt)
* SVCXPRT *xprt;
*/
+#define xprt_register gssrpc_xprt_register
extern void xprt_register();
/*
* xprt_unregister(xprt)
* SVCXPRT *xprt;
*/
+#define xprt_unregister gssrpc_xprt_unregister
extern void xprt_unregister();
* deadlock the caller and server processes!
*/
+#define svc_sendreply gssrpc_svc_sendreply
+#define svcerr_decode gssrpc_svcerr_decode
+#define svcerr_weakauth gssrpc_svcerr_weakauth
+#define svcerr_noproc gssrpc_svcerr_noproc
+#define svcerr_progvers gssrpc_svcerr_progvers
+#define svcerr_auth gssrpc_svcerr_auth
+#define svcerr_noprog gssrpc_svcerr_noprog
+#define svcerr_systemerr gssrpc_svcerr_systemerr
+
extern bool_t svc_sendreply();
extern void svcerr_decode();
extern void svcerr_weakauth();
* Global keeper of rpc service descriptors in use
* dynamic; must be inspected before each call to select
*/
+#define svc_fdset gssrpc_svc_fdset
+#define svc_fds gssrpc_svc_fds
#ifdef FD_SETSIZE
-extern fd_set svc_fdset;
-#define svc_fds svc_fdset.fds_bits[0] /* compatibility */
+extern fd_set gssrpc_svc_fdset;
+#define gssrpc_svc_fds gsssrpc_svc_fdset.fds_bits[0] /* compatibility */
#else
-extern int svc_fds;
+extern int gssrpc_svc_fds;
#endif /* def FD_SETSIZE */
/*
* a small program implemented by the svc_rpc implementation itself;
* also see clnt.h for protocol numbers.
*/
+#define rpctest_service gssrpc_rpctest_service
extern void rpctest_service();
+#define svc_getreq gssrpc_svc_getreq
+#define svc_getreqset gssrpc_svc_getreqset
+#define svc_run gssrpc_svc_run
+
extern void svc_getreq();
extern void svc_getreqset(); /* takes fdset instead of int */
extern void svc_run(); /* never returns */
/*
* Memory based rpc for testing and timing.
*/
+#define svcraw_create gssrpc_svcraw_create
extern SVCXPRT *svcraw_create();
/*
* Udp based rpc.
*/
+#define svcudp_create gssrpc_svcudp_create
+#define svcudp_bufcreate gssrpc_svcudp_bufcreate
extern SVCXPRT *svcudp_create();
extern SVCXPRT *svcudp_bufcreate();
/*
* Tcp based rpc.
*/
+#define svctcp_create gssrpc_svctcp_create
extern SVCXPRT *svctcp_create();
#endif /* !__SVC_HEADER__ */
* Copyright (C) 1984, Sun Microsystems, Inc.
*/
-#include <rpc/rpc.h>
+#include <gssrpc/rpc.h>
/*
* Server side authenticators are called from authenticate by
*
*/
+#define _svcauth_null _gssrpc_svcauth_null
+#define _svcauth_unix _gssrpc_svcauth_unix
+#define _svcauth_short _gssrpc_svcauth_short
+
enum auth_stat _svcauth_null(); /* no authentication */
enum auth_stat _svcauth_unix(); /* unix style (uid, gids) */
enum auth_stat _svcauth_short(); /* short hand unix style */
/*
* Server side authenticator
*/
+#define _authenticate _gssrpc_authenticate
extern enum auth_stat _authenticate();
#define SVCAUTH_WRAP(auth, xdrs, xfunc, xwhere) \
*/
#include <stdio.h>
-#include <rpc/rpc.h>
+#include <gssrpc/rpc.h>
extern int authany_wrap();
* Copyright 1993 OpenVision Technologies, Inc., All Rights Reserved.
*
* $Id$
- * $Source$
- *
- * $Log$
- * Revision 1.44 1997/12/16 16:23:38 epeisach
- * * svc_auth_gssapi.c (_svcauth_gssapi): When looping over services,
- * free previous output_tokens.
- *
- * Revision 1.43 1997/10/21 18:33:55 epeisach
- * Fix to not lose entries in the chain linked client list.
- *
- * A pointer was not being updated resulting in the situation where
- * random clients would sudenly fail with a misc. rpc. error as the client
- * handle could not be found. The scenario required three active clients
- * to trigger the problem.
- *
- * Revision 1.42 1996/12/04 17:47:18 bjaspan
- * * Various changes to allow channel bindings to work with both UDP
- * and TCP cleanly [krb5-libs/180]:
- *
- * * auth_gssapi.c: remove the special-case exception to channel
- * bindings failure added in the previous revision, since we now
- * solve the problem by making channel bindings not fail
- *
- * * clnt_udp.c: use a connected socket so that the client can
- * determine its own source address with getsockname
- *
- * * svc.h: add xp_laddr and xp_laddrlen fields to SVCXPRT structure
- *
- * * svc_tcp.c: set xp_laddr and xp_laddrlen when a connection is
- * established
- *
- * * svc_udp.c (svcudp_recv): use recvmsg with MSG_PEEK followed by
- * recvfrom in order to determine both source and dest address on
- * unconnected UDP socket, set xp_laddr and xp_laddrlen
- *
- * Revision 1.41 1996/10/16 20:16:10 bjaspan
- * * svc_auth_gssapi.c (_svcauth_gssapi): accept add call_arg version 4
- *
- * Revision 1.40 1996/10/15 21:05:10 bjaspan
- * * configure.in: add DO_SUBDIRS so make will descend into unit-test
- *
- * Revision 1.39 1996/08/14 00:01:48 tlyu
- * * getrpcent.c: Add PROTOTYPE and conditionalize function
- * prototypes.
- *
- * * xdr.h: Add PROTOTYPE and conditionalize function prototypes.
- *
- * * svc_auth_gssapi.c: Remove ANSI string concatenation, de-ANSI-fy
- * function definitions.
- *
- * * auth_gssapi_misc.c (auth_gssapi_display_status_1): Remove ANSI
- * string concatenation, de-ANSI-fy function definitions.
- *
- * * auth_gssapi.h: Add PROTOTYPE and conditionalize function
- * prototypes.
- *
- * * auth_gssapi.c (auth_gssapi_create): remove ANSI-ish string
- * concatenation, de-ANSI-fy function definitions.
- *
- * Revision 1.38 1996/07/30 23:25:37 tlyu
- * * svc_auth_gssapi.c: #include <rpc/rpc.h> before <sys/stat.h> (to
- * get sys/types.h.
- *
- * Revision 1.37 1996/07/22 20:41:00 marc
- * this commit includes all the changes on the OV_9510_INTEGRATION and
- * OV_MERGE branches. This includes, but is not limited to, the new openvision
- * admin system, and major changes to gssapi to add functionality, and bring
- * the implementation in line with rfc1964. before committing, the
- * code was built and tested for netbsd and solaris.
- *
- * Revision 1.36.4.1 1996/07/18 04:19:34 marc
- * merged in changes from OV_9510_BP to OV_9510_FINAL1
- *
- * Revision 1.36.2.1 1996/06/20 23:39:22 marc
- * File added to the repository on a branch
- *
- * Revision 1.36 1996/05/30 19:25:02 bjaspan
- * zero bindings structure before using it
- *
- * Revision 1.35 1996/05/12 06:17:25 marc
- * changed around the file includes, since krb5 has changed some.
- *
- * added conditionalization GSS_BACKWARD_HACK until and if this hack is
- * reimplemented in the newly merged gssapi.
- *
- * conditionalize out the host-specific cruft for setting the local
- * address to INADDR_ANY, since you can just assign it that way on all
- * platforms I know of.
- *
- * Revision 1.34 1996/02/12 15:14:00 grier
- * [secure/3570]
- * restore (struct sockaddr *) cast that got mangled
- *
- * Revision 1.33 1996/02/07 13:09:52 jik
- * Actually, I should have used krb5_error_code, not krb5_int32.
- *
- * Revision 1.32 1996/02/07 13:08:31 jik
- * Include <krb5/krb5.h> to get the krb5_int32 typedef, which we then use
- * in a cast when checking if the GSS-API minor status value is equal to
- * a krb5 error code.
- *
- * Revision 1.31 1996/02/01 18:29:29 grier
- * Restore use of error code definition.
- * Return original code structure.
- *
- * Revision 1.30 1996/01/31 19:15:49 grier
- * [secure/3570]
- * Remove (void *) casts to memcpy() args
- *
- * Revision 1.29 1996/01/25 03:58:04 grier
- * Remove debug code
- *
- * Revision 1.28 1996/01/25 03:56:50 grier
- * secure/3570 - missed Alpha checkin
- *
- * Revision 1.26 1995/11/07 23:17:23 grier
- * memcpy() cast
- *
- * Revision 1.25 1995/08/24 21:05:48 bjaspan
- * set acceptor channel bindings
- *
- * Revision 1.24 1995/08/23 20:28:02 bjaspan
- * [secure-rpc/3392] add channel bindinds to the rpc
- *
- * Revision 1.23 1995/07/10 18:49:22 bjaspan
- * [secure-build/3377] remove use of BSD db
- *
- * Revision 1.22 1995/05/25 18:35:53 bjaspan
- * [secure-rpc/3103] log misc errors from RPC
- *
- * Revision 1.21 1995/05/24 17:34:03 bjaspan
- * [secure-rpc/3302] don't allow client to make server exit unless
- * debugging is enabled
- *
- * Revision 1.20 1995/05/08 22:32:44 marc
- * if a new client is in use, set the krb5 gssapi mech into
- * backward-compatibility mode.
- *
- * Revision 1.19 1994/10/27 12:38:51 jik
- * [secure-rpc/2808: add credential versioning]
- *
- * Sandbox:
- *
- * [secure-rpc/2808] add version field to client creds
- *
- * Revision 1.22 1994/10/26 20:03:27 bjaspan
- * [secure-rpc/2808] add version field to client creds
- *
- * Revision 1.21 1994/05/23 01:26:01 bjaspan
- * [secure-rpc/1911] set rq_svccred to the context instead of the service
- * gss name
- *
- * Revision 1.20 1994/05/09 17:48:39 shanzer
- * change sys/fcntl.h to fcntl.h
- *
- * Revision 1.19 1994/04/08 17:21:32 bjaspan
- * remove KRB5KTNAME hack
- *
- * Revision 1.18 1994/03/18 15:48:13 shanzer
- * include sys/fcntl.h
- *
- * Revision 1.17 1994/03/08 00:05:56 shanzer
- * call rand() instead random()
- *
- * Revision 1.16 1993/12/08 21:43:54 bjaspan
- * gss_delete_sec_context failure is not fatal (in fact, the context
- * will often be expired); use AUTH_GSSAPI_DISPLAY_STATUS macro
- *
- * Revision 1.15 1993/12/08 20:20:08 bjaspan
- * add debugging info to expire_client, correct comment above btree->put
- *
- * Revision 1.14 1993/12/08 06:52:49 bjaspan
- * *many* debugging improvements to help find secure-rpc/586, and (I hope)
- * the fix: don't change client_data->expiration without deleting it
- * and reinserting it into the btree
- *
- * Revision 1.13 1993/12/06 21:22:26 bjaspan
- * debugging levels, #ifdef PURIFY, call abort() on impossible failures
- *
- * Revision 1.12 1993/11/12 02:33:14 bjaspan
- * add badauth
- * /
- *
- * Revision 1.11 1993/11/03 23:46:15 bjaspan
- * new log_badverf format
- *
- * Revision 1.10 1993/11/03 21:23:30 bjaspan
- * handle GSS_C_INDEFINITE expiration, add log_badverf, set rq_svccred
- *
- * Revision 1.9 1993/11/03 01:30:36 bjaspan
- * don't include gssapi_krb5.h, it isn't needed
- *
- * Revision 1.8 1993/11/02 22:09:02 bjaspan
- * support multiple service-side names via _svcauth_gssapi_set_names
- *
- * Revision 1.7 1993/11/01 19:56:22 bjaspan
- * unstatic svc_debug_gssapi, and send gss_{major,minor} back if
- * accept_sec_context fails
- *
- * Revision 1.6 1993/10/28 22:09:58 bjaspan
- * fix verifier mem leak, clean_clients() first to avoid dangling ref,
- * only include hacked kt_default_name if DEBUG_GSSAPI defined
- *
- * Revision 1.5 1993/10/27 18:26:51 bjaspan
- * use xdr_free instead of gss_release_buffer; this fixes memory leaks
- * that were probably caused by zero-length seal/unseal tokens
- *
- * Revision 1.4 1993/10/26 21:12:51 bjaspan
- * fully working
*
*/
-#if !defined(lint) && !defined(__CODECENTER__)
-static char *rcsid = "$Header$";
-#endif
-
/*
* svc_auth_gssapi.c
* Handles the GSS-API flavor authentication parameters on the service
#include <stdio.h>
#include <string.h>
-#include <rpc/rpc.h>
+#include <gssrpc/rpc.h>
#include <sys/stat.h>
#include <gssapi/gssapi_generic.h>
-#include <rpc/auth_gssapi.h>
+#include <gssrpc/auth_gssapi.h>
#ifdef GSS_BACKWARD_HACK
#include <gssapi/gssapi_krb5.h>
if (creds.auth_msg && rqst->rq_proc == AUTH_GSSAPI_EXIT) {
PRINTF(("svcauth_gssapi: GSSAPI_EXIT, cleaning up\n"));
svc_sendreply(rqst->rq_xprt, xdr_void, NULL);
- xdr_free(xdr_authgssapi_creds, &creds);
+ gssrpc_xdr_free(xdr_authgssapi_creds, &creds);
cleanup();
exit(0);
}
minor_stat = call_res.gss_minor;
/* done with call args */
- xdr_free(xdr_authgssapi_init_arg, &call_arg);
+ gssrpc_xdr_free(xdr_authgssapi_init_arg, &call_arg);
PRINTF(("svcauth_gssapi: accept_sec_context returned %#x\n",
call_res.gss_major));
&call_arg.token);
/* done with call args */
- xdr_free(xdr_authgssapi_init_arg, &call_arg);
+ gssrpc_xdr_free(xdr_authgssapi_init_arg, &call_arg);
if (gssstat != GSS_S_COMPLETE) {
AUTH_GSSAPI_DISPLAY_STATUS(("processing token",
if (creds.client_handle.length != 0) {
PRINTF(("svcauth_gssapi: freeing client_handle len %d\n",
creds.client_handle.length));
- xdr_free(xdr_authgssapi_creds, &creds);
+ gssrpc_xdr_free(xdr_authgssapi_creds, &creds);
}
PRINTF(("\n"));
if (creds.client_handle.length != 0) {
PRINTF(("svcauth_gssapi: freeing client_handle len %d\n",
creds.client_handle.length));
- xdr_free(xdr_authgssapi_creds, &creds);
+ gssrpc_xdr_free(xdr_authgssapi_creds, &creds);
}
PRINTF(("\n"));
*/
#include <stdio.h>
-#include <rpc/rpc.h>
+#include <gssrpc/rpc.h>
/*
* Unix longhand authenticator
*/
enum auth_stat
-_svcauth_unix(rqst, msg)
+_gssrpc_svcauth_unix(rqst, msg)
register struct svc_req *rqst;
register struct rpc_msg *msg;
{
*/
/*ARGSUSED*/
enum auth_stat
-_svcauth_short(rqst, msg)
+_gssrpc_svcauth_short(rqst, msg)
struct svc_req *rqst;
struct rpc_msg *msg;
{
* Copyright (C) 1984, Sun Microsystems, Inc.
*/
-#include <rpc/rpc.h>
+#include <gssrpc/rpc.h>
/*
* This is the rpc server side idle loop
* Wait for input, call server program.
*/
-#include <rpc/rpc.h>
+#include <gssrpc/rpc.h>
#include <sys/errno.h>
void
#else
readfds = svc_fds;
#endif /* def FD_SETSIZE */
- switch (select(_rpc_dtablesize(), &readfds, (fd_set *)0,
+ switch (select(_gssrpc_rpc_dtablesize(), &readfds, (fd_set *)0,
(fd_set *)0, (struct timeval *)0)) {
case -1:
if (errno == EINTR) {
*/
#include <stdio.h>
-#include <rpc/rpc.h>
+#include <gssrpc/rpc.h>
#include <sys/socket.h>
#include <netdb.h>
} *proglst;
static void universal();
static SVCXPRT *transp;
-struct proglst *pl;
+static struct proglst *pl;
-registerrpc(prognum, versnum, procnum, progname, inproc, outproc)
+gssrpc_registerrpc(prognum, versnum, procnum, progname, inproc, outproc)
char *(*progname)();
xdrproc_t inproc, outproc;
{
*/
#include <stdio.h>
-#include <rpc/rpc.h>
+#include <gssrpc/rpc.h>
#include <sys/socket.h>
#include <errno.h>
#include <stdlib.h>
}
memset((char *)&addr, 0, sizeof (addr));
addr.sin_family = AF_INET;
- if (bindresvport(sock, &addr)) {
+ if (gssrpc_bindresvport(sock, &addr)) {
addr.sin_port = 0;
(void)bind(sock, (struct sockaddr *)&addr, len);
}
* descriptor as its first input.
*/
SVCXPRT *
-svcfd_create(fd, sendsize, recvsize)
+gssrpc_svcfd_create(fd, sendsize, recvsize)
int fd;
unsigned int sendsize;
unsigned int recvsize;
#endif /* def FD_SETSIZE */
do {
readfds = mask;
- if (select(_rpc_dtablesize(), &readfds, (fd_set*)NULL,
+ if (select(_gssrpc_rpc_dtablesize(), &readfds, (fd_set*)NULL,
(fd_set*)NULL, &wait_per_try) <= 0) {
if (errno == EINTR) {
continue;
*/
#include <stdio.h>
-#include <rpc/rpc.h>
+#include <gssrpc/rpc.h>
#include <sys/socket.h>
#include <errno.h>
#ifdef HAVE_SYS_UIO_H
}
memset((char *)&addr, 0, sizeof (addr));
addr.sin_family = AF_INET;
- if (bindresvport(sock, &addr)) {
+ if (gssrpc_bindresvport(sock, &addr)) {
addr.sin_port = 0;
(void)bind(sock, (struct sockaddr *)&addr, len);
}
* Enable use of the cache.
* Note: there is no disable.
*/
-svcudp_enablecache(transp, size)
+gssrpc_svcudp_enablecache(transp, size)
SVCXPRT *transp;
rpc_u_int32 size;
{
#include <stdio.h>
#include <string.h>
-#include <rpc/types.h>
-#include <rpc/xdr.h>
+#include <gssrpc/types.h>
+#include <gssrpc/xdr.h>
/*
* constants specific to the xdr "protocol"
* Not a filter, but a convenient utility nonetheless
*/
void
-xdr_free(proc, objp)
+gssrpc_xdr_free(proc, objp)
xdrproc_t proc;
char *objp;
{
/*
* These are the "generic" xdr routines.
*/
+#define xdr_void gssrpc_xdr_void
+#define xdr_int gssrpc_xdr_int
+#define xdr_u_int gssrpc_xdr_u_int
+#define xdr_long gssrpc_xdr_long
+#define xdr_u_long gssrpc_xdr_u_long
+#define xdr_short gssrpc_xdr_short
+#define xdr_u_short gssrpc_xdr_u_short
+#define xdr_bool gssrpc_xdr_bool
+#define xdr_enum gssrpc_xdr_enum
+#define xdr_array gssrpc_xdr_array
+#define xdr_bytes gssrpc_xdr_bytes
+#define xdr_opaque gssrpc_xdr_opaque
+#define xdr_string gssrpc_xdr_string
+#define xdr_union gssrpc_xdr_union
+#define xdr_char gssrpc_xdr_char
+#define xdr_u_char gssrpc_xdr_u_char
+#define xdr_vector gssrpc_xdr_vector
+#define xdr_float gssrpc_xdr_float
+#define xdr_double gssrpc_xdr_double
+#define xdr_reference gssrpc_xdr_reference
+#define xdr_pointer gssrpc_xdr_pointer
+#define xdr_wrapstring gssrpc_xdr_wrapstring
+
extern bool_t xdr_void();
extern bool_t xdr_int
PROTOTYPE((XDR *, int *));
* Common opaque bytes objects used by many rpc protocols;
* declared here due to commonality.
*/
+#define xdr_netobj gssrpc_xdr_netobj
+#define xdr_int32 gssrpc_xdr_int32
+#define xdr_u_int32 gssrpc_xdr_u_int32
+
#define MAX_NETOBJ_SZ 1024
struct netobj {
unsigned int n_len;
* These are the public routines for the various implementations of
* xdr streams.
*/
+#define xdrmem_create gssrpc_xdrmem_create
+#define xdrstdio_create gssrpc_xdrstdio_create
+#define xdrrec_create gssrpc_xdrrec_create
+#define xdralloc_create gssrpc_xdralloc_create
+#define xdralloc_release gssrpc_xdralloc_release
+#define xdrrec_endofrecord gssrpc_xdrrec_endofrecord
+#define xdrrec_skiprecord gssrpc_xdrrec_skiprecord
+#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 */
/*
* Copyright 1993 OpenVision Technologies, Inc., All Rights Reserved.
*
- * $Header$
- *
- * $Log$
- * Revision 1.6 1996/07/22 20:41:21 marc
- * this commit includes all the changes on the OV_9510_INTEGRATION and
- * OV_MERGE branches. This includes, but is not limited to, the new openvision
- * admin system, and major changes to gssapi to add functionality, and bring
- * the implementation in line with rfc1964. before committing, the
- * code was built and tested for netbsd and solaris.
- *
- * Revision 1.5.4.1 1996/07/18 04:19:49 marc
- * merged in changes from OV_9510_BP to OV_9510_FINAL1
- *
- * Revision 1.5.2.1 1996/06/20 23:40:30 marc
- * File added to the repository on a branch
- *
- * Revision 1.5 1996/05/12 06:19:25 marc
- * renamed lots of types: u_foo to unsigned foo, and foo32 to rpc_foo32. This is to make autoconfiscation less painful.
- *
- * Revision 1.4 1995/12/13 14:03:14 grier
- * Longs to ints for Alpha
- *
- * Revision 1.3 1993/12/09 18:57:25 bjaspan
- * [secure-releng/833] misc bugfixes to admin library
- *
- * Revision 1.3 1993/12/06 21:23:08 bjaspan
- * add xdralloc_release
- *
- * Revision 1.2 1993/10/26 21:13:19 bjaspan
- * add casts for correctness
- *
- * Revision 1.1 1993/10/19 03:11:39 bjaspan
- * Initial revision
- *
*/
-#if !defined(lint) && !defined(__CODECENTER__)
-static char *rcsid = "$Header$";
-#endif
-
-#include <rpc/types.h>
-#include <rpc/xdr.h>
+#include <gssrpc/types.h>
+#include <gssrpc/xdr.h>
#include <dyn.h>
static bool_t xdralloc_putlong();
#include <stdio.h>
-#include <rpc/types.h>
-#include <rpc/xdr.h>
+#include <gssrpc/types.h>
+#include <gssrpc/xdr.h>
#define LASTUNSIGNED ((unsigned int)0-1)
#include <stdio.h>
-#include <rpc/types.h>
-#include <rpc/xdr.h>
+#include <gssrpc/types.h>
+#include <gssrpc/xdr.h>
/*
* NB: Not portable.
*/
-#include <rpc/types.h>
-#include <rpc/xdr.h>
+#include <gssrpc/types.h>
+#include <gssrpc/xdr.h>
#include <netinet/in.h>
#include <stdio.h>
*/
#include <stdio.h>
-#include <rpc/types.h>
-#include <rpc/xdr.h>
+#include <gssrpc/types.h>
+#include <gssrpc/xdr.h>
#include <netinet/in.h>
#include <unistd.h>
*/
#include <stdio.h>
-#include <rpc/types.h>
-#include <rpc/xdr.h>
+#include <gssrpc/types.h>
+#include <gssrpc/xdr.h>
#define LASTUNSIGNED ((unsigned int)0-1)
* from the stream.
*/
-#include <rpc/types.h>
+#include <gssrpc/types.h>
#include <stdio.h>
-#include <rpc/xdr.h>
+#include <gssrpc/xdr.h>
static bool_t xdrstdio_getlong();
static bool_t xdrstdio_putlong();