mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-11-16 00:13:48 +01:00
72 lines
1.5 KiB
Plaintext
72 lines
1.5 KiB
Plaintext
# 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} {
|
|
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 @{user_img_dirs}/{,**} 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>
|
|
}
|