daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
d0811f
# The ptrace system call is used for interprocess services,
d0811f
# communication and introspection (like synchronisation, signaling,
d0811f
# debugging, tracing and profiling) of processes.
d0811f
#
d0811f
# Usage of ptrace is restricted by normal user permissions. Normal
d0811f
# unprivileged processes cannot use ptrace on processes that they
d0811f
# cannot send signals to or processes that are running set-uid or
d0811f
# set-gid. Nevertheless, processes running under the same uid will
d0811f
# usually be able to ptrace one another.
d0811f
#
d0811f
# Fedora enables the Yama security mechanism which restricts ptrace
d0811f
# even further. Sysctl setting kernel.yama.ptrace_scope can have one
d0811f
# of the following values:
d0811f
#
d0811f
# 0 - Normal ptrace security permissions.
d0811f
# 1 - Restricted ptrace. Only child processes plus normal permissions.
d0811f
# 2 - Admin-only attach. Only executables with CAP_SYS_PTRACE.
d0811f
# 3 - No attach. No process may call ptrace at all. Irrevocable.
d0811f
#
d0811f
# For more information see Documentation/security/Yama.txt in the
d0811f
# kernel sources.
d0811f
#
d0811f
# The default is 1., which allows tracing of child processes, but
d0811f
# forbids tracing of arbitrary processes. This allows programs like
d0811f
# gdb or strace to work when the most common way of having the
d0811f
# debugger start the debuggee is used:
d0811f
#    gdb /path/to/program ...
d0811f
# Attaching to already running programs is NOT allowed:
d0811f
#    gdb -p ...
d0811f
# This default setting is suitable for the common case, because it
d0811f
# reduces the risk that one hacked process can be used to attack other
d0811f
# processes. (For example, a hacked firefox process in a user session
d0811f
# will not be able to ptrace the keyring process and extract passwords
d0811f
# stored only in memory.)
d0811f
#
d0811f
# Developers and administrators might want to disable those protections
d0811f
# to be able to attach debuggers to existing processes. Use
d0811f
#   sysctl kernel.yama.ptrace_scope=0
d0811f
# for change the setting temporarily, or copy this file to
d0811f
# /etc/sysctl.d/20-yama-ptrace.conf to set it for future boots.
d0811f
d0811f
kernel.yama.ptrace_scope = 0