apparmor.d -> profiles
This commit is contained in:
parent
c408a878b7
commit
e9b8e62fcd
726 changed files with 0 additions and 0 deletions
75
profiles/partprobe
Normal file
75
profiles/partprobe
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
# vim:syntax=apparmor
|
||||
# ------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (C) 2019-2021 Mikhail Morfikov
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
abi <abi/3.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = /{usr/,}sbin/partprobe
|
||||
profile partprobe @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/disks-write>
|
||||
|
||||
# To remove the following errors:
|
||||
# device-mapper: version ioctl on failed: Permission denied
|
||||
# Incompatible libdevmapper 1.02.167 (2019-11-30) and kernel driver (unknown version).
|
||||
capability sys_admin,
|
||||
|
||||
# To remove the following errors:
|
||||
# kernel: device-mapper: core: partprobe: sending ioctl 1261 to DM device without required
|
||||
# privilege.
|
||||
capability sys_rawio,
|
||||
|
||||
# Needed?
|
||||
ptrace (read),
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
/{usr/,}bin/{,ba,da}sh rix,
|
||||
|
||||
/{usr/,}bin/udevadm rCx -> udevadm,
|
||||
|
||||
/{usr/,}sbin/dmidecode rPx,
|
||||
|
||||
owner @{PROC}/@{pid}/mounts r,
|
||||
@{PROC}/swaps r,
|
||||
@{PROC}/devices r,
|
||||
|
||||
/dev/mapper/ r,
|
||||
/dev/mapper/control rw,
|
||||
|
||||
|
||||
profile udevadm {
|
||||
include <abstractions/base>
|
||||
|
||||
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}/1/cgroup r,
|
||||
@{PROC}/sys/kernel/osrelease r,
|
||||
@{PROC}/sys/kernel/random/boot_id r,
|
||||
|
||||
# file_inherit
|
||||
include <abstractions/disks-write> # lots of files in this abstraction get inherited
|
||||
/dev/mapper/control rw,
|
||||
|
||||
}
|
||||
|
||||
include if exists <local/partprobe>
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue