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/udevadm
|
|
|
|
@{exec_path} += /{usr/,}lib/systemd/systemd-udevd
|
|
|
|
profile udevadm @{exec_path} flags=(complain,attach_disconnected) {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/nameservice-strict>
|
|
|
|
include <abstractions/consoles>
|
|
|
|
include <abstractions/systemd-common>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
# (##FIXME##)
|
|
|
|
capability sys_admin,
|
|
|
|
capability net_admin,
|
|
|
|
capability dac_read_search,
|
|
|
|
capability dac_override,
|
|
|
|
capability sys_ptrace,
|
|
|
|
capability sys_resource,
|
|
|
|
capability chown,
|
|
|
|
capability fsetid,
|
|
|
|
capability sys_module,
|
|
|
|
|
|
|
|
ptrace (read),
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
network inet dgram,
|
|
|
|
network inet6 dgram,
|
|
|
|
network netlink raw,
|
|
|
|
|
2020-09-12 17:19:23 +02:00
|
|
|
@{exec_path} mr,
|
|
|
|
|
2021-02-13 15:00:16 +01:00
|
|
|
/{usr/,}bin/{,ba,da}sh rix,
|
|
|
|
/{usr/,}bin/chgrp rix,
|
|
|
|
/{usr/,}bin/chmod rix,
|
|
|
|
/{usr/,}bin/setfacl rix,
|
|
|
|
/{usr/,}bin/logger rix,
|
|
|
|
/{usr/,}bin/nohup rix,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
/{usr/,}sbin/* rPUx,
|
|
|
|
|
|
|
|
/{usr/,}lib/udev/* rPUx,
|
|
|
|
/{usr/,}lib/systemd/systemd-* rPUx,
|
|
|
|
/{usr/,}lib/crda/* rPUx,
|
|
|
|
|
2021-02-13 15:00:16 +01:00
|
|
|
/usr/share/hplip/config_usb_printer.py rPUx,
|
|
|
|
|
2020-09-12 17:19:23 +02:00
|
|
|
/etc/console-setup/*.sh rPUx,
|
|
|
|
|
|
|
|
/etc/default/* r,
|
|
|
|
|
|
|
|
/etc/udev/ r,
|
|
|
|
/etc/udev/udev.conf r,
|
|
|
|
/etc/udev/rules.d/ r,
|
|
|
|
/etc/udev/rules.d/[0-9][0-9]-*.rules r,
|
|
|
|
|
|
|
|
/etc/udev/hwdb.d/ r,
|
|
|
|
/etc/udev/hwdb.d/[0-9][0-9]-*.hwdb r,
|
|
|
|
/etc/udev/hwdb.bin rw,
|
|
|
|
/etc/udev/.#hwdb.bin* rw,
|
|
|
|
|
|
|
|
/etc/modprobe.d/ r,
|
|
|
|
/etc/modprobe.d/*.conf r,
|
|
|
|
|
|
|
|
/etc/systemd/network/ r,
|
|
|
|
/etc/systemd/network/[0-9][0-9]-*.link r,
|
|
|
|
|
2020-10-25 10:23:34 +01:00
|
|
|
@{run}/udev/ rw,
|
|
|
|
@{run}/udev/** rw,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2020-10-25 10:23:34 +01:00
|
|
|
@{run}/systemd/seats/seat[0-9]* r,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
@{sys}/** rw,
|
|
|
|
|
|
|
|
/dev/ rw,
|
|
|
|
/dev/** rwk,
|
|
|
|
|
2021-02-13 15:00:16 +01:00
|
|
|
owner @{PROC}/@{pid}/loginuid r,
|
2020-09-12 17:19:23 +02:00
|
|
|
owner @{PROC}/@{pid}/oom_score_adj rw,
|
|
|
|
owner @{PROC}/@{pid}/fd/ r,
|
|
|
|
@{PROC}/@{pids}/cgroup r,
|
|
|
|
@{PROC}/sys/kernel/random/boot_id r,
|
|
|
|
|
|
|
|
# file_inherit
|
|
|
|
owner @{HOME}/.xsession-errors w,
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include if exists <local/udevadm>
|
2020-09-12 17:19:23 +02:00
|
|
|
}
|