Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 192281
b: refs/heads/master
c: 1dbd902
h: refs/heads/master
i:
  192279: 97122f9
v: v3
  • Loading branch information
Kevin Coffman authored and Trond Myklebust committed May 14, 2010
1 parent bfb0db7 commit 20757b5
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fc263a917afad3bda7b823a6edc803a40e7f6015
refs/heads/master: 1dbd9029f3024d058da1cf6c6658c28aac2e4e1c
5 changes: 3 additions & 2 deletions trunk/include/linux/sunrpc/gss_krb5.h
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,13 @@ gss_decrypt_xdr_buf(struct crypto_blkcipher *tfm, struct xdr_buf *inbuf,
int offset);

s32
krb5_make_seq_num(struct crypto_blkcipher *key,
krb5_make_seq_num(struct krb5_ctx *kctx,
struct crypto_blkcipher *key,
int direction,
u32 seqnum, unsigned char *cksum, unsigned char *buf);

s32
krb5_get_seq_num(struct crypto_blkcipher *key,
krb5_get_seq_num(struct krb5_ctx *kctx,
unsigned char *cksum,
unsigned char *buf, int *direction, u32 *seqnum);

Expand Down
5 changes: 2 additions & 3 deletions trunk/net/sunrpc/auth_gss/gss_krb5_seal.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,8 @@ gss_get_mic_v1(struct krb5_ctx *ctx, struct xdr_buf *text,
seq_send = ctx->seq_send++;
spin_unlock(&krb5_seq_lock);

if (krb5_make_seq_num(ctx->seq, ctx->initiate ? 0 : 0xff,
seq_send, ptr + GSS_KRB5_TOK_HDR_LEN,
ptr + 8))
if (krb5_make_seq_num(ctx, ctx->seq, ctx->initiate ? 0 : 0xff,
seq_send, ptr + GSS_KRB5_TOK_HDR_LEN, ptr + 8))
return GSS_S_FAILURE;

return (ctx->endtime < now) ? GSS_S_CONTEXT_EXPIRED : GSS_S_COMPLETE;
Expand Down
6 changes: 4 additions & 2 deletions trunk/net/sunrpc/auth_gss/gss_krb5_seqnum.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
#endif

s32
krb5_make_seq_num(struct crypto_blkcipher *key,
krb5_make_seq_num(struct krb5_ctx *kctx,
struct crypto_blkcipher *key,
int direction,
u32 seqnum,
unsigned char *cksum, unsigned char *buf)
Expand All @@ -61,13 +62,14 @@ krb5_make_seq_num(struct crypto_blkcipher *key,
}

s32
krb5_get_seq_num(struct crypto_blkcipher *key,
krb5_get_seq_num(struct krb5_ctx *kctx,
unsigned char *cksum,
unsigned char *buf,
int *direction, u32 *seqnum)
{
s32 code;
unsigned char plain[8];
struct crypto_blkcipher *key = kctx->seq;

dprintk("RPC: krb5_get_seq_num:\n");

Expand Down
3 changes: 2 additions & 1 deletion trunk/net/sunrpc/auth_gss/gss_krb5_unseal.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ gss_verify_mic_v1(struct krb5_ctx *ctx,

/* do sequencing checks */

if (krb5_get_seq_num(ctx->seq, ptr + GSS_KRB5_TOK_HDR_LEN, ptr + 8, &direction, &seqnum))
if (krb5_get_seq_num(ctx, ptr + GSS_KRB5_TOK_HDR_LEN, ptr + 8,
&direction, &seqnum))
return GSS_S_FAILURE;

if ((ctx->initiate && direction != 0xff) ||
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/sunrpc/auth_gss/gss_krb5_wrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ gss_wrap_kerberos_v1(struct krb5_ctx *kctx, int offset,

/* XXX would probably be more efficient to compute checksum
* and encrypt at the same time: */
if ((krb5_make_seq_num(kctx->seq, kctx->initiate ? 0 : 0xff,
if ((krb5_make_seq_num(kctx, kctx->seq, kctx->initiate ? 0 : 0xff,
seq_send, ptr + GSS_KRB5_TOK_HDR_LEN, ptr + 8)))
return GSS_S_FAILURE;

Expand Down Expand Up @@ -314,8 +314,8 @@ gss_unwrap_kerberos_v1(struct krb5_ctx *kctx, int offset, struct xdr_buf *buf)

/* do sequencing checks */

if (krb5_get_seq_num(kctx->seq, ptr + GSS_KRB5_TOK_HDR_LEN, ptr + 8,
&direction, &seqnum))
if (krb5_get_seq_num(kctx, ptr + GSS_KRB5_TOK_HDR_LEN,
ptr + 8, &direction, &seqnum))
return GSS_S_BAD_SIG;

if ((kctx->initiate && direction != 0xff) ||
Expand Down

0 comments on commit 20757b5

Please sign in to comment.