2020-09-12 17:19:23 +02:00
|
|
|
# vim:syntax=apparmor
|
|
|
|
# ------------------------------------------------------------------
|
|
|
|
#
|
2021-01-10 16:35:07 +01:00
|
|
|
# Copyright (C) 2019-2021 Mikhail Morfikov
|
2020-09-12 17:19:23 +02:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of version 2 of the GNU General Public
|
|
|
|
# License published by the Free Software Foundation.
|
|
|
|
#
|
|
|
|
# ------------------------------------------------------------------
|
|
|
|
|
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/f3fix
|
|
|
|
profile f3fix @{exec_path} {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/disks-write>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
# To remove the following errors:
|
|
|
|
# Error: Partition(s) * on /dev/sdb have been written, but we have been unable to inform the
|
|
|
|
# kernel of the change, probably because it/they are in use. As a result, the old partition(s)
|
|
|
|
# will remain in use. You should reboot now before making further changes.
|
|
|
|
capability sys_admin,
|
|
|
|
|
|
|
|
# Needed? (##FIXME##)
|
|
|
|
capability sys_rawio,
|
|
|
|
|
|
|
|
# Needed?
|
|
|
|
ptrace (read),
|
|
|
|
|
|
|
|
@{exec_path} mr,
|
|
|
|
|
2020-12-09 10:30:52 +01:00
|
|
|
/{usr/,}bin/{,ba,da}sh rix,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
/{usr/,}sbin/dmidecode rPx,
|
|
|
|
|
2020-12-09 10:30:52 +01:00
|
|
|
/{usr/,}bin/udevadm rCx -> udevadm,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
owner @{PROC}/@{pid}/mounts r,
|
|
|
|
@{PROC}/swaps r,
|
|
|
|
|
|
|
|
profile udevadm {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
ptrace (read),
|
|
|
|
|
|
|
|
/{usr/,}bin/udevadm mr,
|
|
|
|
|
|
|
|
/etc/udev/udev.conf r,
|
|
|
|
|
|
|
|
owner @{PROC}/@{pid}/stat r,
|
|
|
|
owner @{PROC}/@{pid}/cgroup r,
|
|
|
|
@{PROC}/cmdline r,
|
|
|
|
@{PROC}/1/sched r,
|
|
|
|
@{PROC}/1/environ r,
|
|
|
|
@{PROC}/sys/kernel/osrelease r,
|
|
|
|
@{PROC}/sys/kernel/random/boot_id r,
|
|
|
|
|
|
|
|
@{sys}/firmware/efi/efivars/SecureBoot-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]* r,
|
|
|
|
|
|
|
|
# file_inherit
|
|
|
|
/dev/sd[a-z] rw,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include if exists <local/f3fix>
|
2020-09-12 17:19:23 +02:00
|
|
|
}
|
|
|
|
|