/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 1993 by OpenVision Technologies, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appears in all copies and
* that both that copyright notice and this permission notice appear in
* supporting documentation, and that the name of OpenVision not be used
* in advertising or publicity pertaining to distribution of the software
* without specific, written prior permission. OpenVision makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
* OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
* USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/*
* Copyright (c) 2006-2008, Novell, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* * The copyright holder's name is not used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/*
* $Id: krb5_gss_glue.c 23393 2009-11-30 22:29:48Z tsitkova $
*/
/*
*/
#include "gssapiP_krb5.h"
#include "mglueP.h" /* Solaris Kerberos */
{
if (ticket_flags == NULL)
return GSS_S_CALL_INACCESSIBLE_WRITE;
&data_set);
if (major_status != GSS_S_COMPLETE)
return major_status;
if (data_set == GSS_C_NO_BUFFER_SET ||
*minor_status = EINVAL;
return GSS_S_FAILURE;
}
*minor_status = 0;
return GSS_S_COMPLETE;
}
{
if (out_ccache == NULL)
return GSS_S_CALL_INACCESSIBLE_WRITE;
/*
* Solaris Kerberos: we don't support calling libgss from the krb mech so
* we call krb mech interface krb5_gssspi_set_cred_option directly. Done
* several times below.
*/
&req_buffer);
return major_status;
}
/* Solaris Kerberos: not supported yet */
#if 0 /************** Begin IFDEF'ed OUT *******************************/
void **kctx)
{
return GSS_S_CALL_INACCESSIBLE_WRITE;
(int)version,
&req_oid);
if (GSS_ERROR(major_status))
return major_status;
&req_oid,
&data_set);
if (GSS_ERROR(major_status))
return major_status;
if (data_set == GSS_C_NO_BUFFER_SET ||
*minor_status = EINVAL;
return GSS_S_FAILURE;
}
/* Clean up the context state (it is an error for
* someone to attempt to use this context again)
*/
return GSS_S_COMPLETE;
}
#endif /**************** END IFDEF'ed OUT *******************************/
{
cred,
&req_buffer);
return major_status;
}
const char *name,
const char **out_name)
{
/*
* Solaris Kerberos: we don't support calling libgss from the krb mech so
* we call krb mech interface krb5_gssspi_mech_invoke directly. Done
* several times below.
*/
&req_buffer);
return major_status;
}
{
&req_buffer);
return major_status;
}
{
&req_buffer);
return major_status;
}
krb5_gss_use_kdc_context(void)
{
req_buffer.length = 0;
&req_buffer);
if (major_status != GSS_S_COMPLETE) {
if (minor_status != 0)
else
} else
ret = 0;
return ret;
}
/*
* This API should go away and be replaced with an accessor
* into a gss_name_t.
*/
int ad_type,
{
return GSS_S_CALL_INACCESSIBLE_WRITE;
&req_oid);
if (GSS_ERROR(major_status))
return major_status;
&data_set);
if (major_status != GSS_S_COMPLETE) {
return major_status;
}
/* Solaris Kerberos */
*minor_status = EINVAL;
return GSS_S_FAILURE;
}
return GSS_S_COMPLETE;
}
/* Solaris Kerberos: not supported yet */
{
cred,
&req_buffer);
return major_status;
}
{
return GSS_S_CALL_INACCESSIBLE_WRITE;
&data_set);
if (major_status != GSS_S_COMPLETE)
return major_status;
if (data_set == GSS_C_NO_BUFFER_SET ||
*minor_status = EINVAL;
return GSS_S_FAILURE;
}
*minor_status = 0;
return GSS_S_COMPLETE;
}