diff options
-rw-r--r-- | net/sunrpc/auth_unix.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/sunrpc/auth_unix.c b/net/sunrpc/auth_unix.c index c434fde2079b..dc37021fc3e5 100644 --- a/net/sunrpc/auth_unix.c +++ b/net/sunrpc/auth_unix.c | |||
@@ -157,11 +157,11 @@ unx_marshal(struct rpc_task *task, __be32 *p) | |||
157 | */ | 157 | */ |
158 | p = xdr_encode_array(p, clnt->cl_nodename, clnt->cl_nodelen); | 158 | p = xdr_encode_array(p, clnt->cl_nodename, clnt->cl_nodelen); |
159 | 159 | ||
160 | *p++ = htonl((u32) cred->uc_uid); | 160 | *p++ = htonl((u32) from_kuid(&init_user_ns, cred->uc_uid)); |
161 | *p++ = htonl((u32) cred->uc_gid); | 161 | *p++ = htonl((u32) from_kgid(&init_user_ns, cred->uc_gid)); |
162 | hold = p++; | 162 | hold = p++; |
163 | for (i = 0; i < 16 && gid_valid(cred->uc_gids[i]); i++) | 163 | for (i = 0; i < 16 && gid_valid(cred->uc_gids[i]); i++) |
164 | *p++ = htonl((u32) cred->uc_gids[i]); | 164 | *p++ = htonl((u32) from_kgid(&init_user_ns, cred->uc_gids[i])); |
165 | *hold = htonl(p - hold - 1); /* gid array length */ | 165 | *hold = htonl(p - hold - 1); /* gid array length */ |
166 | *base = htonl((p - base - 1) << 2); /* cred length */ | 166 | *base = htonl((p - base - 1) << 2); /* cred length */ |
167 | 167 | ||