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>
diff --git a/net/sunrpc/auth_gss/gss_krb5_unseal.c b/net/sunrpc/auth_gss/gss_krb5_unseal.c
index 75a75a6..87f8977 100644
--- a/net/sunrpc/auth_gss/gss_krb5_unseal.c
+++ b/net/sunrpc/auth_gss/gss_krb5_unseal.c
@@ -99,18 +99,16 @@
/* XXX sanity-check bodysize?? */
signalg = ptr[0] + (ptr[1] << 8);
- sealalg = ptr[2] + (ptr[3] << 8);
+ if (signalg != SGN_ALG_DES_MAC_MD5)
+ return GSS_S_DEFECTIVE_TOKEN;
- /* Sanity checks */
+ sealalg = ptr[2] + (ptr[3] << 8);
+ if (sealalg != SEAL_ALG_NONE)
+ return GSS_S_DEFECTIVE_TOKEN;
if ((ptr[4] != 0xff) || (ptr[5] != 0xff))
return GSS_S_DEFECTIVE_TOKEN;
- if (sealalg != 0xffff)
- return GSS_S_DEFECTIVE_TOKEN;
- if (signalg != SGN_ALG_DES_MAC_MD5)
- return GSS_S_DEFECTIVE_TOKEN;
-
if (make_checksum("md5", ptr - 2, 8, message_buffer, 0, &md5cksum))
return GSS_S_FAILURE;