diff options
author | J. Bruce Fields <bfields@fieldses.org> | 2006-12-04 20:22:37 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-12-06 10:46:45 -0500 |
commit | 2818bf81a8c91fb29634df68bdc3cc5e003201d0 (patch) | |
tree | 8835e6bc382b43bb4546f3063573d46936ba711c /net/sunrpc/auth_gss/gss_krb5_wrap.c | |
parent | 5eb064f93973def1ec2ab4a46929e94389a6283b (diff) | |
download | op-kernel-dev-2818bf81a8c91fb29634df68bdc3cc5e003201d0.zip op-kernel-dev-2818bf81a8c91fb29634df68bdc3cc5e003201d0.tar.gz |
rpcgss: krb5: kill checksum_type, miscellaneous small cleanup
Previous changes reveal some obvious cruft.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/auth_gss/gss_krb5_wrap.c')
-rw-r--r-- | net/sunrpc/auth_gss/gss_krb5_wrap.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/net/sunrpc/auth_gss/gss_krb5_wrap.c b/net/sunrpc/auth_gss/gss_krb5_wrap.c index a7d5c13..2069371 100644 --- a/net/sunrpc/auth_gss/gss_krb5_wrap.c +++ b/net/sunrpc/auth_gss/gss_krb5_wrap.c @@ -120,7 +120,6 @@ gss_wrap_kerberos(struct gss_ctx *ctx, int offset, struct xdr_buf *buf, struct page **pages) { struct krb5_ctx *kctx = ctx->internal_ctx_id; - s32 checksum_type; char cksumdata[16]; struct xdr_netobj md5cksum = {.len = 0, .data = cksumdata}; int blocksize = 0, plainlen; @@ -134,7 +133,6 @@ gss_wrap_kerberos(struct gss_ctx *ctx, int offset, now = get_seconds(); - checksum_type = CKSUMTYPE_RSA_MD5; if (kctx->sealalg != SEAL_ALG_NONE && kctx->sealalg != SEAL_ALG_DES) { dprintk("RPC: gss_krb5_seal: kctx->sealalg %d not supported\n", kctx->sealalg); @@ -178,7 +176,7 @@ gss_wrap_kerberos(struct gss_ctx *ctx, int offset, /* XXXJBF: UGH!: */ tmp_pages = buf->pages; buf->pages = pages; - if (make_checksum(checksum_type, krb5_hdr, 8, buf, + if (make_checksum(CKSUMTYPE_RSA_MD5, krb5_hdr, 8, buf, offset + headlen - blocksize, &md5cksum)) goto out_err; buf->pages = tmp_pages; @@ -215,7 +213,6 @@ gss_unwrap_kerberos(struct gss_ctx *ctx, int offset, struct xdr_buf *buf) struct krb5_ctx *kctx = ctx->internal_ctx_id; int signalg; int sealalg; - s32 checksum_type; char cksumdata[16]; struct xdr_netobj md5cksum = {.len = 0, .data = cksumdata}; s32 now; @@ -275,12 +272,7 @@ gss_unwrap_kerberos(struct gss_ctx *ctx, int offset, struct xdr_buf *buf) ptr + 22 - (unsigned char *)buf->head[0].iov_base)) goto out; - /* compute the checksum of the message */ - - /* initialize the the cksum */ - checksum_type = CKSUMTYPE_RSA_MD5; - - ret = make_checksum(checksum_type, ptr - 2, 8, buf, + ret = make_checksum(CKSUMTYPE_RSA_MD5, ptr - 2, 8, buf, ptr + 22 - (unsigned char *)buf->head[0].iov_base, &md5cksum); if (ret) goto out; |