rpc: clean up decoding of gssproxy linux creds
authorJ. Bruce Fields <bfields@redhat.com>
Wed, 21 Aug 2013 14:32:52 +0000 (10:32 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Oct 2013 16:41:02 +0000 (09:41 -0700)
commit4a3c0a03cbc9eec8bafbcf76448494b469ef903b
tree29e67a53c4ea6b04b4d15d75ecb07486885cde17
parent02911e1cf4c15e4046480ae33ff44d91cd6c0b36
rpc: clean up decoding of gssproxy linux creds

commit 778e512bb1d3315c6b55832248cd30c566c081d7 upstream.

We can use the normal coding infrastructure here.

Two minor behavior changes:

- we're assuming no wasted space at the end of the linux cred.
  That seems to match gss-proxy's behavior, and I can't see why
  it would need to do differently in the future.

- NGROUPS_MAX check added: note groups_alloc doesn't do this,
  this is the caller's responsibility.

Tested-by: Simo Sorce <simo@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sunrpc/auth_gss/gss_rpc_xdr.c