mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-28 03:51:53 +02:00
system: Allow users to PTRACE_ATTACH to their own processes.
* gnu/build/activation.scm (activate-ptrace-attach): New procedure. * gnu/system.scm (operating-system-activation-script): Use it.
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
activate-/bin/sh
|
||||
activate-modprobe
|
||||
activate-firmware
|
||||
activate-ptrace-attach
|
||||
activate-current-system))
|
||||
|
||||
;;; Commentary:
|
||||
@@ -335,6 +336,18 @@ by itself, without having to resort to a \"user helper\"."
|
||||
(lambda (port)
|
||||
(display directory port))))
|
||||
|
||||
(define (activate-ptrace-attach)
|
||||
"Allow users to PTRACE_ATTACH their own processes.
|
||||
|
||||
This works around a regression introduced in the default \"security\" policy
|
||||
found in Linux 3.4 onward that prevents users from attaching to their own
|
||||
processes--see Yama.txt in the Linux source tree for the rationale. This
|
||||
sounds like an unacceptable restriction for little or no security
|
||||
improvement."
|
||||
(call-with-output-file "/proc/sys/kernel/yama/ptrace_scope"
|
||||
(lambda (port)
|
||||
(display 0 port))))
|
||||
|
||||
|
||||
(define %current-system
|
||||
;; The system that is current (a symlink.) This is not necessarily the same
|
||||
|
||||
Reference in New Issue
Block a user