diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-06-20 18:59:02 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-20 01:43:18 -0400 |
commit | 1fc0f78ca9f311c6277e2f1b7655bb4d43ceb311 (patch) | |
tree | 9c6a5879558b7a189f94eae97ac80268e63fe29b /fs/proc | |
parent | 178ea73521d64ba41d7aa5488fb9f549c6d4507d (diff) |
->permission() sanitizing: MAY_NOT_BLOCK
Duplicate the flags argument into mask bitmap.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/proc_sysctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index d167de365a8d..349b22f434d8 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c | |||
@@ -316,7 +316,7 @@ static int proc_sys_permission(struct inode *inode, int mask,unsigned int flags) | |||
316 | if (!table) /* global root - r-xr-xr-x */ | 316 | if (!table) /* global root - r-xr-xr-x */ |
317 | error = mask & MAY_WRITE ? -EACCES : 0; | 317 | error = mask & MAY_WRITE ? -EACCES : 0; |
318 | else /* Use the permissions on the sysctl table entry */ | 318 | else /* Use the permissions on the sysctl table entry */ |
319 | error = sysctl_perm(head->root, table, mask); | 319 | error = sysctl_perm(head->root, table, mask & ~MAY_NOT_BLOCK); |
320 | 320 | ||
321 | sysctl_head_finish(head); | 321 | sysctl_head_finish(head); |
322 | return error; | 322 | return error; |