# apparmor.d - Full set of apparmor profiles # Copyright (C) 2021 Mikhail Morfikov # Copyright (C) 2022-2024 Alexandre Pujol # SPDX-License-Identifier: GPL-2.0-only abi , include @{exec_path} = @{bin}/coredumpctl profile coredumpctl @{exec_path} flags=(complain) { include include capability dac_read_search, capability net_admin, capability sys_resource, signal (send) peer=child-pager, @{exec_path} mr, @{bin}/gdb rCx -> gdb, @{pager_path} rPx -> child-pager, /var/lib/dbus/machine-id r, /etc/machine-id r, /var/lib/systemd/coredump/core.*.@{int}.@{hex}.@{int}.@{int}.zst r, /{run,var}/log/journal/ r, /{run,var}/log/journal/@{hex32}/ r, /{run,var}/log/journal/@{hex32}/user-@{hex}.journal* r, /{run,var}/log/journal/@{hex32}/system.journal* r, /{run,var}/log/journal/@{hex32}/system@@{hex}.journal* r, owner @{tmp}/*.coredump w, owner @{tmp}/core.* w, owner /var/tmp/coredump-* rw, @{PROC}/1/cgroup r, @{PROC}/sys/fs/nr_open r, owner @{PROC}/@{pid}/cgroup r, profile gdb { include include ptrace (trace), @{bin}/gdb mr, @{bin}/iconv rix, @{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/** r, /etc/inputrc r, /etc/gdb/** r, owner /var/tmp/coredump-* rw, @{PROC}/@{pids}/fd/ r, include if exists } include if exists } # vim:syntax=apparmor