import_sec_context.c revision 5e01956f3000408c2a2c5a08c8d0acf2c2a9d8ee
/*
*/
/*
*
* Copyright 1995,2004 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
* Export of this software from the United States of America may
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
*
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
* notice appear in all copies and that both that copyright notice and
* this permission notice appear in supporting documentation, and that
* the name of M.I.T. not be used in advertising or publicity pertaining
* to distribution of the software without specific, written prior
* permission. Furthermore if you modify this software you must label
* your software as modified software and not distribute it in such a
* fashion that it might be confused with the original M.I.T. software.
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
*
*/
/*
* import_sec_context.c - Internalize the security context.
*/
#include "gssapiP_krb5.h"
/* for serialization initialization functions */
#include "k5-int.h"
#include "mglueP.h" /* SUNW15resync - for KGSS_ macros */
#ifdef _KERNEL
#endif
/*
* Fix up the OID of the mechanism so that uses the static version of
* the OID if possible.
*/
{
const gss_OID_desc *p;
for (p = krb5_gss_oid_array; p->length; p++) {
return (gss_OID) p;
}
}
return oid;
}
{
#ifndef _KERNEL
#endif
};
int i;
return code;
return 0;
}
{
krb5_error_code kret = 0;
/* This is a bit screwy. We create a krb5 context because we need
one when calling the serialization code. However, one of the
objects we're unpacking is a krb5 context, so when we finish,
we can throw this one away. */
if (kret) {
*minor_status = kret;
return GSS_S_FAILURE;
}
if (kret) {
*minor_status = kret;
return GSS_S_FAILURE;
}
/* Assume a tragic failure */
*minor_status = 0;
/* Internalize the context */
/*
* SUNW15resync
*
* krb5_free_context(context);
* Previous versions of MIT(1.2ish)/Solaris did not serialize the
* k5_context but MIT 1.5 does. But we don't need all the userspace
* junk in the kernel so we continue to not serialize it.
* So we keep this context live here (see it's use in kg_ctx_internalize)
* and it will get freed by delete_sec_context.
*/
if (kret) {
return(GSS_S_FAILURE);
}
/* intern the context handle */
#ifdef _KERNEL
,0 /* gssd_ctx_verifier */
#endif
);
return(GSS_S_FAILURE);
}
*minor_status = 0;
return (GSS_S_COMPLETE);
}