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:17:48 +0000 (09:17 -0700)
commitd68b9c457e6298e941b8b574f921624c6c648218
tree916cb8160133c27bfb470a9b203a1ab6593d19e0
parent85f58908c038a5e1f51fb9014f0b0954f66be1d4
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