apparmor.d/profiles/ffprobe
2021-04-01 16:17:47 +01:00

61 lines
1.8 KiB
Text

# 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
@{ffprobe_ext} = [aA]{52,[aA][cC],[cC]3}
@{ffprobe_ext} += [mM][kK][aA]
@{ffprobe_ext} += [fF][lL][aA][cC]
@{ffprobe_ext} += [mM][pP][123cC]
@{ffprobe_ext} += [oO][gGmM][aA]
@{ffprobe_ext} += [wW]{,[aA]}[vV]
@{ffprobe_ext} += [wW][mM]{,[aA]}
@{ffprobe_ext} += 3[gG]{[2pP],[pP][2pP]}
@{ffprobe_ext} += [aA][sS][fF]
@{ffprobe_ext} += [aA][vV][iI]
@{ffprobe_ext} += [dD][iI][vV][xX]
@{ffprobe_ext} += [mM][124][vV]
@{ffprobe_ext} += [mM][kKoO][vV]
@{ffprobe_ext} += [mM][pP][4aAeEgG]
@{ffprobe_ext} += [mM][pP][eE][gG]{,[124]}
@{ffprobe_ext} += [oO][gG][gGmMxXvV]
@{ffprobe_ext} += [rR][mM]{,[vV][bB]}
@{ffprobe_ext} += [wW][eE][bB][mM]
@{ffprobe_ext} += [wW][mMtT][vV]
@{ffprobe_ext} += [mM][pP]2[tT]
# Subtitle extensions:
# srt, txt, sub
@{ffprobe_ext} += [sS][rR][tT]
@{ffprobe_ext} += [tT][xX][tT]
@{ffprobe_ext} += [sS][uU][bB]
@{exec_path} = /{usr/,}bin/ffprobe
profile ffprobe @{exec_path} {
include <abstractions/base>
include <abstractions/dri-common>
include <abstractions/deny-root-dir-access>
@{exec_path} mr,
# Which media files ffprobe should be able to open
/ r,
/home/ r,
owner @{HOME}/ r,
owner @{HOME}/**/ r,
/media/ r,
owner /media/**/ r,
owner /{home,media}/**.@{ffprobe_ext} rw,
@{sys}/devices/system/node/ r,
@{sys}/devices/system/node/node[0-9]/meminfo r,
include if exists <local/ffprobe>
}