/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "mt.h"
#include "rpc_mt.h"
#include <stdio.h>
#include <atomic.h>
#include <dlfcn.h>
typedef struct {
char **(*rpc_gss_get_mechanisms)();
char **(*rpc_gss_get_mech_info)();
int (*rpc_gss_max_data_length)();
int (*rpc_gss_svc_max_data_length)();
void (*rpc_gss_get_error)();
static bool_t
rpcgss_calls_init(void)
{
void *handle;
if (initialized) {
return (TRUE);
}
(void) mutex_lock(&rpcgss_calls_mutex);
if (initialized) {
(void) mutex_unlock(&rpcgss_calls_mutex);
return (TRUE);
}
goto done;
"__rpc_gss_seccreate")) == NULL)
goto done;
"__rpc_gss_set_defaults")) == NULL)
goto done;
"__rpc_gss_get_principal_name")) == NULL)
goto done;
"__rpc_gss_get_mechanisms")) == NULL)
goto done;
"__rpc_gss_get_mech_info")) == NULL)
goto done;
"__rpc_gss_get_versions")) == NULL)
goto done;
"__rpc_gss_is_installed")) == NULL)
goto done;
"__rpc_gss_set_svc_name")) == NULL)
goto done;
"__rpc_gss_set_callback")) == NULL)
goto done;
"__rpc_gss_getcred")) == NULL)
goto done;
"__rpc_gss_mech_to_oid")) == NULL)
goto done;
"__rpc_gss_qop_to_num")) == NULL)
goto done;
"__svcrpcsec_gss")) == NULL)
goto done;
"__rpc_gss_wrap")) == NULL)
goto done;
"__rpc_gss_unwrap")) == NULL)
goto done;
"__rpc_gss_max_data_length")) == NULL)
goto done;
"__rpc_gss_svc_max_data_length")) == NULL)
goto done;
"__rpc_gss_get_error")) == NULL)
goto done;
done:
if (!ret) {
}
initialized = ret;
(void) mutex_unlock(&rpcgss_calls_mutex);
return (ret);
}
AUTH *
char *principal, /* server service principal */
char *mechanism, /* security mechanism */
char *qop, /* requested QOP */
{
if (!rpcgss_calls_init())
return (NULL);
}
{
if (!rpcgss_calls_init())
return (FALSE);
}
char *mechanism,
char *user_name,
char *node,
char *secdomain)
{
if (!rpcgss_calls_init())
return (FALSE);
}
char **
rpc_gss_get_mechanisms(void)
{
if (!rpcgss_calls_init())
return (NULL);
return ((*calls.rpc_gss_get_mechanisms)());
}
char **
{
if (!rpcgss_calls_init())
return (NULL);
}
{
if (!rpcgss_calls_init())
return (FALSE);
}
{
if (!rpcgss_calls_init())
return (FALSE);
}
char *principal, /* server service principal name */
char *mechanism,
{
if (!rpcgss_calls_init())
return (FALSE);
}
{
if (!rpcgss_calls_init())
return (FALSE);
}
{
if (!rpcgss_calls_init())
return (FALSE);
}
{
if (!rpcgss_calls_init())
return (FALSE);
}
{
if (!rpcgss_calls_init())
return (FALSE);
}
enum auth_stat
{
if (!rpcgss_calls_init())
return (AUTH_FAILED);
}
{
if (!rpcgss_calls_init())
return (FALSE);
}
{
if (!rpcgss_calls_init())
return (FALSE);
}
int
{
if (!rpcgss_calls_init())
return (0);
}
int
{
if (!rpcgss_calls_init())
return (0);
}
void
{
if (!rpcgss_calls_init()) {
return;
}
}