You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07: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. [akpm@linux-foundation.org: export set_dumpable] Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: David Howells <dhowells@redhat.com> Cc: Hugh Dickins <hugh@veritas.com> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
76fdbb25f9
commit
6c5d523826
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user