Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 104098
b: refs/heads/master
c: 863a248
h: refs/heads/master
v: v3
  • Loading branch information
Kevin Coffman authored and J. Bruce Fields committed Jun 23, 2008
1 parent bfbc247 commit 5feddc3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 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: db8add57898751b9c0ff93ead25f20d21da5ddd0
refs/heads/master: 863a24882ed0a57ff25daaf39885f3a47b706e4b
22 changes: 18 additions & 4 deletions trunk/net/sunrpc/auth_gss/gss_krb5_wrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ gss_krb5_remove_padding(struct xdr_buf *buf, int blocksize)
return 0;
}

static inline void
make_confounder(char *p, int blocksize)
static void
make_confounder(char *p, u32 conflen)
{
static u64 i = 0;
u64 *q = (u64 *)p;
Expand All @@ -102,8 +102,22 @@ make_confounder(char *p, int blocksize)
* uniqueness would mean worrying about atomicity and rollover, and I
* don't care enough. */

BUG_ON(blocksize != 8);
*q = i++;
/* initialize to random value */
if (i == 0) {
i = random32();
i = (i << 32) | random32();
}

switch (conflen) {
case 16:
*q++ = i++;
/* fall through */
case 8:
*q++ = i++;
break;
default:
BUG();
}
}

/* Assumptions: the head and tail of inbuf are ours to play with.
Expand Down

0 comments on commit 5feddc3

Please sign in to comment.