Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
a44ddbb6
Commit
a44ddbb6
authored
Apr 06, 2009
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make open_exec() and sys_uselib() use may_open(), instead of duplicating its parts
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
e24977d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
9 deletions
+2
-9
fs/exec.c
fs/exec.c
+2
-9
No files found.
fs/exec.c
View file @
a44ddbb6
...
...
@@ -126,11 +126,7 @@ SYSCALL_DEFINE1(uselib, const char __user *, library)
if
(
nd
.
path
.
mnt
->
mnt_flags
&
MNT_NOEXEC
)
goto
exit
;
error
=
inode_permission
(
nd
.
path
.
dentry
->
d_inode
,
MAY_READ
|
MAY_EXEC
|
MAY_OPEN
);
if
(
error
)
goto
exit
;
error
=
ima_path_check
(
&
nd
.
path
,
MAY_READ
|
MAY_EXEC
|
MAY_OPEN
);
error
=
may_open
(
&
nd
.
path
,
MAY_READ
|
MAY_EXEC
|
MAY_OPEN
,
0
);
if
(
error
)
goto
exit
;
...
...
@@ -677,10 +673,7 @@ struct file *open_exec(const char *name)
if
(
nd
.
path
.
mnt
->
mnt_flags
&
MNT_NOEXEC
)
goto
out_path_put
;
err
=
inode_permission
(
nd
.
path
.
dentry
->
d_inode
,
MAY_EXEC
|
MAY_OPEN
);
if
(
err
)
goto
out_path_put
;
err
=
ima_path_check
(
&
nd
.
path
,
MAY_EXEC
|
MAY_OPEN
);
err
=
may_open
(
&
nd
.
path
,
MAY_EXEC
|
MAY_OPEN
,
0
);
if
(
err
)
goto
out_path_put
;
...
...
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