39 lines
814 B
Text
39 lines
814 B
Text
# apparmor.d - Full set of apparmor profiles
|
|
# Copyright (C) 2022 Alexandre Pujol <alexandre@pujol.io>
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
abi <abi/3.0>,
|
|
|
|
include <tunables/global>
|
|
|
|
@{exec_path} = /{usr/,}{s,}bin/mount.zfs
|
|
profile mount-zfs @{exec_path} flags=(complain) {
|
|
include <abstractions/base>
|
|
include <abstractions/nameservice-strict>
|
|
|
|
capability sys_admin, # To mount anything.
|
|
|
|
@{exec_path} mr,
|
|
|
|
@{MOUNTDIRS}/ r,
|
|
@{MOUNTS}/ r,
|
|
@{MOUNTS}/*/ r,
|
|
|
|
mount fstype=zfs -> @{MOUNTDIRS}/,
|
|
mount fstype=zfs -> @{MOUNTS}/,
|
|
mount fstype=zfs -> @{MOUNTS}/*/,
|
|
mount fstype=zfs -> /,
|
|
mount fstype=zfs -> /*/,
|
|
|
|
umount @{MOUNTDIRS}/,
|
|
umount @{MOUNTS}/,
|
|
umount @{MOUNTS}/*/,
|
|
umount /,
|
|
umount /*/,
|
|
|
|
@{PROC}/@{pids}/mounts r,
|
|
|
|
/dev/zfs rw,
|
|
|
|
include if exists <local/mount-zfs>
|
|
}
|