LVM and general update (#68)

* Small fixes

* General update

* Add LVM

* Various small fixes

* Add profile

* Typo

* sbin to regex

* Date and time to extends

* Read cmdline

* Remove grep duplicate

* Small fixes

* Typo

* Permissions for warning scripts

* Add net_admin for multipath
This commit is contained in:
Jeroen 2022-09-06 23:01:17 +02:00 committed by GitHub
parent 1649b427f8
commit 9818daba5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 237 additions and 49 deletions

View file

@ -11,6 +11,7 @@ include <tunables/global>
profile smartd @{exec_path} {
include <abstractions/base>
include <abstractions/disks-read>
include <abstractions/nameservice-strict>
# To remove the following errors:
# Device: /dev/disk/by-id/ata-*, IE (SMART) not enabled, skip device
@ -24,6 +25,14 @@ profile smartd @{exec_path} {
deny capability net_admin,
@{exec_path} mr,
/{usr/,}bin/{,ba,da}sh rix,
/{usr/,}bin/cat rix,
/{usr/,}bin/hostname rix,
/{usr/,}bin/mail rix,
/{usr/,}bin/mktemp rix,
/{usr/,}bin/run-parts rix,
/usr/share/smartmontools/{smartd-runner,smartd_warning.sh} rix,
/etc/smartmontools/run.d/* rix,
/etc/smartd.conf r,
@ -42,6 +51,7 @@ profile smartd @{exec_path} {
@{PROC}/devices r,
/run/systemd/notify rw,
/tmp/tmp.* rw,
include if exists <local/smartd>
}

View file

@ -14,9 +14,12 @@ profile thermald @{exec_path} {
capability sys_boot,
dbus (bind)
bus=system
dbus (bind) bus=system
name=org.freedesktop.thermald,
dbus (send) bus=system path=/org/freedesktop/DBus
interface=org.freedesktop.DBus
member=RequestName,
@{exec_path} mr,

View file

@ -0,0 +1,17 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2022 Jeroen Rijken
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}{,s}bin/update-secureboot-policy
profile update-secureboot-policy @{exec_path} flags=(complain) {
include <abstractions/base>
@{exec_path} rm,
/usr/share/debconf/frontend rPx,
include if exists <local/update-secureboot-policy>
}

View file

@ -45,6 +45,7 @@ profile zed @{exec_path} {
@{sys}/bus/pci/slots/ r,
@{sys}/bus/pci/slots/[0-9]*/address r,
@{sys}/module/zfs/parameters/zfs_zevent_len_max rw,
@{PROC}/@{pids}/mounts r,
owner @{PROC}/@{pids}/fd/ r,