X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fptlrpc%2Fgss%2Fgss_mech_switch.c;h=8a4e62744900f2cb7659a90fb1a236d216c6f280;hb=6e181506b8fac3e99029ffc354dbfb7290f78b7f;hp=53e11e6fed9398e3a29caf597b822ba326e0c6c0;hpb=8a41cc258a4cf12f779b82c32d98e9696aa49833;p=fs%2Flustre-release.git diff --git a/lustre/ptlrpc/gss/gss_mech_switch.c b/lustre/ptlrpc/gss/gss_mech_switch.c index 53e11e6..8a4e627 100644 --- a/lustre/ptlrpc/gss/gss_mech_switch.c +++ b/lustre/ptlrpc/gss/gss_mech_switch.c @@ -2,8 +2,9 @@ * vim:expandtab:shiftwidth=8:tabstop=8: * * Modifications for Lustre - * Copyright 2004 - 2006, Cluster File Systems, Inc. - * All rights reserved + * + * Copyright 2008 Sun Microsystems, Inc. All rights reserved + * * Author: Eric Mei */ @@ -67,7 +68,7 @@ #include "gss_internal.h" #include "gss_api.h" -static LIST_HEAD(registered_mechs); +static CFS_LIST_HEAD(registered_mechs); static spinlock_t registered_mechs_lock = SPIN_LOCK_UNLOCKED; int lgss_mech_register(struct gss_api_mech *gm) @@ -245,23 +246,8 @@ __u32 lgss_verify_mic(struct gss_ctx *context_handle, mic_token); } -#if 0 -__u32 lgss_wrap(struct gss_ctx *context_handle, - __u32 qop, - rawobj_buf_t *inbuf, - rawobj_t *outbuf) -{ - LASSERT(context_handle); - LASSERT(context_handle->mech_type); - LASSERT(context_handle->mech_type->gm_ops); - LASSERT(context_handle->mech_type->gm_ops->gss_wrap); - - return context_handle->mech_type->gm_ops - ->gss_wrap(context_handle, qop, inbuf, outbuf); -} -#endif - __u32 lgss_wrap(struct gss_ctx *context_handle, + rawobj_t *gsshdr, rawobj_t *msg, int msg_buflen, rawobj_t *out_token) @@ -272,10 +258,11 @@ __u32 lgss_wrap(struct gss_ctx *context_handle, LASSERT(context_handle->mech_type->gm_ops->gss_wrap); return context_handle->mech_type->gm_ops - ->gss_wrap(context_handle, msg, msg_buflen, out_token); + ->gss_wrap(context_handle, gsshdr, msg, msg_buflen, out_token); } __u32 lgss_unwrap(struct gss_ctx *context_handle, + rawobj_t *gsshdr, rawobj_t *token, rawobj_t *out_msg) { @@ -285,11 +272,12 @@ __u32 lgss_unwrap(struct gss_ctx *context_handle, LASSERT(context_handle->mech_type->gm_ops->gss_unwrap); return context_handle->mech_type->gm_ops - ->gss_unwrap(context_handle, token, out_msg); + ->gss_unwrap(context_handle, gsshdr, token, out_msg); } __u32 lgss_plain_encrypt(struct gss_ctx *ctx, + int decrypt, int length, void *in_buf, void *out_buf) @@ -300,7 +288,7 @@ __u32 lgss_plain_encrypt(struct gss_ctx *ctx, LASSERT(ctx->mech_type->gm_ops->gss_plain_encrypt); return ctx->mech_type->gm_ops - ->gss_plain_encrypt(ctx, length, in_buf, out_buf); + ->gss_plain_encrypt(ctx, decrypt, length, in_buf, out_buf); } /* gss_delete_sec_context: free all resources associated with context_handle.