SUNRPC: Add "@len" parameter to gss_unwrap()
authorChuck Lever <chuck.lever@oracle.com>
Sun, 19 Apr 2020 01:06:23 +0000 (21:06 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 May 2020 06:20:04 +0000 (08:20 +0200)
commit3bf0794e73095729e11f06c8225012ed3c9edcb6
tree68db6fa14b68e43a1fb4f92e7c47fad226c2e424
parent3c605abef3eebb24a6cfcaeccac8338ef7b3bc00
SUNRPC: Add "@len" parameter to gss_unwrap()

[ Upstream commit 31c9590ae468478fe47dc0f5f0d3562b2f69450e ]

Refactor: This is a pre-requisite to fixing the client-side ralign
computation in gss_unwrap_resp_priv().

The length value is passed in explicitly rather that as the value
of buf->len. This will subsequently allow gss_unwrap_kerberos_v1()
to compute a slack and align value, instead of computing it in
gss_unwrap_resp_priv().

Fixes: 35e77d21baa0 ("SUNRPC: Add rpc_auth::au_ralign field")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/sunrpc/gss_api.h
include/linux/sunrpc/gss_krb5.h
net/sunrpc/auth_gss/auth_gss.c
net/sunrpc/auth_gss/gss_krb5_crypto.c
net/sunrpc/auth_gss/gss_krb5_wrap.c
net/sunrpc/auth_gss/gss_mech_switch.c
net/sunrpc/auth_gss/svcauth_gss.c