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
9c2c7039
Commit
9c2c7039
authored
Jun 20, 2011
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
->permission() sanitizing: pass MAY_NOT_BLOCK to ->check_acl()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
1fc0f78c
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
14 additions
and
15 deletions
+14
-15
fs/9p/acl.c
fs/9p/acl.c
+1
-1
fs/btrfs/acl.c
fs/btrfs/acl.c
+1
-2
fs/ext2/acl.c
fs/ext2/acl.c
+1
-1
fs/ext3/acl.c
fs/ext3/acl.c
+1
-1
fs/ext4/acl.c
fs/ext4/acl.c
+1
-1
fs/generic_acl.c
fs/generic_acl.c
+1
-1
fs/gfs2/acl.c
fs/gfs2/acl.c
+1
-1
fs/jffs2/acl.c
fs/jffs2/acl.c
+1
-1
fs/jfs/acl.c
fs/jfs/acl.c
+1
-1
fs/namei.c
fs/namei.c
+2
-2
fs/ocfs2/acl.c
fs/ocfs2/acl.c
+1
-1
fs/reiserfs/xattr.c
fs/reiserfs/xattr.c
+1
-1
fs/xfs/linux-2.6/xfs_acl.c
fs/xfs/linux-2.6/xfs_acl.c
+1
-1
No files found.
fs/9p/acl.c
View file @
9c2c7039
...
@@ -101,7 +101,7 @@ int v9fs_check_acl(struct inode *inode, int mask, unsigned int flags)
...
@@ -101,7 +101,7 @@ int v9fs_check_acl(struct inode *inode, int mask, unsigned int flags)
struct
posix_acl
*
acl
;
struct
posix_acl
*
acl
;
struct
v9fs_session_info
*
v9ses
;
struct
v9fs_session_info
*
v9ses
;
if
(
flags
&
IPERM_FLAG_RCU
)
if
(
mask
&
MAY_NOT_BLOCK
)
return
-
ECHILD
;
return
-
ECHILD
;
v9ses
=
v9fs_inode2v9ses
(
inode
);
v9ses
=
v9fs_inode2v9ses
(
inode
);
...
...
fs/btrfs/acl.c
View file @
9c2c7039
...
@@ -199,10 +199,9 @@ int btrfs_check_acl(struct inode *inode, int mask, unsigned int flags)
...
@@ -199,10 +199,9 @@ int btrfs_check_acl(struct inode *inode, int mask, unsigned int flags)
{
{
int
error
=
-
EAGAIN
;
int
error
=
-
EAGAIN
;
if
(
flags
&
IPERM_FLAG_RCU
)
{
if
(
mask
&
MAY_NOT_BLOCK
)
{
if
(
!
negative_cached_acl
(
inode
,
ACL_TYPE_ACCESS
))
if
(
!
negative_cached_acl
(
inode
,
ACL_TYPE_ACCESS
))
error
=
-
ECHILD
;
error
=
-
ECHILD
;
}
else
{
}
else
{
struct
posix_acl
*
acl
;
struct
posix_acl
*
acl
;
acl
=
btrfs_get_acl
(
inode
,
ACL_TYPE_ACCESS
);
acl
=
btrfs_get_acl
(
inode
,
ACL_TYPE_ACCESS
);
...
...
fs/ext2/acl.c
View file @
9c2c7039
...
@@ -236,7 +236,7 @@ ext2_check_acl(struct inode *inode, int mask, unsigned int flags)
...
@@ -236,7 +236,7 @@ ext2_check_acl(struct inode *inode, int mask, unsigned int flags)
{
{
struct
posix_acl
*
acl
;
struct
posix_acl
*
acl
;
if
(
flags
&
IPERM_FLAG_RCU
)
{
if
(
mask
&
MAY_NOT_BLOCK
)
{
if
(
!
negative_cached_acl
(
inode
,
ACL_TYPE_ACCESS
))
if
(
!
negative_cached_acl
(
inode
,
ACL_TYPE_ACCESS
))
return
-
ECHILD
;
return
-
ECHILD
;
return
-
EAGAIN
;
return
-
EAGAIN
;
...
...
fs/ext3/acl.c
View file @
9c2c7039
...
@@ -244,7 +244,7 @@ ext3_check_acl(struct inode *inode, int mask, unsigned int flags)
...
@@ -244,7 +244,7 @@ ext3_check_acl(struct inode *inode, int mask, unsigned int flags)
{
{
struct
posix_acl
*
acl
;
struct
posix_acl
*
acl
;
if
(
flags
&
IPERM_FLAG_RCU
)
{
if
(
mask
&
MAY_NOT_BLOCK
)
{
if
(
!
negative_cached_acl
(
inode
,
ACL_TYPE_ACCESS
))
if
(
!
negative_cached_acl
(
inode
,
ACL_TYPE_ACCESS
))
return
-
ECHILD
;
return
-
ECHILD
;
return
-
EAGAIN
;
return
-
EAGAIN
;
...
...
fs/ext4/acl.c
View file @
9c2c7039
...
@@ -242,7 +242,7 @@ ext4_check_acl(struct inode *inode, int mask, unsigned int flags)
...
@@ -242,7 +242,7 @@ ext4_check_acl(struct inode *inode, int mask, unsigned int flags)
{
{
struct
posix_acl
*
acl
;
struct
posix_acl
*
acl
;
if
(
flags
&
IPERM_FLAG_RCU
)
{
if
(
mask
&
MAY_NOT_BLOCK
)
{
if
(
!
negative_cached_acl
(
inode
,
ACL_TYPE_ACCESS
))
if
(
!
negative_cached_acl
(
inode
,
ACL_TYPE_ACCESS
))
return
-
ECHILD
;
return
-
ECHILD
;
return
-
EAGAIN
;
return
-
EAGAIN
;
...
...
fs/generic_acl.c
View file @
9c2c7039
...
@@ -192,7 +192,7 @@ generic_acl_chmod(struct inode *inode)
...
@@ -192,7 +192,7 @@ generic_acl_chmod(struct inode *inode)
int
int
generic_check_acl
(
struct
inode
*
inode
,
int
mask
,
unsigned
int
flags
)
generic_check_acl
(
struct
inode
*
inode
,
int
mask
,
unsigned
int
flags
)
{
{
if
(
flags
&
IPERM_FLAG_RCU
)
{
if
(
mask
&
MAY_NOT_BLOCK
)
{
if
(
!
negative_cached_acl
(
inode
,
ACL_TYPE_ACCESS
))
if
(
!
negative_cached_acl
(
inode
,
ACL_TYPE_ACCESS
))
return
-
ECHILD
;
return
-
ECHILD
;
}
else
{
}
else
{
...
...
fs/gfs2/acl.c
View file @
9c2c7039
...
@@ -80,7 +80,7 @@ int gfs2_check_acl(struct inode *inode, int mask, unsigned int flags)
...
@@ -80,7 +80,7 @@ int gfs2_check_acl(struct inode *inode, int mask, unsigned int flags)
struct
posix_acl
*
acl
;
struct
posix_acl
*
acl
;
int
error
;
int
error
;
if
(
flags
&
IPERM_FLAG_RCU
)
{
if
(
mask
&
MAY_NOT_BLOCK
)
{
if
(
!
negative_cached_acl
(
inode
,
ACL_TYPE_ACCESS
))
if
(
!
negative_cached_acl
(
inode
,
ACL_TYPE_ACCESS
))
return
-
ECHILD
;
return
-
ECHILD
;
return
-
EAGAIN
;
return
-
EAGAIN
;
...
...
fs/jffs2/acl.c
View file @
9c2c7039
...
@@ -264,7 +264,7 @@ int jffs2_check_acl(struct inode *inode, int mask, unsigned int flags)
...
@@ -264,7 +264,7 @@ int jffs2_check_acl(struct inode *inode, int mask, unsigned int flags)
struct
posix_acl
*
acl
;
struct
posix_acl
*
acl
;
int
rc
;
int
rc
;
if
(
flags
&
IPERM_FLAG_RCU
)
if
(
mask
&
MAY_NOT_BLOCK
)
return
-
ECHILD
;
return
-
ECHILD
;
acl
=
jffs2_get_acl
(
inode
,
ACL_TYPE_ACCESS
);
acl
=
jffs2_get_acl
(
inode
,
ACL_TYPE_ACCESS
);
...
...
fs/jfs/acl.c
View file @
9c2c7039
...
@@ -118,7 +118,7 @@ int jfs_check_acl(struct inode *inode, int mask, unsigned int flags)
...
@@ -118,7 +118,7 @@ int jfs_check_acl(struct inode *inode, int mask, unsigned int flags)
{
{
struct
posix_acl
*
acl
;
struct
posix_acl
*
acl
;
if
(
flags
&
IPERM_FLAG_RCU
)
if
(
mask
&
MAY_NOT_BLOCK
)
return
-
ECHILD
;
return
-
ECHILD
;
acl
=
jfs_get_acl
(
inode
,
ACL_TYPE_ACCESS
);
acl
=
jfs_get_acl
(
inode
,
ACL_TYPE_ACCESS
);
...
...
fs/namei.c
View file @
9c2c7039
...
@@ -181,7 +181,7 @@ static int acl_permission_check(struct inode *inode, int mask, unsigned int flag
...
@@ -181,7 +181,7 @@ static int acl_permission_check(struct inode *inode, int mask, unsigned int flag
int
(
*
check_acl
)(
struct
inode
*
inode
,
int
mask
,
unsigned
int
flags
);
int
(
*
check_acl
)(
struct
inode
*
inode
,
int
mask
,
unsigned
int
flags
);
unsigned
int
mode
=
inode
->
i_mode
;
unsigned
int
mode
=
inode
->
i_mode
;
mask
&=
MAY_READ
|
MAY_WRITE
|
MAY_EXEC
;
mask
&=
MAY_READ
|
MAY_WRITE
|
MAY_EXEC
|
MAY_NOT_BLOCK
;
if
(
current_user_ns
()
!=
inode_userns
(
inode
))
if
(
current_user_ns
()
!=
inode_userns
(
inode
))
goto
other_perms
;
goto
other_perms
;
...
@@ -204,7 +204,7 @@ static int acl_permission_check(struct inode *inode, int mask, unsigned int flag
...
@@ -204,7 +204,7 @@ static int acl_permission_check(struct inode *inode, int mask, unsigned int flag
/*
/*
* If the DACs are ok we don't need any capability check.
* If the DACs are ok we don't need any capability check.
*/
*/
if
((
mask
&
~
mode
)
==
0
)
if
((
mask
&
~
mode
&
(
MAY_READ
|
MAY_WRITE
|
MAY_EXEC
)
)
==
0
)
return
0
;
return
0
;
return
-
EACCES
;
return
-
EACCES
;
}
}
...
...
fs/ocfs2/acl.c
View file @
9c2c7039
...
@@ -297,7 +297,7 @@ int ocfs2_check_acl(struct inode *inode, int mask, unsigned int flags)
...
@@ -297,7 +297,7 @@ int ocfs2_check_acl(struct inode *inode, int mask, unsigned int flags)
struct
posix_acl
*
acl
;
struct
posix_acl
*
acl
;
int
ret
=
-
EAGAIN
;
int
ret
=
-
EAGAIN
;
if
(
flags
&
IPERM_FLAG_RCU
)
if
(
mask
&
MAY_NOT_BLOCK
)
return
-
ECHILD
;
return
-
ECHILD
;
osb
=
OCFS2_SB
(
inode
->
i_sb
);
osb
=
OCFS2_SB
(
inode
->
i_sb
);
...
...
fs/reiserfs/xattr.c
View file @
9c2c7039
...
@@ -879,7 +879,7 @@ int reiserfs_check_acl(struct inode *inode, int mask, unsigned int flags)
...
@@ -879,7 +879,7 @@ int reiserfs_check_acl(struct inode *inode, int mask, unsigned int flags)
if
(
get_inode_sd_version
(
inode
)
==
STAT_DATA_V1
)
if
(
get_inode_sd_version
(
inode
)
==
STAT_DATA_V1
)
return
-
EAGAIN
;
return
-
EAGAIN
;
if
(
flags
&
IPERM_FLAG_RCU
)
if
(
mask
&
MAY_NOT_BLOCK
)
return
-
ECHILD
;
return
-
ECHILD
;
acl
=
reiserfs_get_acl
(
inode
,
ACL_TYPE_ACCESS
);
acl
=
reiserfs_get_acl
(
inode
,
ACL_TYPE_ACCESS
);
...
...
fs/xfs/linux-2.6/xfs_acl.c
View file @
9c2c7039
...
@@ -235,7 +235,7 @@ xfs_check_acl(struct inode *inode, int mask, unsigned int flags)
...
@@ -235,7 +235,7 @@ xfs_check_acl(struct inode *inode, int mask, unsigned int flags)
if
(
!
XFS_IFORK_Q
(
ip
))
if
(
!
XFS_IFORK_Q
(
ip
))
return
-
EAGAIN
;
return
-
EAGAIN
;
if
(
flags
&
IPERM_FLAG_RCU
)
{
if
(
mask
&
MAY_NOT_BLOCK
)
{
if
(
!
negative_cached_acl
(
inode
,
ACL_TYPE_ACCESS
))
if
(
!
negative_cached_acl
(
inode
,
ACL_TYPE_ACCESS
))
return
-
ECHILD
;
return
-
ECHILD
;
return
-
EAGAIN
;
return
-
EAGAIN
;
...
...
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