summaryrefslogtreecommitdiffstats
path: root/fs/lockd
diff options
context:
space:
mode:
authorTrond Myklebust <trondmy@gmail.com>2019-04-24 17:46:42 -0400
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2019-04-26 16:00:48 -0400
commit79caa5fad47c69874f9efc4ac3128cc3f6d36f6e (patch)
tree0172cd4c9d7525e2ebd712ff4bbefac61f046430 /fs/lockd
parent2cfd11f16f01c0ee8f83bb07027c9d2f43565473 (diff)
downloadlinux-79caa5fad47c69874f9efc4ac3128cc3f6d36f6e.tar.gz
linux-79caa5fad47c69874f9efc4ac3128cc3f6d36f6e.tar.bz2
linux-79caa5fad47c69874f9efc4ac3128cc3f6d36f6e.zip
SUNRPC: Cache cred of process creating the rpc_client
When converting kuids to AUTH_UNIX creds, etc we will want to use the same user namespace as the process that created the rpc client. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/lockd')
-rw-r--r--fs/lockd/host.c1
-rw-r--r--fs/lockd/mon.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/fs/lockd/host.c b/fs/lockd/host.c
index f0b5c987d6ae..d46081123f7c 100644
--- a/fs/lockd/host.c
+++ b/fs/lockd/host.c
@@ -458,6 +458,7 @@ nlm_bind_host(struct nlm_host *host)
.authflavor = RPC_AUTH_UNIX,
.flags = (RPC_CLNT_CREATE_NOPING |
RPC_CLNT_CREATE_AUTOBIND),
+ .cred = current_cred(),
};
/*
diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c
index 654594ef4f94..1eabd91870e6 100644
--- a/fs/lockd/mon.c
+++ b/fs/lockd/mon.c
@@ -82,6 +82,7 @@ static struct rpc_clnt *nsm_create(struct net *net, const char *nodename)
.version = NSM_VERSION,
.authflavor = RPC_AUTH_NULL,
.flags = RPC_CLNT_CREATE_NOPING,
+ .cred = current_cred(),
};
return rpc_create(&args);