]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
gss_krb5: consistently use unsigned for seqnum
authorKevin Coffman <kwc@citi.umich.edu>
Mon, 31 Mar 2008 14:31:33 +0000 (10:31 -0400)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Wed, 23 Apr 2008 20:13:41 +0000 (16:13 -0400)
Consistently use unsigned (u32 vs. s32) for seqnum.

In get_mic function, send the local copy of seq_send,
rather than the context version.

Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
include/linux/sunrpc/gss_krb5.h
net/sunrpc/auth_gss/gss_krb5_seal.c
net/sunrpc/auth_gss/gss_krb5_seqnum.c
net/sunrpc/auth_gss/gss_krb5_unseal.c

index 216738394f6426a8d591c29bf1a35cbb7c2f43ff..a10f1fb0bf7c45dc4998112096b4d1ebb86a105a 100644 (file)
@@ -148,9 +148,9 @@ gss_decrypt_xdr_buf(struct crypto_blkcipher *tfm, struct xdr_buf *inbuf,
 s32
 krb5_make_seq_num(struct crypto_blkcipher *key,
                int direction,
-               s32 seqnum, unsigned char *cksum, unsigned char *buf);
+               u32 seqnum, unsigned char *cksum, unsigned char *buf);
 
 s32
 krb5_get_seq_num(struct crypto_blkcipher *key,
               unsigned char *cksum,
-              unsigned char *buf, int *direction, s32 * seqnum);
+              unsigned char *buf, int *direction, u32 *seqnum);
index 39c08b7e33aff8cb227214e5bd497b6c99d0fb78..8e3c87df5836f1e27c12e0c4ca6b2ed5a97091bf 100644 (file)
@@ -116,7 +116,7 @@ gss_get_mic_kerberos(struct gss_ctx *gss_ctx, struct xdr_buf *text,
        spin_unlock(&krb5_seq_lock);
 
        if (krb5_make_seq_num(ctx->seq, ctx->initiate ? 0 : 0xff,
-                              ctx->seq_send, krb5_hdr + 16, krb5_hdr + 8))
+                             seq_send, krb5_hdr + 16, krb5_hdr + 8))
                return GSS_S_FAILURE;
 
        return (ctx->endtime < now) ? GSS_S_CONTEXT_EXPIRED : GSS_S_COMPLETE;
index 43f3421f1e6a829f640fe4b4ba7874638c86f9bd..f160be6c1a465bfd3d3e87e809f48b22768fe62e 100644 (file)
@@ -43,7 +43,7 @@
 s32
 krb5_make_seq_num(struct crypto_blkcipher *key,
                int direction,
-               s32 seqnum,
+               u32 seqnum,
                unsigned char *cksum, unsigned char *buf)
 {
        unsigned char plain[8];
@@ -65,7 +65,7 @@ s32
 krb5_get_seq_num(struct crypto_blkcipher *key,
               unsigned char *cksum,
               unsigned char *buf,
-              int *direction, s32 * seqnum)
+              int *direction, u32 *seqnum)
 {
        s32 code;
        unsigned char plain[8];
index e30a993466bc2ccb27de86c66656390baecf22dc..d91a5d0048039558bb4af282136ef54b0d2f95e3 100644 (file)
@@ -82,7 +82,7 @@ gss_verify_mic_kerberos(struct gss_ctx *gss_ctx,
        struct xdr_netobj       md5cksum = {.len = 0, .data = cksumdata};
        s32                     now;
        int                     direction;
-       s32                     seqnum;
+       u32                     seqnum;
        unsigned char           *ptr = (unsigned char *)read_token->data;
        int                     bodysize;