Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
d28fcc83
Commit
d28fcc83
authored
Apr 29, 2013
by
J. Bruce Fields
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
svcrpc: fix gss-proxy to respect user namespaces
Signed-off-by:
J. Bruce Fields
<
bfields@redhat.com
>
parent
6278b62a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
net/sunrpc/auth_gss/gss_rpc_xdr.c
net/sunrpc/auth_gss/gss_rpc_xdr.c
+13
-7
No files found.
net/sunrpc/auth_gss/gss_rpc_xdr.c
View file @
d28fcc83
...
@@ -216,13 +216,13 @@ static int gssx_dec_linux_creds(struct xdr_stream *xdr,
...
@@ -216,13 +216,13 @@ static int gssx_dec_linux_creds(struct xdr_stream *xdr,
err
=
get_s32
(
&
q
,
end
,
&
tmp
);
err
=
get_s32
(
&
q
,
end
,
&
tmp
);
if
(
err
)
if
(
err
)
return
err
;
return
err
;
creds
->
cr_uid
=
tmp
;
creds
->
cr_uid
=
make_kuid
(
&
init_user_ns
,
tmp
)
;
/* gid */
/* gid */
err
=
get_s32
(
&
q
,
end
,
&
tmp
);
err
=
get_s32
(
&
q
,
end
,
&
tmp
);
if
(
err
)
if
(
err
)
return
err
;
return
err
;
creds
->
cr_gid
=
tmp
;
creds
->
cr_gid
=
make_kgid
(
&
init_user_ns
,
tmp
)
;
/* number of additional gid's */
/* number of additional gid's */
err
=
get_s32
(
&
q
,
end
,
&
tmp
);
err
=
get_s32
(
&
q
,
end
,
&
tmp
);
...
@@ -235,15 +235,21 @@ static int gssx_dec_linux_creds(struct xdr_stream *xdr,
...
@@ -235,15 +235,21 @@ static int gssx_dec_linux_creds(struct xdr_stream *xdr,
/* gid's */
/* gid's */
for
(
i
=
0
;
i
<
N
;
i
++
)
{
for
(
i
=
0
;
i
<
N
;
i
++
)
{
kgid_t
kgid
;
err
=
get_s32
(
&
q
,
end
,
&
tmp
);
err
=
get_s32
(
&
q
,
end
,
&
tmp
);
if
(
err
)
{
if
(
err
)
groups_free
(
creds
->
cr_group_info
);
goto
out_free_groups
;
return
err
;
err
=
-
EINVAL
;
}
kgid
=
make_kgid
(
&
init_user_ns
,
tmp
);
GROUP_AT
(
creds
->
cr_group_info
,
i
)
=
tmp
;
if
(
!
gid_valid
(
kgid
))
goto
out_free_groups
;
GROUP_AT
(
creds
->
cr_group_info
,
i
)
=
kgid
;
}
}
return
0
;
return
0
;
out_free_groups:
groups_free
(
creds
->
cr_group_info
);
return
err
;
}
}
static
int
gssx_dec_option_array
(
struct
xdr_stream
*
xdr
,
static
int
gssx_dec_option_array
(
struct
xdr_stream
*
xdr
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment