diff options
author | Trond Myklebust <trondmy@gmail.com> | 2019-04-09 12:13:41 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2019-04-24 09:46:35 -0400 |
commit | e6667c73a27d80078f8d7fca516d6b14bc4e18a7 (patch) | |
tree | 7a716feae275b8d69c673c03d7c917ffaa292b03 | |
parent | ccfe51a5161c17d24157c08f9963f351a89268fa (diff) | |
download | linux-stable-e6667c73a27d80078f8d7fca516d6b14bc4e18a7.tar.gz linux-stable-e6667c73a27d80078f8d7fca516d6b14bc4e18a7.tar.bz2 linux-stable-e6667c73a27d80078f8d7fca516d6b14bc4e18a7.zip |
SUNRPC: rsi_parse() should use the current user namespace
rsi_parse() is part of a downcall, so we must assume that the uids
and gids are encoded using the current user namespace.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-rw-r--r-- | net/sunrpc/auth_gss/svcauth_gss.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index 0c5d7896d6dd..8be2f209982b 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c @@ -474,12 +474,12 @@ static int rsc_parse(struct cache_detail *cd, * treatment so are checked for validity here.) */ /* uid */ - rsci.cred.cr_uid = make_kuid(&init_user_ns, id); + rsci.cred.cr_uid = make_kuid(current_user_ns(), id); /* gid */ if (get_int(&mesg, &id)) goto out; - rsci.cred.cr_gid = make_kgid(&init_user_ns, id); + rsci.cred.cr_gid = make_kgid(current_user_ns(), id); /* number of additional gid's */ if (get_int(&mesg, &N)) @@ -497,7 +497,7 @@ static int rsc_parse(struct cache_detail *cd, kgid_t kgid; if (get_int(&mesg, &id)) goto out; - kgid = make_kgid(&init_user_ns, id); + kgid = make_kgid(current_user_ns(), id); if (!gid_valid(kgid)) goto out; rsci.cred.cr_group_info->gid[i] = kgid; |