aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/auth_null.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/auth_null.c')
-rw-r--r--net/sunrpc/auth_null.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/net/sunrpc/auth_null.c b/net/sunrpc/auth_null.c
index d0ceac57c06e..797f8472c21b 100644
--- a/net/sunrpc/auth_null.c
+++ b/net/sunrpc/auth_null.c
@@ -59,15 +59,21 @@ nul_match(struct auth_cred *acred, struct rpc_cred *cred, int taskflags)
59/* 59/*
60 * Marshal credential. 60 * Marshal credential.
61 */ 61 */
62static __be32 * 62static int
63nul_marshal(struct rpc_task *task, __be32 *p) 63nul_marshal(struct rpc_task *task, struct xdr_stream *xdr)
64{ 64{
65 *p++ = htonl(RPC_AUTH_NULL); 65 __be32 *p;
66 *p++ = 0; 66
67 *p++ = htonl(RPC_AUTH_NULL); 67 p = xdr_reserve_space(xdr, 4 * sizeof(*p));
68 *p++ = 0; 68 if (!p)
69 69 return -EMSGSIZE;
70 return p; 70 /* Credential */
71 *p++ = rpc_auth_null;
72 *p++ = xdr_zero;
73 /* Verifier */
74 *p++ = rpc_auth_null;
75 *p = xdr_zero;
76 return 0;
71} 77}
72 78
73/* 79/*
@@ -125,6 +131,7 @@ const struct rpc_credops null_credops = {
125 .crdestroy = nul_destroy_cred, 131 .crdestroy = nul_destroy_cred,
126 .crmatch = nul_match, 132 .crmatch = nul_match,
127 .crmarshal = nul_marshal, 133 .crmarshal = nul_marshal,
134 .crwrap_req = rpcauth_wrap_req_encode,
128 .crrefresh = nul_refresh, 135 .crrefresh = nul_refresh,
129 .crvalidate = nul_validate, 136 .crvalidate = nul_validate,
130}; 137};