* First, define the three platform-dependent pointer types.
*/
-typedef void * gss_name_t;
-typedef void * gss_cred_id_t;
-typedef void * gss_ctx_id_t;
+struct gss_name_struct;
+typedef struct gss_name_struct * gss_name_t;
+
+struct gss_cred_id_struct;
+typedef struct gss_cred_id_struct * gss_cred_id_t;
+
+struct gss_ctx_id_struct;
+typedef struct gss_ctx_id_struct * gss_ctx_id_t;
/*
* The following type must be defined as the smallest natural unsigned integer
int g_set_entry_delete (g_set_elt *s, void *key);
int g_set_entry_get (g_set_elt *s, void *key, void **value);
-int g_save_name (g_set *vdb, gss_name_t *name);
-int g_save_cred_id (g_set *vdb, gss_cred_id_t *cred);
-int g_save_ctx_id (g_set *vdb, gss_ctx_id_t *ctx);
+int g_save_name (g_set *vdb, gss_name_t name);
+int g_save_cred_id (g_set *vdb, gss_cred_id_t cred);
+int g_save_ctx_id (g_set *vdb, gss_ctx_id_t ctx);
int g_save_lucidctx_id (g_set *vdb, void *lctx);
-int g_validate_name (g_set *vdb, gss_name_t *name);
-int g_validate_cred_id (g_set *vdb, gss_cred_id_t *cred);
-int g_validate_ctx_id (g_set *vdb, gss_ctx_id_t *ctx);
+int g_validate_name (g_set *vdb, gss_name_t name);
+int g_validate_cred_id (g_set *vdb, gss_cred_id_t cred);
+int g_validate_ctx_id (g_set *vdb, gss_ctx_id_t ctx);
int g_validate_lucidctx_id (g_set *vdb, void *lctx);
-int g_delete_name (g_set *vdb, gss_name_t *name);
-int g_delete_cred_id (g_set *vdb, gss_cred_id_t *cred);
-int g_delete_ctx_id (g_set *vdb, gss_ctx_id_t *ctx);
+int g_delete_name (g_set *vdb, gss_name_t name);
+int g_delete_cred_id (g_set *vdb, gss_cred_id_t cred);
+int g_delete_ctx_id (g_set *vdb, gss_ctx_id_t ctx);
int g_delete_lucidctx_id (g_set *vdb, void *lctx);
int g_make_string_buffer (const char *str, gss_buffer_t buffer);
int g_save_name(vdb, name)
g_set *vdb;
- gss_name_t *name;
+ gss_name_t name;
{
return(g_save(vdb, V_NAME, (void *) name));
}
int g_save_cred_id(vdb, cred)
g_set *vdb;
- gss_cred_id_t *cred;
+ gss_cred_id_t cred;
{
return(g_save(vdb, V_CRED_ID, (void *) cred));
}
int g_save_ctx_id(vdb, ctx)
g_set *vdb;
- gss_ctx_id_t *ctx;
+ gss_ctx_id_t ctx;
{
return(g_save(vdb, V_CTX_ID, (void *) ctx));
}
int g_validate_name(vdb, name)
g_set *vdb;
- gss_name_t *name;
+ gss_name_t name;
{
return(g_validate(vdb, V_NAME, (void *) name));
}
int g_validate_cred_id(vdb, cred)
g_set *vdb;
- gss_cred_id_t *cred;
+ gss_cred_id_t cred;
{
return(g_validate(vdb, V_CRED_ID, (void *) cred));
}
int g_validate_ctx_id(vdb, ctx)
g_set *vdb;
- gss_ctx_id_t *ctx;
+ gss_ctx_id_t ctx;
{
return(g_validate(vdb, V_CTX_ID, (void *) ctx));
}
int g_delete_name(vdb, name)
g_set *vdb;
- gss_name_t *name;
+ gss_name_t name;
{
return(g_delete(vdb, V_NAME, (void *) name));
}
int g_delete_cred_id(vdb, cred)
g_set *vdb;
- gss_cred_id_t *cred;
+ gss_cred_id_t cred;
{
return(g_delete(vdb, V_CRED_ID, (void *) cred));
}
int g_delete_ctx_id(vdb, ctx)
g_set *vdb;
- gss_ctx_id_t *ctx;
+ gss_ctx_id_t ctx;
{
return(g_delete(vdb, V_CTX_ID, (void *) ctx));
}
if (ret_flags)
*ret_flags = ctx->gss_flags;
- *context_handle = ctx;
+ *context_handle = (gss_ctx_id_t)ctx;
*output_token = token;
if (src_name)
*output_token = token;
}
if (!verifier_cred_handle && cred_handle) {
- krb5_gss_release_cred(minor_status, cred_handle);
+ krb5_gss_release_cred(minor_status, &cred_handle);
}
krb5_free_context(context);
return (major_status);
/* set the outputs */
- if (GSS_ERROR(major_status = krb5_gss_inquire_cred(minor_status, cred,
+ if (GSS_ERROR(major_status = krb5_gss_inquire_cred(minor_status,
+ (gss_cred_id_t)cred,
NULL, &lifetime,
NULL, actual_mechs))) {
OM_uint32 dummy;
*acceptor_time_rec = lifetime;
if (output_cred_handle)
- *output_cred_handle = cred;
+ *output_cred_handle = (gss_cred_id_t)cred;
krb5_free_context(context);
*minor_status = 0;
return(GSS_S_NO_CONTEXT);
}
- ctx = (gss_ctx_id_t) *context_handle;
+ ctx = (krb5_gss_ctx_id_t) *context_handle;
context = ctx->k5_context;
/* construct a delete context token if necessary */
return(GSS_S_CALL_BAD_STRUCTURE|GSS_S_BAD_NAME);
}
- princ = input_name;
+ princ = (krb5_principal)input_name;
if ((code = krb5_copy_principal(context, princ, &outprinc))) {
*minor_status = code;
krb5_free_context(context);
return(GSS_S_NO_CONTEXT);
}
- ctx = (gss_ctx_id_t) *context_handle;
+ ctx = (krb5_gss_ctx_id_t) *context_handle;
/* make sure the context is non-established, and that certain
arguments are unchanged */
/* verify the credential, or use the default */
/*SUPPRESS 29*/
if (claimant_cred_handle == GSS_C_NO_CREDENTIAL) {
- major_status = kg_get_defcred(minor_status, &cred);
+ major_status = kg_get_defcred(minor_status, (gss_cred_id_t *)&cred);
if (major_status && GSS_ERROR(major_status)) {
if (*context_handle == GSS_C_NO_CONTEXT)
krb5_free_context(context);
if (err) {
k5_mutex_unlock(&cred->lock);
if (claimant_cred_handle == GSS_C_NO_CREDENTIAL)
- krb5_gss_release_cred(minor_status, (gss_cred_id_t)&cred);
+ krb5_gss_release_cred(minor_status, (gss_cred_id_t *)&cred);
*minor_status = 0;
if (*context_handle == GSS_C_NO_CONTEXT)
krb5_free_context(context);
}
if (claimant_cred_handle == GSS_C_NO_CREDENTIAL)
- krb5_gss_release_cred(&tmp_min_stat, (gss_cred_id_t)&cred);
+ krb5_gss_release_cred(&tmp_min_stat, (gss_cred_id_t *)&cred);
return(major_status);
}
if (cred_handle == GSS_C_NO_CREDENTIAL) {
OM_uint32 major;
- if ((major = kg_get_defcred(minor_status, (gss_cred_id_t)&cred)) &&
+ if ((major = kg_get_defcred(minor_status, (gss_cred_id_t *)&cred)) &&
GSS_ERROR(major)) {
krb5_free_context(context);
return(major);
if (ret_name != NULL && ! kg_save_name((gss_name_t) ret_name)) {
k5_mutex_unlock(&cred->lock);
if (cred_handle == GSS_C_NO_CREDENTIAL)
- krb5_gss_release_cred(minor_status, (gss_cred_id_t)&cred);
+ krb5_gss_release_cred(minor_status, (gss_cred_id_t *)&cred);
(void) gss_release_oid_set(minor_status, &mechs);
krb5_free_principal(context, ret_name);
*mechanisms = mechs;
if (cred_handle == GSS_C_NO_CREDENTIAL)
- krb5_gss_release_cred(minor_status, (gss_cred_id_t)&cred);
+ krb5_gss_release_cred(minor_status, (gss_cred_id_t *)&cred);
krb5_free_context(context);
*minor_status = 0;
if (cred_handle == GSS_C_NO_CREDENTIAL) {
OM_uint32 tmp_min_stat;
- krb5_gss_release_cred(&tmp_min_stat, (gss_cred_id_t)&cred);
+ krb5_gss_release_cred(&tmp_min_stat, (gss_cred_id_t *)&cred);
}
krb5_free_context(context);
return ret;
return(GSS_S_NO_CONTEXT);
}
- ctx = (krb5_gss_ctx_id_rec *) context_handle;
+ ctx = (krb5_gss_ctx_id_t) context_handle;
if (! ctx->established) {
*minor_status = KG_CTX_INCOMPLETE;
/* "unseal" the token */
- if (GSS_ERROR(majerr = kg_unseal(minor_status, ctx, token_buffer,
+ if (GSS_ERROR(majerr = kg_unseal(minor_status, context_handle,
+ token_buffer,
GSS_C_NO_BUFFER, NULL, NULL,
KG_TOK_DEL_CTX)))
return(majerr);
return(GSS_S_CALL_BAD_STRUCTURE|GSS_S_NO_CRED);
}
- cred = *cred_handle;
+ cred = (krb5_gss_cred_id_t)*cred_handle;
k5_mutex_destroy(&cred->lock);
/* ignore error destroying mutex */
if (major_status != GSS_S_COMPLETE)
goto allocation_failure;
- *external_name = union_name;
+ *external_name = /*(gss_name_t) CHECK */union_name;
return (GSS_S_COMPLETE);
allocation_failure:
/*
* Array of context IDs typed by mechanism OID
*/
-typedef struct gss_union_ctx_id_t {
+typedef struct gss_ctx_id_struct {
gss_OID mech_type;
gss_ctx_id_t internal_ctx_id;
} gss_union_ctx_id_desc, *gss_union_ctx_id_t;
* Generic GSSAPI names. A name can either be a generic name, or a
* mechanism specific name....
*/
-typedef struct gss_union_name_t {
+typedef struct gss_name_struct {
gss_OID name_type;
gss_buffer_t external_name;
/*
/*
* Set of Credentials typed on mechanism OID
*/
-typedef struct gss_union_cred_t {
+typedef struct gss_cred_id_struct {
int count;
gss_OID mechs_array;
gss_cred_id_t *cred_array;