apparmor.d/apparmor.d/profiles-s-z/smartd
Jeroen Rijken 40b171ee94 Replace shells with new sh_path variable
Signed-off-by: Jeroen Rijken <jeroen.rijken@xs4all.nl>
2024-02-21 13:56:40 +00:00

56 lines
1.2 KiB
Plaintext

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2018-2021 Mikhail Morfikov
# Copyright (C) 2022 Jeroen Rijken
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{bin}/smartd
profile smartd @{exec_path} {
include <abstractions/base>
include <abstractions/disks-read>
include <abstractions/nameservice-strict>
capability sys_rawio,
capability sys_admin,
# Needed?
audit capability net_admin,
@{exec_path} mr,
@{sh_path} rix,
@{bin}/cat rix,
@{bin}/hostname rix,
@{bin}/mail rix,
@{bin}/mktemp rix,
@{bin}/run-parts rix,
/etc/smartmontools/run.d/* rix,
/usr/share/smartmontools/{smartd-runner,smartd_warning.sh} rix,
/etc/smart_drivedb.h r,
/etc/smartd.conf r,
/etc/smartmontools/smartd_warning.d/{,*} r,
/usr/share/smartmontools/drivedb.h r,
/var/lib/smartmontools/drivedb/drivedb.h r,
/var/lib/smartmontools/smartd.*.state{,~} rw,
/var/lib/smartmontools/attrlog.*.csv rw,
/tmp/tmp.* rw,
@{run}/systemd/notify rw,
@{sys}/class/scsi_host/ r,
@{PROC}/devices r,
/dev/ r,
include if exists <local/smartd>
}