2021-04-01 17:17:47 +02:00
|
|
|
# apparmor.d - Full set of apparmor profiles
|
|
|
|
# Copyright (C) 2019-2021 Mikhail Morfikov
|
|
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
abi <abi/3.0>,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include <tunables/global>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
@{exec_path} = /{usr/,}bin/kernel-install
|
|
|
|
profile kernel-install @{exec_path} flags=(complain) {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/consoles>
|
|
|
|
include <abstractions/nameservice-strict>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
@{exec_path} r,
|
2020-12-09 10:30:52 +01:00
|
|
|
/{usr/,}bin/{,ba,da}sh rix,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
/{usr/,}bin/mountpoint rix,
|
|
|
|
/{usr/,}bin/sort rix,
|
|
|
|
/{usr/,}bin/rm rix,
|
|
|
|
/{usr/,}bin/mkdir rix,
|
|
|
|
/{usr/,}bin/cp rix,
|
|
|
|
/{usr/,}bin/chown rix,
|
|
|
|
/{usr/,}bin/chmod rix,
|
|
|
|
/{usr/,}bin/basename rix,
|
|
|
|
|
|
|
|
/{usr/,}bin/kmod rCx -> kmod,
|
|
|
|
|
|
|
|
/{usr/,}lib/kernel/install.d/ r,
|
|
|
|
/{usr/,}lib/kernel/install.d/[0-9][0-9]-*.install rix,
|
|
|
|
|
|
|
|
/etc/kernel/install.d/ r,
|
|
|
|
/etc/kernel/install.d/*.install rix,
|
|
|
|
|
|
|
|
owner /tmp/sh-thd.* rw,
|
|
|
|
|
|
|
|
owner /boot/{vmlinuz,initrd.img}-* r,
|
|
|
|
owner /boot/[a-f0-9]*/*/ rw,
|
|
|
|
owner /boot/[a-f0-9]*/*/{linux,initrd} w,
|
|
|
|
owner /boot/loader/ rw,
|
|
|
|
owner /boot/loader/entries/ rw,
|
|
|
|
owner /boot/loader/entries/*.conf w,
|
|
|
|
|
|
|
|
/{usr/,}lib/modules/*/modules.* w,
|
|
|
|
|
|
|
|
/etc/os-release r,
|
|
|
|
/{usr/,}lib/os-release r,
|
|
|
|
|
|
|
|
/etc/kernel/tries r,
|
|
|
|
|
|
|
|
/etc/kernel/cmdline r,
|
|
|
|
@{PROC}/cmdline r,
|
|
|
|
|
|
|
|
/var/lib/dbus/machine-id r,
|
|
|
|
/etc/machine-id r,
|
|
|
|
|
|
|
|
|
|
|
|
profile kmod flags=(complain) {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
/{usr/,}bin/kmod mr,
|
|
|
|
|
|
|
|
#@{PROC}/cmdline r,
|
|
|
|
#@{PROC}/modules r,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include if exists <local/kernel-install>
|
2020-09-12 17:19:23 +02:00
|
|
|
}
|