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
Kirill Smelkov
linux
Commits
0de93493
Commit
0de93493
authored
Jul 01, 2013
by
J. Bruce Fields
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-3.10' into 'for-3.11'
Merge bugfixes into my for-3.11 branch.
parents
1a9357f4
afe3c3fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
net/sunrpc/auth_gss/svcauth_gss.c
net/sunrpc/auth_gss/svcauth_gss.c
+5
-3
net/sunrpc/svcauth_unix.c
net/sunrpc/svcauth_unix.c
+7
-5
No files found.
net/sunrpc/auth_gss/svcauth_gss.c
View file @
0de93493
...
...
@@ -1287,7 +1287,7 @@ static bool use_gss_proxy(struct net *net)
#ifdef CONFIG_PROC_FS
static
bool
set_gss_proxy
(
struct
net
*
net
,
int
type
)
static
int
set_gss_proxy
(
struct
net
*
net
,
int
type
)
{
struct
sunrpc_net
*
sn
=
net_generic
(
net
,
sunrpc_net_id
);
int
ret
=
0
;
...
...
@@ -1317,10 +1317,12 @@ static inline bool gssp_ready(struct sunrpc_net *sn)
return
false
;
}
static
int
wait_for_gss_proxy
(
struct
net
*
net
)
static
int
wait_for_gss_proxy
(
struct
net
*
net
,
struct
file
*
file
)
{
struct
sunrpc_net
*
sn
=
net_generic
(
net
,
sunrpc_net_id
);
if
(
file
->
f_flags
&
O_NONBLOCK
&&
!
gssp_ready
(
sn
))
return
-
EAGAIN
;
return
wait_event_interruptible
(
sn
->
gssp_wq
,
gssp_ready
(
sn
));
}
...
...
@@ -1362,7 +1364,7 @@ static ssize_t read_gssp(struct file *file, char __user *buf,
size_t
len
;
int
ret
;
ret
=
wait_for_gss_proxy
(
net
);
ret
=
wait_for_gss_proxy
(
net
,
file
);
if
(
ret
)
return
ret
;
...
...
net/sunrpc/svcauth_unix.c
View file @
0de93493
...
...
@@ -810,11 +810,15 @@ svcauth_unix_accept(struct svc_rqst *rqstp, __be32 *authp)
goto
badcred
;
argv
->
iov_base
=
(
void
*
)((
__be32
*
)
argv
->
iov_base
+
slen
);
/* skip machname */
argv
->
iov_len
-=
slen
*
4
;
/*
* Note: we skip uid_valid()/gid_valid() checks here for
* backwards compatibility with clients that use -1 id's.
* Instead, -1 uid or gid is later mapped to the
* (export-specific) anonymous id by nfsd_setuser.
* Supplementary gid's will be left alone.
*/
cred
->
cr_uid
=
make_kuid
(
&
init_user_ns
,
svc_getnl
(
argv
));
/* uid */
cred
->
cr_gid
=
make_kgid
(
&
init_user_ns
,
svc_getnl
(
argv
));
/* gid */
if
(
!
uid_valid
(
cred
->
cr_uid
)
||
!
gid_valid
(
cred
->
cr_gid
))
goto
badcred
;
slen
=
svc_getnl
(
argv
);
/* gids length */
if
(
slen
>
16
||
(
len
-=
(
slen
+
2
)
*
4
)
<
0
)
goto
badcred
;
...
...
@@ -823,8 +827,6 @@ svcauth_unix_accept(struct svc_rqst *rqstp, __be32 *authp)
return
SVC_CLOSE
;
for
(
i
=
0
;
i
<
slen
;
i
++
)
{
kgid_t
kgid
=
make_kgid
(
&
init_user_ns
,
svc_getnl
(
argv
));
if
(
!
gid_valid
(
kgid
))
goto
badcred
;
GROUP_AT
(
cred
->
cr_group_info
,
i
)
=
kgid
;
}
if
(
svc_getu32
(
argv
)
!=
htonl
(
RPC_AUTH_NULL
)
||
svc_getu32
(
argv
)
!=
0
)
{
...
...
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