k5mech.c revision 505d05c73a6e56769f263d4803b22eddd168ee24
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* XXX: I know where to find this header, but it really is using a
* private interface. I dont want to export the gss_mechanism
* structure, so I hide it in a non-published header. Thats ok,
* we know where to find it.
*/
#include <mechglueP.h>
#include <gssapiP_krb5.h>
#include <syslog.h>
#include <libintl.h>
/*
* These are the extern declarations, one group per mechanism. They are
* contained in the files named <mech>_gssd_extern_srvr.conf.
*/
static OM_uint32
PROTOTYPE((void**));
/*
* This is the declaration of the mechs_array table for Kerberos V5.
* If the gss_mechanism structure changes, so should this array! I
* told you it was a private interface!
*/
static struct gss_config krb5_mechanism = {
{9, "\052\206\110\206\367\022\001\002\002"},
0, /* context, to be filled */
/* EXPORT DELETE START */ /* CRYPT DELETE START */
/* EXPORT DELETE END */ /* CRYPT DELETE END */
/* EXPORT DELETE START */ /* CRYPT DELETE START */
/* EXPORT DELETE END */ /* CRYPT DELETE END */
NULL, /* export_name */
/* EXPORT DELETE START */
/* CRYPT DELETE START */
#if 0
/* CRYPT DELETE END */
/* CRYPT DELETE START */
#endif
/* CRYPT DELETE END */
/* EXPORT DELETE END */
};
#include <k5-int.h>
void ** context;
{
/* Solaris Kerberos: the following is a global variable declared
* and initialized in gssapi_krb5.c */
/* static krb5_context kg_context = NULL; */
krb5_error_code errCode = 0;
return (GSS_S_FAILURE);
if (kg_context) {
*context = kg_context;
return (GSS_S_COMPLETE);
}
goto error;
kg_context = 0;
goto error;
}
*context = kg_context;
return (GSS_S_COMPLETE);
if (errCode != 0) {
"Kerberos mechanism library"
" initialization error: %s."),
error_message((long)errCode));
}
return (GSS_S_FAILURE);
}
/*
* entry point for the gss layer,
* called "krb5_gss_initialize()" in MIT 1.2.1
*/
{
/* ensure that the requested oid matches our oid */
return (NULL);
return (NULL);
return (&krb5_mechanism);
}