Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 372214
b: refs/heads/master
c: d28fcc8
h: refs/heads/master
v: v3
  • Loading branch information
J. Bruce Fields committed Apr 29, 2013
1 parent cb51ffc commit 815e994
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6278b62aa8f90c668a4e4b94ad9d3952cf4331b7
refs/heads/master: d28fcc830c2eadc526e43b0a5f6d2ed04e7421ef
20 changes: 13 additions & 7 deletions trunk/net/sunrpc/auth_gss/gss_rpc_xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,13 @@ static int gssx_dec_linux_creds(struct xdr_stream *xdr,
err = get_s32(&q, end, &tmp);
if (err)
return err;
creds->cr_uid = tmp;
creds->cr_uid = make_kuid(&init_user_ns, tmp);

/* gid */
err = get_s32(&q, end, &tmp);
if (err)
return err;
creds->cr_gid = tmp;
creds->cr_gid = make_kgid(&init_user_ns, tmp);

/* number of additional gid's */
err = get_s32(&q, end, &tmp);
Expand All @@ -235,15 +235,21 @@ static int gssx_dec_linux_creds(struct xdr_stream *xdr,

/* gid's */
for (i = 0; i < N; i++) {
kgid_t kgid;
err = get_s32(&q, end, &tmp);
if (err) {
groups_free(creds->cr_group_info);
return err;
}
GROUP_AT(creds->cr_group_info, i) = tmp;
if (err)
goto out_free_groups;
err = -EINVAL;
kgid = make_kgid(&init_user_ns, tmp);
if (!gid_valid(kgid))
goto out_free_groups;
GROUP_AT(creds->cr_group_info, i) = kgid;
}

return 0;
out_free_groups:
groups_free(creds->cr_group_info);
return err;
}

static int gssx_dec_option_array(struct xdr_stream *xdr,
Expand Down

0 comments on commit 815e994

Please sign in to comment.