Changeset View
Changeset View
Standalone View
Standalone View
sys/kgssapi/gss_delete_sec_context.c
Show All 25 Lines | |||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
* SUCH DAMAGE. | * SUCH DAMAGE. | ||||
*/ | */ | ||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
__FBSDID("$FreeBSD$"); | __FBSDID("$FreeBSD$"); | ||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/jail.h> | |||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/kobj.h> | #include <sys/kobj.h> | ||||
#include <sys/lock.h> | #include <sys/lock.h> | ||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <sys/mutex.h> | #include <sys/mutex.h> | ||||
#include <kgssapi/gssapi.h> | #include <kgssapi/gssapi.h> | ||||
#include <kgssapi/gssapi_impl.h> | #include <kgssapi/gssapi_impl.h> | ||||
#include "gssd.h" | #include "gssd.h" | ||||
OM_uint32 | OM_uint32 | ||||
gss_delete_sec_context(OM_uint32 *minor_status, gss_ctx_id_t *context_handle, | gss_delete_sec_context(OM_uint32 *minor_status, gss_ctx_id_t *context_handle, | ||||
gss_buffer_t output_token) | gss_buffer_t output_token) | ||||
{ | { | ||||
struct delete_sec_context_res res; | struct delete_sec_context_res res; | ||||
struct delete_sec_context_args args; | struct delete_sec_context_args args; | ||||
enum clnt_stat stat; | enum clnt_stat stat; | ||||
gss_ctx_id_t ctx; | gss_ctx_id_t ctx; | ||||
CLIENT *cl; | CLIENT *cl; | ||||
*minor_status = 0; | *minor_status = 0; | ||||
if (!kgss_gssd_handle) | KGSS_CURVNET_SET_QUIET(KGSS_TD_TO_VNET(curthread)); | ||||
if (!KGSS_VNET(kgss_gssd_handle)) { | |||||
KGSS_CURVNET_RESTORE(); | |||||
return (GSS_S_FAILURE); | return (GSS_S_FAILURE); | ||||
} | |||||
KGSS_CURVNET_RESTORE(); | |||||
if (*context_handle) { | if (*context_handle) { | ||||
ctx = *context_handle; | ctx = *context_handle; | ||||
/* | /* | ||||
* If we are past the context establishment phase, let | * If we are past the context establishment phase, let | ||||
* the in-kernel code do the delete, otherwise | * the in-kernel code do the delete, otherwise | ||||
* userland needs to deal with it. | * userland needs to deal with it. | ||||
Show All 34 Lines |