aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJeff Layton <jlayton@poochiereds.net>2014-06-21 20:52:15 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2014-07-12 18:41:06 -0400
commit2004c726b9d9a9670b7f837190be9c8dfa7a0e9d (patch)
tree5ffe683ea736dc03002687e04711455b2c4f7811 /net
parentf1cdae87fcf286a897738874a1398e64e7225adf (diff)
auth_gss: fetch the acceptor name out of the downcall
If rpc.gssd sends us an acceptor name string trailing the context token, stash it as part of the context. Signed-off-by: Jeff Layton <jlayton@poochiereds.net> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/auth_gss/auth_gss.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
index b6e440baccc3..e34af68603bd 100644
--- a/net/sunrpc/auth_gss/auth_gss.c
+++ b/net/sunrpc/auth_gss/auth_gss.c
@@ -262,9 +262,22 @@ gss_fill_context(const void *p, const void *end, struct gss_cl_ctx *ctx, struct
262 p = ERR_PTR(ret); 262 p = ERR_PTR(ret);
263 goto err; 263 goto err;
264 } 264 }
265 dprintk("RPC: %s Success. gc_expiry %lu now %lu timeout %u\n", 265
266 __func__, ctx->gc_expiry, now, timeout); 266 /* is there any trailing data? */
267 return q; 267 if (q == end) {
268 p = q;
269 goto done;
270 }
271
272 /* pull in acceptor name (if there is one) */
273 p = simple_get_netobj(q, end, &ctx->gc_acceptor);
274 if (IS_ERR(p))
275 goto err;
276done:
277 dprintk("RPC: %s Success. gc_expiry %lu now %lu timeout %u acceptor %.*s\n",
278 __func__, ctx->gc_expiry, now, timeout, ctx->gc_acceptor.len,
279 ctx->gc_acceptor.data);
280 return p;
268err: 281err:
269 dprintk("RPC: %s returns error %ld\n", __func__, -PTR_ERR(p)); 282 dprintk("RPC: %s returns error %ld\n", __func__, -PTR_ERR(p));
270 return p; 283 return p;
@@ -1225,6 +1238,7 @@ gss_do_free_ctx(struct gss_cl_ctx *ctx)
1225 1238
1226 gss_delete_sec_context(&ctx->gc_gss_ctx); 1239 gss_delete_sec_context(&ctx->gc_gss_ctx);
1227 kfree(ctx->gc_wire_ctx.data); 1240 kfree(ctx->gc_wire_ctx.data);
1241 kfree(ctx->gc_acceptor.data);
1228 kfree(ctx); 1242 kfree(ctx);
1229} 1243}
1230 1244