Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

SUNRPC: Make AUTH_SYS and AUTH_NULL set au_verfsize

au_verfsize will be needed for a non-flavor-specific computation
in a subsequent patch.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>

authored by

Chuck Lever and committed by
Anna Schumaker
a00275ba 02ef04e4

+7 -3
+1 -2
include/linux/sunrpc/auth.h
··· 77 77 /* guess at number of u32's auth adds before 78 78 * reply data; normally the verifier size: */ 79 79 unsigned int au_rslack; 80 - /* for gss, used to calculate au_rslack: */ 81 - unsigned int au_verfsize; 80 + unsigned int au_verfsize; /* size of reply verifier */ 82 81 83 82 unsigned int au_flags; /* various flags */ 84 83 const struct rpc_authops *au_ops; /* operations */
+1
net/sunrpc/auth_gss/auth_gss.c
··· 1016 1016 auth = &gss_auth->rpc_auth; 1017 1017 auth->au_cslack = GSS_CRED_SLACK >> 2; 1018 1018 auth->au_rslack = GSS_VERF_SLACK >> 2; 1019 + auth->au_verfsize = GSS_VERF_SLACK >> 2; 1019 1020 auth->au_flags = 0; 1020 1021 auth->au_ops = &authgss_ops; 1021 1022 auth->au_flavor = flavor;
+1
net/sunrpc/auth_null.c
··· 114 114 struct rpc_auth null_auth = { 115 115 .au_cslack = NUL_CALLSLACK, 116 116 .au_rslack = NUL_REPLYSLACK, 117 + .au_verfsize = NUL_REPLYSLACK, 117 118 .au_ops = &authnull_ops, 118 119 .au_flavor = RPC_AUTH_NULL, 119 120 .au_count = REFCOUNT_INIT(1),
+4 -1
net/sunrpc/auth_unix.c
··· 163 163 static int 164 164 unx_validate(struct rpc_task *task, struct xdr_stream *xdr) 165 165 { 166 + struct rpc_auth *auth = task->tk_rqstp->rq_cred->cr_auth; 166 167 __be32 *p; 167 168 u32 size; 168 169 ··· 185 184 if (!p) 186 185 return -EIO; 187 186 188 - task->tk_rqstp->rq_cred->cr_auth->au_rslack = (size >> 2) + 2; 187 + auth->au_verfsize = XDR_QUADLEN(size) + 2; 188 + auth->au_rslack = XDR_QUADLEN(size) + 2; 189 189 return 0; 190 190 } 191 191 ··· 214 212 struct rpc_auth unix_auth = { 215 213 .au_cslack = UNX_CALLSLACK, 216 214 .au_rslack = NUL_REPLYSLACK, 215 + .au_verfsize = NUL_REPLYSLACK, 217 216 .au_ops = &authunix_ops, 218 217 .au_flavor = RPC_AUTH_UNIX, 219 218 .au_count = REFCOUNT_INIT(1),