mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
coredump masking: reimplementation of dumpable using two flags
This patch changes mm_struct.dumpable to a pair of bit flags. set_dumpable() converts three-value dumpable to two flags and stores it into lower two bits of mm_struct.flags instead of mm_struct.dumpable. get_dumpable() behaves in the opposite way. [[email protected]: export set_dumpable] Signed-off-by: Hidehiro Kawai <[email protected]> Cc: Alan Cox <[email protected]> Cc: David Howells <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Nick Piggin <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
76fdbb25f9
commit
6c5d523826
8 changed files with 82 additions and 25 deletions
|
|
@ -148,7 +148,7 @@ void cap_bprm_apply_creds (struct linux_binprm *bprm, int unsafe)
|
|||
|
||||
if (bprm->e_uid != current->uid || bprm->e_gid != current->gid ||
|
||||
!cap_issubset (new_permitted, current->cap_permitted)) {
|
||||
current->mm->dumpable = suid_dumpable;
|
||||
set_dumpable(current->mm, suid_dumpable);
|
||||
|
||||
if (unsafe & ~LSM_UNSAFE_PTRACE_CAP) {
|
||||
if (!capable(CAP_SETUID)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue