gss: krb5: remove signalg and sealalg

We designed the krb5 context import without completely understanding the
context.  Now it's clear that there are a number of fields that we ignore,
or that we depend on having one single value.

In particular, we only support one value of signalg currently; so let's
check the signalg field in the downcall (in case we decide there's
something else we could support here eventually), but ignore it otherwise.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
J. Bruce Fields
2006-12-04 20:22:35 -05:00
committed by Trond Myklebust
parent adeb8133dd
commit e678e06bf8
4 changed files with 21 additions and 47 deletions

View File

@ -129,6 +129,7 @@ gss_import_sec_context_kerberos(const void *p,
{
const void *end = (const void *)((const char *)p + len);
struct krb5_ctx *ctx;
int tmp;
if (!(ctx = kzalloc(sizeof(*ctx), GFP_KERNEL)))
goto out_err;
@ -142,9 +143,11 @@ gss_import_sec_context_kerberos(const void *p,
p = simple_get_bytes(p, end, ctx->seed, sizeof(ctx->seed));
if (IS_ERR(p))
goto out_err_free_ctx;
p = simple_get_bytes(p, end, &ctx->signalg, sizeof(ctx->signalg));
p = simple_get_bytes(p, end, &tmp, sizeof(tmp));
if (IS_ERR(p))
goto out_err_free_ctx;
if (tmp != SGN_ALG_DES_MAC_MD5)
goto out_err_free_ctx;
p = simple_get_bytes(p, end, &ctx->sealalg, sizeof(ctx->sealalg));
if (IS_ERR(p))
goto out_err_free_ctx;