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
866f8309
Commit
866f8309
authored
Oct 17, 2002
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LSM: change all security bprm related calls to the new format.
parent
31358bf7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
17 deletions
+12
-17
arch/ppc64/kernel/sys_ppc32.c
arch/ppc64/kernel/sys_ppc32.c
+3
-4
arch/sparc64/kernel/sys_sparc32.c
arch/sparc64/kernel/sys_sparc32.c
+3
-4
fs/exec.c
fs/exec.c
+6
-9
No files found.
arch/ppc64/kernel/sys_ppc32.c
View file @
866f8309
...
...
@@ -3518,8 +3518,7 @@ static int do_execve32(char * filename, u32 * argv, u32 * envp, struct pt_regs *
if
((
retval
=
bprm
.
envc
)
<
0
)
goto
out_mm
;
retval
=
security_ops
->
bprm_alloc_security
(
&
bprm
);
if
(
retval
)
if
((
retval
=
security_bprm_alloc
(
&
bprm
)))
goto
out
;
retval
=
prepare_binprm
(
&
bprm
);
...
...
@@ -3542,7 +3541,7 @@ static int do_execve32(char * filename, u32 * argv, u32 * envp, struct pt_regs *
retval
=
search_binary_handler
(
&
bprm
,
regs
);
if
(
retval
>=
0
)
{
/* execve success */
security_
ops
->
bprm_free_security
(
&
bprm
);
security_
bprm_free
(
&
bprm
);
return
retval
;
}
...
...
@@ -3555,7 +3554,7 @@ static int do_execve32(char * filename, u32 * argv, u32 * envp, struct pt_regs *
}
if
(
bprm
.
security
)
security_
ops
->
bprm_free_security
(
&
bprm
);
security_
bprm_free
(
&
bprm
);
out_mm:
mmdrop
(
bprm
.
mm
);
...
...
arch/sparc64/kernel/sys_sparc32.c
View file @
866f8309
...
...
@@ -2964,8 +2964,7 @@ do_execve32(char * filename, u32 * argv, u32 * envp, struct pt_regs * regs)
if
((
retval
=
bprm
.
envc
)
<
0
)
goto
out_mm
;
retval
=
security_ops
->
bprm_alloc_security
(
&
bprm
);
if
(
retval
)
if
((
retval
=
security_bprm_alloc
(
&
bprm
)))
goto
out
;
retval
=
prepare_binprm
(
&
bprm
);
...
...
@@ -2988,7 +2987,7 @@ do_execve32(char * filename, u32 * argv, u32 * envp, struct pt_regs * regs)
retval
=
search_binary_handler
(
&
bprm
,
regs
);
if
(
retval
>=
0
)
{
/* execve success */
security_
ops
->
bprm_free_security
(
&
bprm
);
security_
bprm_free
(
&
bprm
);
return
retval
;
}
...
...
@@ -3001,7 +3000,7 @@ do_execve32(char * filename, u32 * argv, u32 * envp, struct pt_regs * regs)
}
if
(
bprm
.
security
)
security_
ops
->
bprm_free_security
(
&
bprm
);
security_
bprm_free
(
&
bprm
);
out_mm:
mmdrop
(
bprm
.
mm
);
...
...
fs/exec.c
View file @
866f8309
...
...
@@ -819,8 +819,7 @@ int prepare_binprm(struct linux_binprm *bprm)
}
/* fill in binprm security blob */
retval
=
security_ops
->
bprm_set_security
(
bprm
);
if
(
retval
)
if
((
retval
=
security_bprm_set
(
bprm
)))
return
retval
;
memset
(
bprm
->
buf
,
0
,
BINPRM_BUF_SIZE
);
...
...
@@ -868,7 +867,7 @@ void compute_creds(struct linux_binprm *bprm)
if
(
do_unlock
)
unlock_kernel
();
security_
ops
->
bprm_compute_creds
(
bprm
);
security_bprm_compute_creds
(
bprm
);
}
void
remove_arg_zero
(
struct
linux_binprm
*
bprm
)
...
...
@@ -937,8 +936,7 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs)
}
}
#endif
retval
=
security_ops
->
bprm_check_security
(
bprm
);
if
(
retval
)
if
((
retval
=
security_bprm_check
(
bprm
)))
return
retval
;
/* kernel module loader fixup */
...
...
@@ -1034,8 +1032,7 @@ int do_execve(char * filename, char ** argv, char ** envp, struct pt_regs * regs
if
((
retval
=
bprm
.
envc
)
<
0
)
goto
out_mm
;
retval
=
security_ops
->
bprm_alloc_security
(
&
bprm
);
if
(
retval
)
if
((
retval
=
security_bprm_alloc
(
&
bprm
)))
goto
out
;
retval
=
prepare_binprm
(
&
bprm
);
...
...
@@ -1058,7 +1055,7 @@ int do_execve(char * filename, char ** argv, char ** envp, struct pt_regs * regs
retval
=
search_binary_handler
(
&
bprm
,
regs
);
if
(
retval
>=
0
)
{
/* execve success */
security_
ops
->
bprm_free_security
(
&
bprm
);
security_
bprm_free
(
&
bprm
);
return
retval
;
}
...
...
@@ -1071,7 +1068,7 @@ int do_execve(char * filename, char ** argv, char ** envp, struct pt_regs * regs
}
if
(
bprm
.
security
)
security_
ops
->
bprm_free_security
(
&
bprm
);
security_
bprm_free
(
&
bprm
);
out_mm:
mmdrop
(
bprm
.
mm
);
...
...
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