mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-18 17:08:09 +01:00
feat(profiles): initial version of mount.zfs
This commit is contained in:
parent
a792c4cb4e
commit
9ccda2a0a5
1 changed files with 35 additions and 0 deletions
35
apparmor.d/profiles-m-r/mount-zfs
Normal file
35
apparmor.d/profiles-m-r/mount-zfs
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
# 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 /*/,
|
||||||
|
|
||||||
|
include if exists <local/mount-zfs>
|
||||||
|
}
|
Loading…
Reference in a new issue