39 lines
880 B
Text
39 lines
880 B
Text
# apparmor.d - Full set of apparmor profiles
|
|
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
abi <abi/3.0>,
|
|
|
|
include <tunables/global>
|
|
|
|
@{exec_path} = @{lib}/systemd/systemd-binfmt
|
|
profile systemd-binfmt @{exec_path} flags=(attach_disconnected) {
|
|
include <abstractions/base>
|
|
|
|
capability net_admin,
|
|
|
|
ptrace (read) peer=unconfined,
|
|
|
|
@{exec_path} mr,
|
|
|
|
@{bin}/* r,
|
|
|
|
# Config file locations
|
|
/etc/binfmt.d/{,*.conf} r,
|
|
@{run}/binfmt.d/{,*.conf} r,
|
|
/usr/lib/binfmt.d/{,*.conf} r,
|
|
|
|
@{PROC}/1/environ r,
|
|
@{PROC}/cmdline r,
|
|
@{PROC}/sys/fs/binfmt_misc/register w,
|
|
@{PROC}/sys/fs/binfmt_misc/status w,
|
|
@{PROC}/sys/kernel/osrelease r,
|
|
owner @{PROC}/@{pid}/stat r,
|
|
|
|
/dev/tty@{int} rw,
|
|
/dev/pts/@{int} rw,
|
|
|
|
deny /apparmor/.null rw,
|
|
|
|
include if exists <local/systemd-binfmt>
|
|
}
|