/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <strings.h>
#include <errno.h>
#include <syslog.h>
#include <gssapi/gssapi_ext.h>
#include <rpc/rpcsec_defs.h>
/*
* Private data kept per client handle
*/
struct cu_data {
char *cu_outbuf_start;
};
/*
* Internal utility routines.
*/
{
return (FALSE);
return (TRUE);
}
char *
{
}
{
return (FALSE);
return (TRUE);
}
char *
{
char *qop;
return (NULL);
return (qop);
}
{
*num = rpc_gss_svc_none;
else
return (FALSE);
return (TRUE);
}
char *
{
switch (num) {
case rpc_gss_svc_integrity:
return (strdup(SVC_INTEGRITY));
case rpc_gss_svc_privacy:
return (strdup(SVC_PRIVACY));
case rpc_gss_svc_none:
case rpc_gss_svc_default:
return (strdup(SVC_DEFAULT));
default:
return (NULL);
}
}
/*
* Given the user name, node, and security domain, get the mechanism
* specific principal name (for the user name) in exported form.
*/
{
return (FALSE);
"mech oid");
return (FALSE);
}
if (nlen > 0) {
}
if (slen > 0) {
}
/*
* Convert a text string to a GSSAPI Internal name.
*/
"failed 0x%x", major);
return (FALSE);
}
/*
* Convert the GSSAPI Internal name to a MN - Mechanism Name
*/
&gss_canon_name)) != GSS_S_COMPLETE) {
"failed 0x%x", major);
return (FALSE);
}
/*
* Convert the MN Internal name to an exported flat name, so
* it is suitable for binary comparison.
*/
"failed %x", major);
return (FALSE);
}
/*
* Put the exported name into rpc_gss_principal_t structure.
*/
return (FALSE);
}
return (TRUE);
}
/*
* Return supported mechanisms.
*/
char **
__rpc_gss_get_mechanisms(void)
{
return (mech_list);
}
/*
* For a given mechanism, return information about it.
*/
/*
* static char *krb5_qop_list[] = {Q_DEFAULT, NULL};
*/
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
/* Don't know how to get the service type for a given mech. */
/* "service" should NOT be there! */
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*!!!!!!!!!!! */
char **
{
char **l;
if (l == NULL)
return (NULL);
free(l);
return (NULL);
}
/* !!!!!!!!!!!!!!!! */
/* !!!!!!!!!!!!!!!! */
return (l);
}
/*
* Returns highest and lowest versions of RPCSEC_GSS flavor supported.
*/
{
return (TRUE);
}
/*
* Check if a mechanism is installed.
*/
{
char **l;
return (FALSE);
if ((l = __rpc_gss_get_mechanisms()) == NULL)
return (FALSE);
while (*l != NULL) {
return (TRUE);
l++;
}
return (FALSE);
}