diff options
author | Trond Myklebust <trondmy@gmail.com> | 2019-04-25 00:46:42 +0300 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2019-04-26 23:00:48 +0300 |
commit | 79caa5fad47c69874f9efc4ac3128cc3f6d36f6e (patch) | |
tree | 0172cd4c9d7525e2ebd712ff4bbefac61f046430 /fs/nfs/mount_clnt.c | |
parent | 2cfd11f16f01c0ee8f83bb07027c9d2f43565473 (diff) | |
download | linux-79caa5fad47c69874f9efc4ac3128cc3f6d36f6e.tar.xz |
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/nfs/mount_clnt.c')
-rw-r--r-- | fs/nfs/mount_clnt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c index d979ff4fee7e..cb7c10e9721e 100644 --- a/fs/nfs/mount_clnt.c +++ b/fs/nfs/mount_clnt.c @@ -163,6 +163,7 @@ int nfs_mount(struct nfs_mount_request *info) .program = &mnt_program, .version = info->version, .authflavor = RPC_AUTH_UNIX, + .cred = current_cred(), }; struct rpc_clnt *mnt_clnt; int status; @@ -249,6 +250,7 @@ void nfs_umount(const struct nfs_mount_request *info) .version = info->version, .authflavor = RPC_AUTH_UNIX, .flags = RPC_CLNT_CREATE_NOPING, + .cred = current_cred(), }; struct rpc_message msg = { .rpc_argp = info->dirpath, |