2022-07-10 15:28:44 +02:00
|
|
|
# apparmor.d - Full set of apparmor profiles
|
|
|
|
# Copyright (C) 2022 Jeroen Rijken
|
|
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
|
2022-07-05 20:45:01 +02:00
|
|
|
abi <abi/3.0>,
|
|
|
|
|
|
|
|
include <tunables/global>
|
|
|
|
|
|
|
|
@{exec_path} = /{usr/,}{local/,}{s,}bin/zfs
|
2022-07-23 15:41:40 +02:00
|
|
|
profile zfs @{exec_path} {
|
2022-07-05 20:45:01 +02:00
|
|
|
include <abstractions/base>
|
2022-08-01 18:31:32 +02:00
|
|
|
include <abstractions/consoles>
|
2022-07-05 20:45:01 +02:00
|
|
|
|
|
|
|
capability sys_admin,
|
2022-07-23 13:22:38 +02:00
|
|
|
capability dac_read_search,
|
|
|
|
|
|
|
|
mount fstype=zfs,
|
|
|
|
umount fstype=zfs,
|
2022-07-05 20:45:01 +02:00
|
|
|
|
2022-07-18 00:04:13 +02:00
|
|
|
@{exec_path} mr,
|
|
|
|
|
|
|
|
/etc/zfs/zfs-list.cache/{,*} rwk,
|
2022-07-05 20:45:01 +02:00
|
|
|
|
2022-08-01 18:31:06 +02:00
|
|
|
# Sanoid generates temorary files with random names including underscores, directly under /tmp.
|
|
|
|
# https://github.com/jimsalterjrs/sanoid/issues/758
|
|
|
|
/tmp/* rw,
|
|
|
|
|
2022-07-18 00:04:13 +02:00
|
|
|
@{run}/zfs-list.cache@* rw,
|
|
|
|
|
2022-07-23 13:22:38 +02:00
|
|
|
@{PROC}/@{pids}/mounts r,
|
|
|
|
@{PROC}/sys/fs/pipe-max-size r,
|
|
|
|
|
2022-07-09 20:33:47 +02:00
|
|
|
/dev/zfs rw,
|
|
|
|
|
2022-07-05 20:45:01 +02:00
|
|
|
include if exists <local/zfs>
|
|
|
|
}
|