diff options
author | J. Bruce Fields <bfields@fieldses.org> | 2006-12-05 04:22:42 +0300 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-12-06 18:46:48 +0300 |
commit | 94efa93435383b08d822a40f24ff6f6ce1a888df (patch) | |
tree | d89f72c71ab1ea6c0a6ce5ef8af3ece1c2f510fa /net/sunrpc/auth_gss/gss_krb5_unseal.c | |
parent | 717757ad1038ab6aacb89bad579c89b006efd913 (diff) | |
download | linux-94efa93435383b08d822a40f24ff6f6ce1a888df.tar.xz |
rpcgss: krb5: miscellaneous cleanup
Miscellaneous cosmetic fixes.
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_unseal.c')
-rw-r--r-- | net/sunrpc/auth_gss/gss_krb5_unseal.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/net/sunrpc/auth_gss/gss_krb5_unseal.c b/net/sunrpc/auth_gss/gss_krb5_unseal.c index 75a75a6d1336..87f8977ccece 100644 --- a/net/sunrpc/auth_gss/gss_krb5_unseal.c +++ b/net/sunrpc/auth_gss/gss_krb5_unseal.c @@ -99,16 +99,14 @@ gss_verify_mic_kerberos(struct gss_ctx *gss_ctx, /* XXX sanity-check bodysize?? */ signalg = ptr[0] + (ptr[1] << 8); - sealalg = ptr[2] + (ptr[3] << 8); - - /* Sanity checks */ - - if ((ptr[4] != 0xff) || (ptr[5] != 0xff)) + if (signalg != SGN_ALG_DES_MAC_MD5) return GSS_S_DEFECTIVE_TOKEN; - if (sealalg != 0xffff) + sealalg = ptr[2] + (ptr[3] << 8); + if (sealalg != SEAL_ALG_NONE) return GSS_S_DEFECTIVE_TOKEN; - if (signalg != SGN_ALG_DES_MAC_MD5) + + if ((ptr[4] != 0xff) || (ptr[5] != 0xff)) return GSS_S_DEFECTIVE_TOKEN; if (make_checksum("md5", ptr - 2, 8, message_buffer, 0, &md5cksum)) |