+Tue Aug 13 15:18:16 1996 Tom Yu <tlyu@mit.edu>
+
+ * 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.
+
Thu Aug 8 15:30:01 1996 Tom Yu <tlyu@voltage-multiplier.mit.edu>
* configure.in, types.hin: Change search for struct rpcent yet
* $Header$
*
* $Log$
+ * Revision 1.24 1996/08/14 00:01:30 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.23 1996/07/22 20:39:39 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
*
* Effects: See design document, section XXX.
*/
-AUTH *auth_gssapi_create_default(CLIENT *clnt, char *service_name)
+AUTH *auth_gssapi_create_default(clnt, service_name)
+ CLIENT *clnt;
+ char *service_name;
{
AUTH *auth;
OM_uint32 gssstat, minor_stat;
*
* Effects: See design document, section XXX.
*/
-AUTH *auth_gssapi_create(CLIENT *clnt,
- OM_uint32 *gssstat,
- OM_uint32 *minor_stat,
- gss_cred_id_t claimant_cred_handle,
- gss_name_t target_name,
- gss_OID mech_type,
- int req_flags,
- OM_uint32 time_req,
- gss_OID *actual_mech_type,
- int *ret_flags,
- OM_uint32 *time_rec)
+AUTH *auth_gssapi_create(clnt, gssstat, minor_stat,
+ claimant_cred_handle,
+ target_name,
+ mech_type,
+ req_flags,
+ time_req,
+ actual_mech_type,
+ ret_flags,
+ time_rec)
+ CLIENT *clnt;
+ OM_uint32 *gssstat;
+ OM_uint32 *minor_stat;
+ gss_cred_id_t claimant_cred_handle;
+ gss_name_t target_name;
+ gss_OID mech_type;
+ int req_flags;
+ OM_uint32 time_req;
+ gss_OID *actual_mech_type;
+ int *ret_flags;
+ OM_uint32 *time_rec;
{
AUTH *auth, *save_auth;
struct auth_gssapi_data *pdata;
if (callstat == RPC_AUTHERROR &&
(err.re_why == AUTH_BADCRED || err.re_why == AUTH_FAILED)
&& call_arg.version >= 1) {
- L_PRINTF(1, ("call_arg protocol "
- "version %d rejected, trying %d.\n",
+ L_PRINTF(1,
+ ("call_arg protocol version %d rejected, trying %d.\n",
call_arg.version, call_arg.version-1));
call_arg.version--;
goto try_new_version;
* understand
*/
if (call_arg.version > 2 && call_res.version == 1) {
- L_PRINTF(1, ("Talking to Secure 1.1 server, "
- "using version 1.\n"));
+ L_PRINTF(1,
+ ("Talking to Secure 1.1 server, using version 1.\n"));
call_arg.version = 1;
goto try_new_version;
}
* $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
#define AUTH_GSSAPI_MSG 3
#define AUTH_GSSAPI_DESTROY 4
+/*
+ * Yuck. Some sys/types.h files leak symbols
+ */
+#ifdef major
+#undef major
+#endif
+#ifdef minor
+#undef minor
+#endif
+
+/*
+ * Make sure we have a definition for PROTOTYPE.
+ */
+#if !defined(PROTOTYPE)
+#if defined(__STDC__) || defined(_MSDOS) || defined(_WIN32) || defined(__ultrix)
+#define PROTOTYPE(x) x
+#else
+#define PROTOTYPE(x) ()
+#endif
+#endif
+
typedef struct _auth_gssapi_name {
char *name;
gss_OID type;
gss_buffer_desc signed_isn;
} auth_gssapi_init_res;
-typedef void (*auth_gssapi_log_badauth_func)(OM_uint32 major,
- OM_uint32 minor,
- struct sockaddr_in *raddr,
- caddr_t data);
+typedef void (*auth_gssapi_log_badauth_func)
+ PROTOTYPE((OM_uint32 major,
+ OM_uint32 minor,
+ struct sockaddr_in *raddr,
+ caddr_t data));
-typedef void (*auth_gssapi_log_badverf_func)(gss_name_t client,
- gss_name_t server,
- struct svc_req *rqst,
- struct rpc_msg *msg,
- caddr_t data);
-
-typedef void (*auth_gssapi_log_miscerr_func)(struct svc_req *rqst,
- struct rpc_msg *msg,
- char *error,
- caddr_t data);
+typedef void (*auth_gssapi_log_badverf_func)
+ PROTOTYPE((gss_name_t client,
+ gss_name_t server,
+ struct svc_req *rqst,
+ struct rpc_msg *msg,
+ caddr_t data));
+
+typedef void (*auth_gssapi_log_miscerr_func)
+ PROTOTYPE((struct svc_req *rqst,
+ struct rpc_msg *msg,
+ char *error,
+ caddr_t data));
bool_t xdr_authgssapi_creds();
bool_t xdr_authgssapi_init_arg();
bool_t xdr_authgssapi_init_res();
-bool_t auth_gssapi_wrap_data(OM_uint32 *major, OM_uint32 *minor,
- gss_ctx_id_t context, rpc_u_int32 seq_num, XDR
- *out_xdrs, bool_t (*xdr_func)(), caddr_t
- xdr_ptr);
-bool_t auth_gssapi_unwrap_data(OM_uint32 *major, OM_uint32 *minor,
- gss_ctx_id_t context, rpc_u_int32 seq_num, XDR
- *in_xdrs, bool_t (*xdr_func)(), caddr_t
- xdr_ptr);
-
-AUTH *auth_gssapi_create(CLIENT *clnt,
- OM_uint32 *major_status,
- OM_uint32 *minor_status,
- gss_cred_id_t claimant_cred_handle,
- gss_name_t target_name,
- gss_OID mech_type,
- int req_flags,
- OM_uint32 time_req,
- gss_OID *actual_mech_type,
- int *ret_flags,
- OM_uint32 *time_rec);
-
-AUTH *auth_gssapi_create_default(CLIENT *clnt, char *service_name);
-
-void auth_gssapi_display_status(char *msg, OM_uint32 major,
- OM_uint32 minor);
-bool_t _svcauth_gssapi_set_name(char *name, gss_OID name_type);
-
-void _svcauth_set_log_badauth_func(auth_gssapi_log_badauth_func func,
- caddr_t data);
-void _svcauth_set_log_badverf_func(auth_gssapi_log_badverf_func func,
- caddr_t data);
-void _svcauth_set_log_miscerr_func(auth_gssapi_log_miscerr_func func,
- caddr_t data);
+bool_t auth_gssapi_wrap_data
+PROTOTYPE((OM_uint32 *major, OM_uint32 *minor,
+ gss_ctx_id_t context, rpc_u_int32 seq_num, XDR
+ *out_xdrs, bool_t (*xdr_func)(), caddr_t
+ xdr_ptr));
+bool_t auth_gssapi_unwrap_data
+PROTOTYPE((OM_uint32 *major, OM_uint32 *minor,
+ gss_ctx_id_t context, rpc_u_int32 seq_num, XDR
+ *in_xdrs, bool_t (*xdr_func)(), caddr_t
+ xdr_ptr));
+
+AUTH *auth_gssapi_create
+PROTOTYPE((CLIENT *clnt,
+ OM_uint32 *major_status,
+ OM_uint32 *minor_status,
+ gss_cred_id_t claimant_cred_handle,
+ gss_name_t target_name,
+ gss_OID mech_type,
+ int req_flags,
+ OM_uint32 time_req,
+ gss_OID *actual_mech_type,
+ int *ret_flags,
+ OM_uint32 *time_rec));
+
+AUTH *auth_gssapi_create_default
+PROTOTYPE((CLIENT *clnt, char *service_name));
+
+void auth_gssapi_display_status
+PROTOTYPE((char *msg, OM_uint32 major,
+ OM_uint32 minor));
+bool_t _svcauth_gssapi_set_name
+PROTOTYPE((char *name, gss_OID name_type));
+
+void _svcauth_set_log_badauth_func
+PROTOTYPE((auth_gssapi_log_badauth_func func,
+ caddr_t data));
+void _svcauth_set_log_badverf_func
+PROTOTYPE((auth_gssapi_log_badverf_func func,
+ caddr_t data));
+void _svcauth_set_log_miscerr_func
+PROTOTYPE((auth_gssapi_log_miscerr_func func,
+ caddr_t data));
#define GSS_COPY_BUFFER(dest, src) { \
(dest).length = (src).length; \
* $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
#define AUTH_GSSAPI_DISPLAY_STATUS(args)
#endif
-static void auth_gssapi_display_status_1(char *, OM_uint32, int, int);
+static void auth_gssapi_display_status_1
+ PROTOTYPE((char *, OM_uint32, int, int));
bool_t xdr_gss_buf(xdrs, buf)
XDR *xdrs;
return TRUE;
}
-void auth_gssapi_display_status(char *msg, OM_uint32 major, OM_uint32 minor)
+void auth_gssapi_display_status(msg, major, minor)
+ char *msg;
+ OM_uint32 major;
+ OM_uint32 minor;
{
auth_gssapi_display_status_1(msg, major, GSS_C_GSS_CODE, 0);
auth_gssapi_display_status_1(msg, minor, GSS_C_MECH_CODE, 0);
}
-static void auth_gssapi_display_status_1(char *m, OM_uint32 code, int type,
- int rec)
+static void auth_gssapi_display_status_1(m, code, type, rec)
+ char *m;
+ OM_uint32 code;
+ int type;
+ int rec;
{
OM_uint32 gssstat, minor_stat;
gss_buffer_desc msg;
auth_gssapi_display_status_1(m, minor_stat,
GSS_C_MECH_CODE, 1);
} else
- fprintf(stderr,"GSS-API authentication error %s: "
- "recursive failure!\n", msg);
+ fprintf(stderr,
+ "GSS-API authentication error %s: recursive failure!\n",
+ msg);
return;
}
#define ENDRPCENT_TYPE int
#endif
-SETRPCENT_TYPE setrpcent(int);
-ENDRPCENT_TYPE endrpcent(void);
+/*
+ * Make sure we have a definition for PROTOTYPE.
+ */
+#if !defined(PROTOTYPE)
+#if defined(__STDC__) || defined(_MSDOS) || defined(_WIN32) || defined(__ultrix)
+#define PROTOTYPE(x) x
+#else
+#define PROTOTYPE(x) ()
+#endif
+#endif
+
+SETRPCENT_TYPE setrpcent
+PROTOTYPE((int));
+ENDRPCENT_TYPE endrpcent
+PROTOTYPE((void));
/*
* Internet version.
* $Source$
*
* $Log$
+ * 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.
static bool_t svc_auth_gssapi_wrap();
static bool_t svc_auth_gssapi_unwrap();
static svc_auth_gssapi_data *create_client();
-static svc_auth_gssapi_data *get_client(gss_buffer_t client_handle);
-static void destroy_client(svc_auth_gssapi_data *client_data);
+static svc_auth_gssapi_data *get_client
+PROTOTYPE((gss_buffer_t client_handle));
+static void destroy_client
+PROTOTYPE((svc_auth_gssapi_data *client_data));
static void clean_client(), cleanup();
-static void client_expire(svc_auth_gssapi_data *client_data, rpc_u_int32 exp);
-static void dump_db(char *msg);
+static void client_expire
+PROTOTYPE((svc_auth_gssapi_data *client_data, rpc_u_int32 exp));
+static void dump_db
+PROTOTYPE((char *msg));
struct svc_auth_ops svc_auth_gssapi_ops = {
svc_auth_gssapi_wrap,
}
XDR_DESTROY(&xdrs);
- PRINTF(("svcauth_gssapi: got credentials, version %d, "
- "client_handle len %d\n", creds.version,
- creds.client_handle.length));
+ PRINTF(("svcauth_gssapi: got credentials, version %d, client_handle len %d\n",
+ creds.version, creds.client_handle.length));
if (creds.version != 2) {
PRINTF(("svcauth_gssapi: bad credential version\n"));
* would break the rep invariant. Now the database is an unsorted
* linked list, so it doesn't matter.
*/
-static void client_expire(svc_auth_gssapi_data *client_data, rpc_u_int32 exp)
+static void client_expire(client_data, exp)
+ svc_auth_gssapi_data *client_data;
+ rpc_u_int32 exp;
{
client_data->expiration = exp;
}
* matches the contents of client_handle, or returns NULL if none was
* found.
*/
-static svc_auth_gssapi_data *get_client(gss_buffer_t client_handle)
+static svc_auth_gssapi_data *get_client(client_handle)
+ gss_buffer_t client_handle;
{
client_list *c;
rpc_u_int32 handle;
* client_data's entry in the database is destroyed. client_data is
* freed.
*/
-static void destroy_client(svc_auth_gssapi_data *client_data)
+static void destroy_client(client_data)
+ svc_auth_gssapi_data *client_data;
{
OM_uint32 gssstat, minor_stat;
gss_buffer_desc out_buf;
#endif
}
-static void dump_db(char *msg)
+static void dump_db(msg)
+ char *msg;
{
svc_auth_gssapi_data *client_data;
client_list *c;
*
* See functional specifications.
*/
-bool_t _svcauth_gssapi_set_names(auth_gssapi_name *names, int num)
+bool_t _svcauth_gssapi_set_names(names, num)
+ auth_gssapi_name *names;
+ int num;
{
OM_uint32 gssstat, minor_stat;
gss_buffer_desc in_buf;
* See functional specifications.
*/
void _svcauth_gssapi_set_log_badauth_func
- (auth_gssapi_log_badauth_func func, caddr_t data)
+ (func, data)
+ auth_gssapi_log_badauth_func func;
+ caddr_t data;
{
log_badauth = func;
log_badauth_data = data;
* See functional specifications.
*/
void _svcauth_gssapi_set_log_badverf_func
- (auth_gssapi_log_badverf_func func, caddr_t data)
+ (func, data)
+ auth_gssapi_log_badverf_func func;
+ caddr_t data;
{
log_badverf = func;
log_badverf_data = data;
* See functional specifications.
*/
void _svcauth_gssapi_set_log_miscerr_func
- (auth_gssapi_log_miscerr_func func, caddr_t data)
+ (func, data)
+ auth_gssapi_log_miscerr_func func;
+ caddr_t data;
{
log_miscerr = func;
log_miscerr_data = data;
#ifndef __XDR_HEADER__
#define __XDR_HEADER__
+/*
+ * Make sure we have a definition for PROTOTYPE.
+ */
+#if !defined(PROTOTYPE)
+#if defined(__STDC__) || defined(_MSDOS) || defined(_WIN32) || defined(__ultrix)
+#define PROTOTYPE(x) x
+#else
+#define PROTOTYPE(x) ()
+#endif
+#endif
+
/*
* XDR provides a conventional way for converting between C data
* types and an external bit-string representation. Library supplied
* These are the "generic" xdr routines.
*/
extern bool_t xdr_void();
-extern bool_t xdr_int(XDR *, int *);
-extern bool_t xdr_u_int(XDR *, unsigned int *);
-extern bool_t xdr_long(XDR *, long *);
-extern bool_t xdr_u_long(XDR *, unsigned long *);
-extern bool_t xdr_short(XDR *, short *);
-extern bool_t xdr_u_short(XDR *, unsigned short *);
-extern bool_t xdr_bool(XDR *, bool_t *);
-extern bool_t xdr_enum(XDR *, enum_t *);
-extern bool_t xdr_array(XDR *, caddr_t *, unsigned int*, unsigned int, unsigned int, xdrproc_t);
-extern bool_t xdr_bytes(XDR *, char **, unsigned int *, unsigned int);
-extern bool_t xdr_opaque(XDR *, caddr_t, unsigned int);
-extern bool_t xdr_string(XDR *, char **, unsigned int);
-extern bool_t xdr_union(XDR *, enum_t *, char *, struct xdr_discrim *, xdrproc_t);
-extern bool_t xdr_char(XDR *, char *);
-extern bool_t xdr_u_char(XDR *, char *);
-extern bool_t xdr_vector(XDR *, char *, unsigned int, unsigned int, xdrproc_t);
-extern bool_t xdr_float(XDR *, float *);
-extern bool_t xdr_double(XDR *, double *);
-extern bool_t xdr_reference(XDR *, caddr_t *, unsigned int, xdrproc_t);
-extern bool_t xdr_pointer(XDR *, char **, unsigned int, xdrproc_t);
-extern bool_t xdr_wrapstring(XDR *, char **);
+extern bool_t xdr_int
+PROTOTYPE((XDR *, int *));
+extern bool_t xdr_u_int
+PROTOTYPE((XDR *, unsigned int *));
+extern bool_t xdr_long
+PROTOTYPE((XDR *, long *));
+extern bool_t xdr_u_long
+PROTOTYPE((XDR *, unsigned long *));
+extern bool_t xdr_short
+PROTOTYPE((XDR *, short *));
+extern bool_t xdr_u_short
+PROTOTYPE((XDR *, unsigned short *));
+extern bool_t xdr_bool
+PROTOTYPE((XDR *, bool_t *));
+extern bool_t xdr_enum
+PROTOTYPE((XDR *, enum_t *));
+extern bool_t xdr_array
+PROTOTYPE((XDR *, caddr_t *, unsigned int*, unsigned int, unsigned int, xdrproc_t));
+extern bool_t xdr_bytes
+PROTOTYPE((XDR *, char **, unsigned int *, unsigned int));
+extern bool_t xdr_opaque
+PROTOTYPE((XDR *, caddr_t, unsigned int));
+extern bool_t xdr_string
+PROTOTYPE((XDR *, char **, unsigned int));
+extern bool_t xdr_union
+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 *));
+extern bool_t xdr_vector
+PROTOTYPE((XDR *, char *, unsigned int, unsigned int, xdrproc_t));
+extern bool_t xdr_float
+PROTOTYPE((XDR *, float *));
+extern bool_t xdr_double
+PROTOTYPE((XDR *, double *));
+extern bool_t xdr_reference
+PROTOTYPE((XDR *, caddr_t *, unsigned int, xdrproc_t));
+extern bool_t xdr_pointer
+PROTOTYPE((XDR *, char **, unsigned int, xdrproc_t));
+extern bool_t xdr_wrapstring
+PROTOTYPE((XDR *, char **));
/*
* Common opaque bytes objects used by many rpc protocols;
char *n_bytes;
};
typedef struct netobj netobj;
-extern bool_t xdr_netobj(XDR *, struct netobj *);
+extern bool_t xdr_netobj
+PROTOTYPE((XDR *, struct netobj *));
-extern bool_t xdr_int32(XDR *, rpc_int32 *);
-extern bool_t xdr_u_int32(XDR *, rpc_u_int32 *);
+extern bool_t xdr_int32
+PROTOTYPE((XDR *, rpc_int32 *));
+extern bool_t xdr_u_int32
+PROTOTYPE((XDR *, rpc_u_int32 *));
/*
* These are the public routines for the various implementations of