mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-11-14 23:43:56 +01:00
172 lines
4.5 KiB
Plaintext
172 lines
4.5 KiB
Plaintext
# apparmor.d - Full set of apparmor profiles
|
|
# Copyright (C) 2017-2021 Mikhail Morfikov
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
abi <abi/3.0>,
|
|
|
|
include <tunables/global>
|
|
|
|
# Video/audio extensions:
|
|
# a52, aac, ac3, mka, flac, mp1, mp2, mp3, mpc, oga, oma, wav, wv, wm, wma, 3g2, 3gp, 3gp2, 3gpp,
|
|
# asf, avi, divx, m1v, m2v, m4v, mkv, mov, mp4, mpa, mpe, mpg, mpeg, mpeg1, mpeg2, mpeg4, ogg, ogm,
|
|
# ogx, ogv, rm, rmvb, webm, wmv, wtv, mp2t
|
|
@{vlc_ext} = [aA]{52,[aA][cC],[cC]3}
|
|
@{vlc_ext} += [mM][kK][aA]
|
|
@{vlc_ext} += [fF][lL][aA][cC]
|
|
@{vlc_ext} += [mM][pP][123cC]
|
|
@{vlc_ext} += [oO][gGmM][aA]
|
|
@{vlc_ext} += [wW]{,[aA]}[vV]
|
|
@{vlc_ext} += [wW][mM]{,[aA]}
|
|
@{vlc_ext} += 3[gG]{[2pP],[pP][2pP]}
|
|
@{vlc_ext} += [aA][sS][fF]
|
|
@{vlc_ext} += [aA][vV][iI]
|
|
@{vlc_ext} += [dD][iI][vV][xX]
|
|
@{vlc_ext} += [mM][124][vV]
|
|
@{vlc_ext} += [mM][kKoO][vV]
|
|
@{vlc_ext} += [mM][pP][4aAeEgG]
|
|
@{vlc_ext} += [mM][pP][eE][gG]{,[124]}
|
|
@{vlc_ext} += [oO][gG][gGmMxXvV]
|
|
@{vlc_ext} += [rR][mM]{,[vV][bB]}
|
|
@{vlc_ext} += [wW][eE][bB][mM]
|
|
@{vlc_ext} += [wW][mMtT][vV]
|
|
@{vlc_ext} += [mM][pP]2[tT]
|
|
|
|
# Image extensions
|
|
# bmp, jpg, jpeg, png, gif
|
|
@{vlc_ext} += [bB][mM][pP]
|
|
@{vlc_ext} += [jJ][pP]{,[eE]}[gG]
|
|
@{vlc_ext} += [pP][nN][gG]
|
|
@{vlc_ext} += [gG][iI][fF]
|
|
|
|
# Subtitle extensions:
|
|
# srt, txt, sub
|
|
@{vlc_ext} += [sS][rR][tT]
|
|
@{vlc_ext} += [tT][xX][tT]
|
|
@{vlc_ext} += [sS][uU][bB]
|
|
|
|
# Playlist extensions:
|
|
# m3u, m3u8, pls
|
|
@{vlc_ext} += [mM]3[uU]{,8}
|
|
@{vlc_ext} += [pP][lL][sS]
|
|
|
|
@{exec_path} = /{usr/,}bin/{c,}vlc
|
|
profile vlc @{exec_path} {
|
|
include <abstractions/base>
|
|
include <abstractions/consoles>
|
|
include <abstractions/opencl-intel>
|
|
include <abstractions/gtk>
|
|
include <abstractions/fonts>
|
|
include <abstractions/fontconfig-cache-read>
|
|
include <abstractions/freedesktop.org>
|
|
include <abstractions/mesa>
|
|
include <abstractions/audio>
|
|
include <abstractions/nvidia>
|
|
include <abstractions/qt5-settings-write>
|
|
include <abstractions/qt5-compose-cache-write>
|
|
include <abstractions/vlc-art-cache-write>
|
|
include <abstractions/nameservice-strict>
|
|
include <abstractions/vulkan>
|
|
include <abstractions/user-download-strict>
|
|
include <abstractions/ssl_certs>
|
|
include <abstractions/devices-usb>
|
|
include <abstractions/deny-root-dir-access>
|
|
|
|
signal (receive) set=(term, kill) peer=anyremote//*,
|
|
|
|
network inet dgram,
|
|
network inet6 dgram,
|
|
network inet stream,
|
|
network inet6 stream,
|
|
network netlink raw,
|
|
|
|
@{exec_path} mrix,
|
|
|
|
# Which media files VLC should be able to open
|
|
/ r,
|
|
/home/ r,
|
|
owner @{HOME}/ r,
|
|
owner @{HOME}/**/ r,
|
|
/media/ r,
|
|
owner /media/**/ r,
|
|
owner /{home,media}/**.@{vlc_ext} rw,
|
|
|
|
/var/lib/dbus/machine-id r,
|
|
/etc/machine-id r,
|
|
|
|
# VLC files
|
|
/usr/share/vlc/{,**} r,
|
|
|
|
# VLC config files
|
|
owner @{HOME}/ r,
|
|
owner @{HOME}/.config/vlc/ rw,
|
|
owner @{HOME}/.config/vlc/* rwkl -> @{HOME}/.config/vlc/#[0-9]*[0-9],
|
|
owner @{HOME}/.local/share/vlc/{,*} rw,
|
|
|
|
owner @{HOME}/.cache/ rw,
|
|
owner @{HOME}/.cache/vlc/{,**} rw,
|
|
owner @{HOME}/.cache/#[0-9]*[0-9] rw,
|
|
|
|
# To configure Qt5 settings (theme, font, icons, etc.) under DE/WM without Qt integration
|
|
owner @{HOME}/.config/qt5ct/{,**} r,
|
|
/usr/share/qt5ct/** r,
|
|
|
|
/dev/shm/#[0-9]*[0-9] rw,
|
|
|
|
deny owner @{PROC}/@{pid}/cmdline r,
|
|
owner @{PROC}/@{pid}/mountinfo r,
|
|
owner @{PROC}/@{pid}/mounts r,
|
|
@{PROC}/@{pid}/net/if_inet6 r,
|
|
deny @{PROC}/sys/kernel/random/boot_id r,
|
|
|
|
# Udev enumeration
|
|
@{sys}/bus/ r,
|
|
@{sys}/bus/**/devices/ r,
|
|
@{sys}/devices/**/uevent r,
|
|
@{sys}/class/ r,
|
|
@{sys}/class/**/ r,
|
|
@{run}/udev/data/b254:[0-9]* r, # for /dev/zram*
|
|
@{run}/udev/data/b253:[0-9]* r, # for /dev/dm*
|
|
@{run}/udev/data/b8:[0-9]* r, # for /dev/sd*
|
|
@{run}/udev/data/b7:[0-9]* r, # for /dev/loop*
|
|
|
|
/etc/fstab r,
|
|
|
|
/usr/share/hwdata/pnp.ids r,
|
|
|
|
# Be able to turn off the screensaver while playing movies
|
|
/{usr/,}bin/xdg-screensaver rCx -> xdg-screensaver,
|
|
|
|
# Silencer
|
|
deny /{usr/,}lib/@{multiarch}/vlc/{,**} w,
|
|
|
|
# file_inherit
|
|
owner /dev/tty[0-9]* rw,
|
|
owner @{HOME}/.anyRemote/anyremote.stdout w,
|
|
|
|
|
|
profile xdg-screensaver {
|
|
include <abstractions/base>
|
|
include <abstractions/consoles>
|
|
|
|
/{usr/,}bin/xdg-screensaver mr,
|
|
|
|
/{usr/,}bin/{,ba,da}sh rix,
|
|
/{usr/,}bin/mv rix,
|
|
/{usr/,}bin/{,e}grep rix,
|
|
/{usr/,}bin/sed rix,
|
|
/{usr/,}bin/which rix,
|
|
/{usr/,}bin/xset rix,
|
|
/{usr/,}bin/xautolock rix,
|
|
/{usr/,}bin/dbus-send rix,
|
|
|
|
owner @{HOME}/.Xauthority r,
|
|
|
|
# file_inherit
|
|
/dev/dri/card[0-9]* rw,
|
|
network inet stream,
|
|
network inet6 stream,
|
|
}
|
|
|
|
include if exists <local/vlc>
|
|
}
|