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
+2001-06-05 Ezra Peisach <epeisach@mit.edu>
+
+ * 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 <raeburn@mit.edu>
* configure.in: Check for strerror.
*/
+#include <gssrpc/xdr.h>
+
#define MAX_AUTH_BYTES 400
#define MAXNETNAMELEN 255 /* maximum length of network user's name */
* 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 *);
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
+#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
*/
#include <string.h>
+#include <unistd.h>
#include <sys/types.h>
#include <sys/errno.h>
#include <sys/socket.h>
/*
* Bind a socket to a privileged IP port
*/
+int
gssrpc_bindresvport(sd, sin)
int sd;
struct sockaddr_in *sin;
extern CLIENT *clntudp_create();
extern CLIENT *clntudp_bufcreate();
+#define _rpc_dtablesize _gssrpc_rpc_dtablesize
+extern int _rpc_dtablesize(void);
/*
* Print why creation failed
*/
#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 */
/*
* Copyright (C) 1987, Sun Microsystems, Inc.
*/
+#include <string.h>
#include <gssrpc/rpc.h>
#include <sys/socket.h>
#include <sys/errno.h>
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);
*/
#include <stdio.h>
+/* for close() */
+#include <unistd.h>
#include <gssrpc/rpc.h>
#include <sys/socket.h>
#include <netdb.h>
char *oldhost;
} *callrpc_private;
+int
gssrpc_callrpc(host, prognum, versnum, procnum, inproc, in, outproc, out)
char *host;
xdrproc_t inproc, outproc;
*/
#include <stdio.h>
+#include <unistd.h>
#include <gssrpc/rpc.h>
#include <sys/socket.h>
#include <netdb.h>
*/
#include <stdio.h>
+#include <unistd.h>
#include <gssrpc/rpc.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
char *info;
{
register struct cu_data *cu = (struct cu_data *)cl->cl_private;
- int len;
switch (request) {
case CLSET_TIMEOUT:
/*
* don't use gethostbyname, which would invoke yellow pages
*/
+int
gssrpc_get_myaddress(addr)
struct sockaddr_in *addr;
{
*/
#include <stdio.h>
+#include <string.h>
#include <gssrpc/rpc.h>
+#include <gssrpc/pmap_clnt.h>
#include <netdb.h>
#include <sys/socket.h>
+int
gssrpc_getrpcport(host, prognum, versnum, proto)
char *host;
{
* Copyright (C) 1984, Sun Microsystems, Inc.
*/
+#include <unistd.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>
+#include <unistd.h>
#include <errno.h>
#ifdef OSF1
#include <net/route.h>
* Copyright (C) 1984, Sun Microsystems, Inc.
*/
+#include <unistd.h>
#include <gssrpc/rpc.h>
#include <gssrpc/pmap_prot.h>
#include <gssrpc/pmap_clnt.h>
* Copyright (C) 1984, Sun Microsystems, Inc.
*/
+#include <unistd.h>
#include <gssrpc/rpc.h>
#include <gssrpc/pmap_prot.h>
#include <gssrpc/pmap_clnt.h>
#include <gssrpc/netdb.h> /* 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__ */
*/
#include <sys/param.h>
-
+#include <string.h>
#include <gssrpc/rpc.h>
/*
* 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;
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 */
}
switch (rjct_stat) {
- case RPC_VERSMISMATCH:
+ case RPC_MISMATCH:
error->re_status = RPC_VERSMISMATCH;
return;
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;
}
}
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);
*/
#include <stdio.h>
+#include <string.h>
#include <gssrpc/rpc.h>
/*
#include <stdio.h>
#include <gssrpc/rpc.h>
+#include <gssrpc/pmap_clnt.h>
#include <sys/socket.h>
#include <netdb.h>
static SVCXPRT *transp;
static struct proglst *pl;
+int
gssrpc_registerrpc(prognum, versnum, procnum, progname, inproc, outproc)
char *(*progname)();
xdrproc_t inproc, outproc;
*/
#include <stdio.h>
+#include <unistd.h>
#include <gssrpc/rpc.h>
#include <sys/socket.h>
#include <errno.h>
#include <stdlib.h>
-/*extern bool_t abort();*.
+/*extern bool_t abort();
extern errno;
+*/
/*
* Ops vector for TCP/IP based rpc service handle
*/
#include <stdio.h>
+#include <unistd.h>
#include <gssrpc/rpc.h>
#include <sys/socket.h>
#include <errno.h>
* Enable use of the cache.
* Note: there is no disable.
*/
+int
gssrpc_svcudp_enablecache(transp, size)
SVCXPRT *transp;
rpc_u_int32 size;
} else {
return (xdr_short(xdrs, (short *)ip));
}
+ /*NOTREACHED*/
+ return(FALSE);
#endif
}
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
}
}
+bool_t
xdr_u_int32(xdrs, up)
XDR *xdrs;
rpc_u_int32 *up;
case XDR_ENCODE:
size = strlen(sp);
break;
+ case XDR_DECODE:
+ break;
}
if (! xdr_u_int(xdrs, &size)) {
return (FALSE);
case XDR_FREE:
return (TRUE);
+
+ case XDR_ENCODE:
+ break;
}
/*
#include <gssrpc/xdr.h>
#include <netinet/in.h>
#include <stdio.h>
+#include <string.h>
static bool_t xdrmem_getlong();
static bool_t xdrmem_putlong();
#include <netinet/in.h>
#include <unistd.h>
+#include <string.h>
static unsigned int fix_buf_size();
static bool_t flush_out();
return (TRUE);
}
break;
+
+ case XDR_FREE:
+ break;
}
return (FALSE);
}
rstrm->in_finger += len;
}
break;
+
+ case XDR_FREE:
+ break;
}
return (buf);
}
}
memset(loc, 0, (int)size);
break;
+
+ case XDR_ENCODE:
+ break;
}
stat = (*proc)(xdrs, loc, LASTUNSIGNED);