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