mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-30 14:55:15 +01:00
74 lines
1.7 KiB
Text
74 lines
1.7 KiB
Text
# apparmor.d - Full set of apparmor profiles
|
|
# Copyright (C) 2019-2022 Mikhail Morfikov
|
|
# Copyright (C) 2022 Alexandre Pujol <alexandre@pujol.io>
|
|
# Copyright (C) 2022 Jeroen Rijken
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
abi <abi/3.0>,
|
|
|
|
include <tunables/global>
|
|
|
|
@{exec_path} = /{usr/,}{s,}bin/mount
|
|
profile mount @{exec_path} flags=(complain) {
|
|
include <abstractions/base>
|
|
include <abstractions/consoles>
|
|
include <abstractions/disks-write>
|
|
include <abstractions/nameservice-strict>
|
|
|
|
capability chown,
|
|
capability dac_read_search,
|
|
capability setgid,
|
|
capability setuid,
|
|
capability sys_admin,
|
|
capability sys_rawio,
|
|
|
|
mount,
|
|
|
|
network inet stream,
|
|
network inet6 stream,
|
|
|
|
ptrace (read) peer=k3s,
|
|
|
|
signal (receive) set=(term, kill),
|
|
|
|
@{exec_path} mr,
|
|
|
|
/{usr/,}{s,}bin/lowntfs-3g rPx,
|
|
/{usr/,}{s,}bin/mount.* rPx,
|
|
/{usr/,}bin/ntfs-3g rPx,
|
|
/{usr/,}bin/sshfs rPx,
|
|
|
|
/etc/fstab r,
|
|
|
|
/var/lib/snapd/snaps/*.snap r,
|
|
|
|
# Mount points
|
|
@{HOME}/ r,
|
|
@{HOME}/*/ r,
|
|
@{HOME}/*/*/ r,
|
|
@{MOUNTS}/ r,
|
|
@{MOUNTS}/*/ r,
|
|
@{MOUNTS}/*/*/ r,
|
|
/media/cdrom[0-9]/ r,
|
|
|
|
# Mount iso/img files
|
|
owner @{HOME}/**.{iso,img,bin,mdf,nrg} rwk,
|
|
owner @{MOUNTS}/**.{iso,img,bin,mdf,nrg} rwk,
|
|
owner @{HOME}/**.{ISO,IMG,BIN,MDF,NRG} rwk,
|
|
owner @{MOUNTS}/**.{ISO,IMG,BIN,MDF,NRG} rwk,
|
|
|
|
owner @{run}/mount/ rw,
|
|
owner @{run}/mount/utab{,.*} rw,
|
|
owner @{run}/mount/utab.lock wk,
|
|
|
|
/tmp/sanity-squashfs-[0-9]* rw,
|
|
/tmp/syscheck-squashfs-[0-9]* rw,
|
|
|
|
@{PROC}/@{pid}/mountinfo r,
|
|
|
|
# The special /dev/loop-control file can be used to create and destroy loop
|
|
# devices or to find the first available loop device.
|
|
/dev/loop-control rw,
|
|
|
|
include if exists <local/mount>
|
|
}
|