# apparmor.d - Full set of apparmor profiles # Copyright (C) 2021 Mikhail Morfikov # Copyright (C) 2022 Alexandre Pujol # SPDX-License-Identifier: GPL-2.0-only abi , include @{exec_path} = /{usr/,}bin/coredumpctl profile coredumpctl @{exec_path} flags=(complain) { include include capability net_admin, signal (send) peer=child-pager, @{exec_path} mr, /{usr/,}bin/gdb rCx -> gdb, /{usr/,}bin/less rPx -> child-pager, /{usr/,}bin/more rPx -> child-pager, /{usr/,}bin/pager rPx -> child-pager, /var/lib/dbus/machine-id r, /etc/machine-id r, /var/lib/systemd/coredump/core.*.[0-9]*.@{hex}.[0-9]*.[0-9]*.zst r, /{run,var}/log/journal/ r, /{run,var}/log/journal/@{hex}/ r, /{run,var}/log/journal/@{hex}/user-@{hex}.journal* r, /{run,var}/log/journal/@{hex}/system.journal* r, /{run,var}/log/journal/@{hex}/system@@{hex}.journal* r, owner /tmp/*.coredump w, owner /tmp/core.* w, owner /var/tmp/coredump-* rw, @{PROC}/1/cgroup r, owner @{PROC}/@{pid}/cgroup r, profile gdb { include include include ptrace (trace), /{usr/,}bin/gdb mr, /{usr/,}bin/iconv rix, /{usr/,}{s,}bin/* r, /usr/share/gcc-[0-9]*/python/{,**} r, /usr/share/gcc/** r, /usr/share/gdb/{,**} r, /usr/share/glib-2.0/gdb/{,**} r, /usr/share/terminfo/x/xterm-256color r, /etc/inputrc r, /etc/gdb/** r, owner /var/tmp/coredump-* rw, @{PROC}/@{pids}/fd/ r, } include if exists }