[PATCH 07/28] gss_krb5: Use random value to initialize confounder

Chuck Lever chuck.lever at oracle.com
Mon Mar 31 12:28:43 EDT 2008


On Mar 31, 2008, at 12:24 PM, Kevin Coffman wrote:
> On Mon, Mar 31, 2008 at 11:26 AM, Chuck Lever  
> <chuck.lever at oracle.com> wrote:
>> On Mar 31, 2008, at 10:31 AM, Kevin Coffman wrote:
>>> Initialize the value used for the confounder to a random value
>>> rather than starting from zero.
>>> Allow for confounders of length 8 or 16 (which will be needed for
>>> AES).
>>>
>>> Signed-off-by: Kevin Coffman <kwc at citi.umich.edu>
>>> ---
>>>
>>>  net/sunrpc/auth_gss/gss_krb5_wrap.c |   17 ++++++++++++++---
>>>  1 files changed, 14 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/net/sunrpc/auth_gss/gss_krb5_wrap.c b/net/sunrpc/
>>> auth_gss/gss_krb5_wrap.c
>>> index 3cd99a7..89338a4 100644
>>> --- a/net/sunrpc/auth_gss/gss_krb5_wrap.c
>>> +++ b/net/sunrpc/auth_gss/gss_krb5_wrap.c
>>> @@ -88,7 +88,7 @@ out:
>>>  }
>>>
>>>  static inline void
>>> -make_confounder(char *p, int blocksize)
>>> +make_confounder(char *p, int conflen)
>>
>>  I would use an unsigned type for conflen... "size_t" is probably
>>  better than "int".
>
> Thanks.  I think size_t is overkill for this.  Is u32 acceptable?
> That is what is
> used elsewhere, anyway.

Yes, I noticed that later.  u32 it is.

--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com


More information about the NFSv4 mailing list