diff --git a/apparmor.d/profiles-a-f/ffmpeg b/apparmor.d/profiles-a-f/ffmpeg index 0d423f59..b1d1efdb 100644 --- a/apparmor.d/profiles-a-f/ffmpeg +++ b/apparmor.d/profiles-a-f/ffmpeg @@ -1,57 +1,21 @@ # apparmor.d - Full set of apparmor profiles # Copyright (C) 2017-2021 Mikhail Morfikov +# Copyright (C) 2023 Alexandre Pujol # SPDX-License-Identifier: GPL-2.0-only abi , include -# 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 -@{ffmpeg_ext} = [aA]{52,[aA][cC],[cC]3} -@{ffmpeg_ext} += [mM][kK][aA] -@{ffmpeg_ext} += [fF][lL][aA][cC] -@{ffmpeg_ext} += [mM][pP][123cC] -@{ffmpeg_ext} += [oO][gGmM][aA] -@{ffmpeg_ext} += [wW]{,[aA]}[vV] -@{ffmpeg_ext} += [wW][mM]{,[aA]} -@{ffmpeg_ext} += 3[gG]{[2pP],[pP][2pP]} -@{ffmpeg_ext} += [aA][sS][fF] -@{ffmpeg_ext} += [aA][vV][iI] -@{ffmpeg_ext} += [dD][iI][vV][xX] -@{ffmpeg_ext} += [mM][124][vV] -@{ffmpeg_ext} += [mM][kKoO][vV] -@{ffmpeg_ext} += [mM][pP][4aAeEgG] -@{ffmpeg_ext} += [mM][pP][eE][gG]{,[124]} -@{ffmpeg_ext} += [oO][gG][gGmMxXvV] -@{ffmpeg_ext} += [rR][mM]{,[vV][bB]} -@{ffmpeg_ext} += [wW][eE][bB][mM] -@{ffmpeg_ext} += [wW][mMtT][vV] -@{ffmpeg_ext} += [mM][pP]2[tT] - -# Subtitle extensions: -# srt, txt, sub -@{ffmpeg_ext} += [sS][rR][tT] -@{ffmpeg_ext} += [tT][xX][tT] -@{ffmpeg_ext} += [sS][uU][bB] - -# FFmpeg specific extensions: -# ts, part -@{ffmpeg_ext} += [tT][sS] -@{ffmpeg_ext} += [pP][aA][rR][tT] - @{exec_path} = /{usr/,}bin/ffmpeg profile ffmpeg @{exec_path} { include + include include include - include include include include - include network inet dgram, network inet6 dgram, @@ -60,28 +24,19 @@ profile ffmpeg @{exec_path} { @{exec_path} mr, - # Which files ffmpeg should be able to open - / r, - /home/ r, - owner @{HOME}/ r, - owner @{HOME}/**/ r, - @{MOUNTS} r, - owner @{MOUNTS}/**/ r, - owner /{home,media}/**.@{ffmpeg_ext}{,.[0-9]*} rw, + /etc/machine-id r, + /var/lib/dbus/machine-id r, + + owner @{HOME}/.Xauthority r, + + owner @{user_music_dirs}/** rw, + owner @{user_videos_dirs}/** rw, + + owner /tmp/*.{png,jpg} rw, # To generate thumbnails in some apps + owner /tmp/vidcutter/** rw, # TMP files for apps using ffmpeg @{sys}/devices/system/node/ r, @{sys}/devices/system/node/node[0-9]/meminfo r, - owner @{HOME}/.Xauthority r, - - /var/lib/dbus/machine-id r, - /etc/machine-id r, - - # To generate thumbnails in some apps - owner /tmp/*.{png,jpg} rw, - - # TMP files for apps using ffmpeg - owner /tmp/vidcutter/** rw, - include if exists } diff --git a/apparmor.d/profiles-a-f/ffplay b/apparmor.d/profiles-a-f/ffplay index 1f51d4f7..ab67a8e5 100644 --- a/apparmor.d/profiles-a-f/ffplay +++ b/apparmor.d/profiles-a-f/ffplay @@ -1,51 +1,20 @@ # apparmor.d - Full set of apparmor profiles # Copyright (C) 2017-2021 Mikhail Morfikov +# Copyright (C) 2023 Alexandre Pujol # SPDX-License-Identifier: GPL-2.0-only abi , include -# 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 -@{ffplay_ext} = [aA]{52,[aA][cC],[cC]3} -@{ffplay_ext} += [mM][kK][aA] -@{ffplay_ext} += [fF][lL][aA][cC] -@{ffplay_ext} += [mM][pP][123cC] -@{ffplay_ext} += [oO][gGmM][aA] -@{ffplay_ext} += [wW]{,[aA]}[vV] -@{ffplay_ext} += [wW][mM]{,[aA]} -@{ffplay_ext} += 3[gG]{[2pP],[pP][2pP]} -@{ffplay_ext} += [aA][sS][fF] -@{ffplay_ext} += [aA][vV][iI] -@{ffplay_ext} += [dD][iI][vV][xX] -@{ffplay_ext} += [mM][124][vV] -@{ffplay_ext} += [mM][kKoO][vV] -@{ffplay_ext} += [mM][pP][4aAeEgG] -@{ffplay_ext} += [mM][pP][eE][gG]{,[124]} -@{ffplay_ext} += [oO][gG][gGmMxXvV] -@{ffplay_ext} += [rR][mM]{,[vV][bB]} -@{ffplay_ext} += [wW][eE][bB][mM] -@{ffplay_ext} += [wW][mMtT][vV] -@{ffplay_ext} += [mM][pP]2[tT] - -# Subtitle extensions: -# srt, txt, sub -@{ffplay_ext} += [sS][rR][tT] -@{ffplay_ext} += [tT][xX][tT] -@{ffplay_ext} += [sS][uU][bB] - @{exec_path} = /{usr/,}bin/ffplay profile ffplay @{exec_path} { include - include - include include + include include include - include + include network inet stream, network inet6 stream, @@ -54,18 +23,12 @@ profile ffplay @{exec_path} { @{exec_path} mr, - # Which media files ffplay should be able to open - / r, - /home/ r, - owner @{HOME}/ r, - owner @{HOME}/**/ r, - @{MOUNTS}/ r, - owner @{MOUNTS}/**/ r, - owner /{home,media}/**.@{ffplay_ext} rw, - /etc/machine-id r, /var/lib/dbus/machine-id r, + owner @{user_music_dirs}/** rw, + owner @{user_videos_dirs}/** rw, + @{sys}/devices/system/node/ r, @{sys}/devices/system/node/node[0-9]/meminfo r, diff --git a/apparmor.d/profiles-a-f/ffprobe b/apparmor.d/profiles-a-f/ffprobe index 628a0225..c80a56b2 100644 --- a/apparmor.d/profiles-a-f/ffprobe +++ b/apparmor.d/profiles-a-f/ffprobe @@ -1,60 +1,23 @@ # apparmor.d - Full set of apparmor profiles # Copyright (C) 2017-2021 Mikhail Morfikov +# Copyright (C) 2023 Alexandre Pujol # SPDX-License-Identifier: GPL-2.0-only abi , include -# 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 include include include - include @{exec_path} mr, - # Which media files ffprobe should be able to open - / r, - /home/ r, - owner @{HOME}/ r, - owner @{HOME}/**/ r, - @{MOUNTS}/ r, - owner @{MOUNTS}/**/ r, - owner /{home,media}/**.@{ffprobe_ext} rw, + owner @{user_music_dirs}/** rw, + owner @{user_videos_dirs}/** rw, @{sys}/devices/system/node/ r, @{sys}/devices/system/node/node[0-9]/meminfo r, diff --git a/apparmor.d/profiles-g-l/hypnotix b/apparmor.d/profiles-g-l/hypnotix index 2f5de1eb..f857e080 100644 --- a/apparmor.d/profiles-g-l/hypnotix +++ b/apparmor.d/profiles-g-l/hypnotix @@ -1,35 +1,30 @@ # apparmor.d - Full set of apparmor profiles # Copyright (C) 2021 Mikhail Morfikov +# Copyright (C) 2023 Alexandre Pujol # SPDX-License-Identifier: GPL-2.0-only abi , include -# Playlist extensions: -# m3u, m3u8, pls -@{hypnotix_ext} = [mM]3[uU]{,8} -@{hypnotix_ext} += [pP][lL][sS] - @{exec_path} = /{usr/,}bin/hypnotix @{exec_path} += /{usr/,}lib/hypnotix/hypnotix.py profile hypnotix @{exec_path} { include - include - include - include include - include - include + include include + include include + include include include - include - include + include include - include include + include + include + include signal (send) set=(term, kill) peer=youtube-dl, signal (send) set=(term, kill) peer=yt-dlp, @@ -43,9 +38,8 @@ profile hypnotix @{exec_path} { @{exec_path} rix, /{usr/,}bin/python3.[0-9]* r, - /{usr/,}bin/{,ba,da}sh rix, - /{usr/,}{s,}bin/ldconfig rix, + /{usr/,}bin/{,ba,da}sh rix, /{usr/,}bin/mkdir rix, /{usr/,}bin/xdg-screensaver rCx -> xdg-screensaver, @@ -54,37 +48,29 @@ profile hypnotix @{exec_path} { /{usr/,}bin/yt-dlp rPUx, /{usr/,}lib/firefox/firefox rPx, - # Which files hypnotix should be able to open - / r, - /home/ r, - owner @{HOME}/ r, - owner @{HOME}/**/ r, - @{MOUNTS}/ r, - owner @{MOUNTS}/**/ r, - owner /{home,media}/**.@{hypnotix_ext} r, - /usr/share/hypnotix/{,**} r, + /usr/share/glib-2.0/schemas/gschemas.compiled r, + + /etc/machine-id r, + /etc/vdpau_wrapper.cfg r, + /var/lib/dbus/machine-id r, owner @{HOME}/.hypnotix/ rw, owner @{HOME}/.hypnotix/** rw, - owner @{PROC}/@{pid}/fd/ r, - owner @{PROC}/@{pid}/mounts r, - deny owner @{PROC}/@{pid}/cmdline r, + owner @{user_music_dirs}/** r, @{sys}/devices/pci[0-9]*/**/drm/ r, + owner @{PROC}/@{pid}/fd/ r, + owner @{PROC}/@{pid}/mounts r, + owner @{PROC}/@{pid}/cmdline r, + /dev/ r, - /etc/vdpau_wrapper.cfg r, - - /var/lib/dbus/machine-id r, - /etc/machine-id r, - # Silencer deny /{usr/,}lib/hypnotix/** w, - profile xdg-screensaver { include include diff --git a/apparmor.d/profiles-m-r/mediainfo b/apparmor.d/profiles-m-r/mediainfo index 2dc46484..1411739f 100644 --- a/apparmor.d/profiles-m-r/mediainfo +++ b/apparmor.d/profiles-m-r/mediainfo @@ -1,52 +1,21 @@ # apparmor.d - Full set of apparmor profiles # Copyright (C) 2019-2021 Mikhail Morfikov +# Copyright (C) 2023 Alexandre Pujol # SPDX-License-Identifier: GPL-2.0-only abi , include -# 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 -@{mediainfo_ext} = [aA]{52,[aA][cC],[cC]3} -@{mediainfo_ext} += [mM][kK][aA] -@{mediainfo_ext} += [fF][lL][aA][cC] -@{mediainfo_ext} += [mM][pP][123cC] -@{mediainfo_ext} += [oO][gGmM][aA] -@{mediainfo_ext} += [wW]{,[aA]}[vV] -@{mediainfo_ext} += [wW][mM]{,[aA]} -@{mediainfo_ext} += 3[gG]{[2pP],[pP][2pP]} -@{mediainfo_ext} += [aA][sS][fF] -@{mediainfo_ext} += [aA][vV][iI] -@{mediainfo_ext} += [dD][iI][vV][xX] -@{mediainfo_ext} += [mM][124][vV] -@{mediainfo_ext} += [mM][kKoO][vV] -@{mediainfo_ext} += [mM][pP][4aAeEgG] -@{mediainfo_ext} += [mM][pP][eE][gG]{,[124]} -@{mediainfo_ext} += [oO][gG][gGmMxXvV] -@{mediainfo_ext} += [rR][mM]{,[vV][bB]} -@{mediainfo_ext} += [wW][eE][bB][mM] -@{mediainfo_ext} += [wW][mMtT][vV] -@{mediainfo_ext} += [mM][pP]2[tT] - @{exec_path} = /{usr/,}bin/mediainfo profile mediainfo @{exec_path} { include include - include @{exec_path} mr, - # Which media files mediainfo should be able to open - / r, - /home/ r, - owner @{HOME}/ r, - owner @{HOME}/**/ r, - @{MOUNTS}/ r, - owner @{MOUNTS}/**/ r, - owner /{home,media}/**.@{mediainfo_ext} r, + owner @{user_music_dirs}/** r, + owner @{user_videos_dirs}/** r, include if exists } diff --git a/apparmor.d/profiles-m-r/mediainfo-gui b/apparmor.d/profiles-m-r/mediainfo-gui index c73b838c..57985eb8 100644 --- a/apparmor.d/profiles-m-r/mediainfo-gui +++ b/apparmor.d/profiles-m-r/mediainfo-gui @@ -1,59 +1,28 @@ # apparmor.d - Full set of apparmor profiles # Copyright (C) 2021 Mikhail Morfikov +# Copyright (C) 2023 Alexandre Pujol # SPDX-License-Identifier: GPL-2.0-only abi , include -# 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 -@{mediainfo_ext} = [aA]{52,[aA][cC],[cC]3} -@{mediainfo_ext} += [mM][kK][aA] -@{mediainfo_ext} += [fF][lL][aA][cC] -@{mediainfo_ext} += [mM][pP][123cC] -@{mediainfo_ext} += [oO][gGmM][aA] -@{mediainfo_ext} += [wW]{,[aA]}[vV] -@{mediainfo_ext} += [wW][mM]{,[aA]} -@{mediainfo_ext} += 3[gG]{[2pP],[pP][2pP]} -@{mediainfo_ext} += [aA][sS][fF] -@{mediainfo_ext} += [aA][vV][iI] -@{mediainfo_ext} += [dD][iI][vV][xX] -@{mediainfo_ext} += [mM][124][vV] -@{mediainfo_ext} += [mM][kKoO][vV] -@{mediainfo_ext} += [mM][pP][4aAeEgG] -@{mediainfo_ext} += [mM][pP][eE][gG]{,[124]} -@{mediainfo_ext} += [oO][gG][gGmMxXvV] -@{mediainfo_ext} += [rR][mM]{,[vV][bB]} -@{mediainfo_ext} += [wW][eE][bB][mM] -@{mediainfo_ext} += [wW][mMtT][vV] -@{mediainfo_ext} += [mM][pP]2[tT] - @{exec_path} = /{usr/,}bin/mediainfo-gui profile mediainfo-gui @{exec_path} { include include - include - include include + include include + include include - include @{exec_path} mr, /{usr/,}bin/xdg-open rCx -> open, - # Which media files mediainfo-gui should be able to open - / r, - /home/ r, - owner @{HOME}/ r, - owner @{HOME}/**/ r, - @{MOUNTS}/ r, - owner @{MOUNTS}/**/ r, - owner /{home,media}/**.@{mediainfo_ext} r, + owner @{user_music_dirs}/** r, + owner @{user_videos_dirs}/** r, profile open { include @@ -66,13 +35,11 @@ profile mediainfo-gui @{exec_path} { /{usr/,}bin/readlink rix, /{usr/,}bin/basename rix, + /{usr/,}lib/firefox/firefox rPx, + owner @{HOME}/ r, - owner @{run}/user/@{uid}/ r, - # Allowed apps to open - /{usr/,}lib/firefox/firefox rPUx, - # file_inherit owner @{HOME}/.xsession-errors w, diff --git a/apparmor.d/profiles-m-r/mkvmerge b/apparmor.d/profiles-m-r/mkvmerge index 253e7b01..b0868935 100644 --- a/apparmor.d/profiles-m-r/mkvmerge +++ b/apparmor.d/profiles-m-r/mkvmerge @@ -1,61 +1,23 @@ # apparmor.d - Full set of apparmor profiles # Copyright (C) 2019-2021 Mikhail Morfikov +# Copyright (C) 2023 Alexandre Pujol # SPDX-License-Identifier: GPL-2.0-only abi , include -# 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 -@{mkvmerge_ext} = [aA]{52,[aA][cC],[cC]3} -@{mkvmerge_ext} += [mM][kK][aA] -@{mkvmerge_ext} += [fF][lL][aA][cC] -@{mkvmerge_ext} += [mM][pP][123cC] -@{mkvmerge_ext} += [oO][gGmM][aA] -@{mkvmerge_ext} += [wW]{,[aA]}[vV] -@{mkvmerge_ext} += [wW][mM]{,[aA]} -@{mkvmerge_ext} += 3[gG]{[2pP],[pP][2pP]} -@{mkvmerge_ext} += [aA][sS][fF] -@{mkvmerge_ext} += [aA][vV][iI] -@{mkvmerge_ext} += [dD][iI][vV][xX] -@{mkvmerge_ext} += [mM][124][vV] -@{mkvmerge_ext} += [mM][kKoO][vV] -@{mkvmerge_ext} += [mM][pP][4aAeEgG] -@{mkvmerge_ext} += [mM][pP][eE][gG]{,[124]} -@{mkvmerge_ext} += [oO][gG][gGmMxXvV] -@{mkvmerge_ext} += [rR][mM]{,[vV][bB]} -@{mkvmerge_ext} += [wW][eE][bB][mM] -@{mkvmerge_ext} += [wW][mMtT][vV] -@{mkvmerge_ext} += [mM][pP]2[tT] - -# Subtitle extensions: -# srt, txt, sub -@{mkvmerge_ext} += [sS][rR][tT] -@{mkvmerge_ext} += [tT][xX][tT] -@{mkvmerge_ext} += [sS][uU][bB] -@{mkvmerge_ext} += [mM][kK][sS] - @{exec_path} = /{usr/,}bin/mkvmerge profile mkvmerge @{exec_path} { include include - include signal (receive) set=(term, kill) peer=mkvtoolnix-gui, @{exec_path} mr, - # Which files mkvmerge should be able to open - / r, - /home/ r, - owner @{HOME}/ r, - owner @{HOME}/**/ r, - @{MOUNTS}/ r, - owner @{MOUNTS}/**/ r, - owner /{home,media}/**.@{mkvmerge_ext} rw, + owner @{user_music_dirs}/** rw, + owner @{user_videos_dirs}/** rw, owner /tmp/MKVToolNix-process-*.json r, owner /tmp/MKVToolNix-GUI-MuxJob-*.json r, diff --git a/apparmor.d/profiles-m-r/mkvtoolnix-gui b/apparmor.d/profiles-m-r/mkvtoolnix-gui index b5ef4cf2..b980f99d 100644 --- a/apparmor.d/profiles-m-r/mkvtoolnix-gui +++ b/apparmor.d/profiles-m-r/mkvtoolnix-gui @@ -1,60 +1,28 @@ # apparmor.d - Full set of apparmor profiles # Copyright (C) 2019-2021 Mikhail Morfikov +# Copyright (C) 2023 Alexandre Pujol # SPDX-License-Identifier: GPL-2.0-only abi , include -# 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 -@{mkvtoolnix_ext} = [aA]{52,[aA][cC],[cC]3} -@{mkvtoolnix_ext} += [mM][kK][aA] -@{mkvtoolnix_ext} += [fF][lL][aA][cC] -@{mkvtoolnix_ext} += [mM][pP][123cC] -@{mkvtoolnix_ext} += [oO][gGmM][aA] -@{mkvtoolnix_ext} += [wW]{,[aA]}[vV] -@{mkvtoolnix_ext} += [wW][mM]{,[aA]} -@{mkvtoolnix_ext} += 3[gG]{[2pP],[pP][2pP]} -@{mkvtoolnix_ext} += [aA][sS][fF] -@{mkvtoolnix_ext} += [aA][vV][iI] -@{mkvtoolnix_ext} += [dD][iI][vV][xX] -@{mkvtoolnix_ext} += [mM][124][vV] -@{mkvtoolnix_ext} += [mM][kKoO][vV] -@{mkvtoolnix_ext} += [mM][pP][4aAeEgG] -@{mkvtoolnix_ext} += [mM][pP][eE][gG]{,[124]} -@{mkvtoolnix_ext} += [oO][gG][gGmMxXvV] -@{mkvtoolnix_ext} += [rR][mM]{,[vV][bB]} -@{mkvtoolnix_ext} += [wW][eE][bB][mM] -@{mkvtoolnix_ext} += [wW][mMtT][vV] -@{mkvtoolnix_ext} += [mM][pP]2[tT] - -# Subtitle extensions: -# srt, txt, sub -@{mkvtoolnix_ext} += [sS][rR][tT] -@{mkvtoolnix_ext} += [tT][xX][tT] -@{mkvtoolnix_ext} += [sS][uU][bB] -@{mkvtoolnix_ext} += [mM][kK][sS] - @{exec_path} = /{usr/,}bin/mkvtoolnix-gui profile mkvtoolnix-gui @{exec_path} { include - include - include - include - include - include include + include + include + include + include include include - include - include include + include + include include include - include + include signal (send) set=(term, kill) peer=mkvmerge, @@ -63,14 +31,15 @@ profile mkvtoolnix-gui @{exec_path} { /{usr/,}bin/mkvmerge rPx, /{usr/,}bin/mediainfo-gui rPx, - # Which files mkvtoolnix should be able to open - / r, - /home/ r, - owner @{HOME}/ r, - owner @{HOME}/**/ r, - @{MOUNTS}/ r, - owner @{MOUNTS}/**/ r, - owner /{home,media}/**.@{mkvtoolnix_ext} rw, + /usr/share/qt5ct/** r, + /usr/share/hwdata/pnp.ids r, + + /etc/fstab r, + /etc/machine-id r, + /var/lib/dbus/machine-id r, + + owner @{user_music_dirs}/** rw, + owner @{user_videos_dirs}/** rw, owner @{user_config_dirs}/bunkus.org/ rw, owner @{user_config_dirs}/bunkus.org/mkvtoolnix-gui/ rw, @@ -83,29 +52,19 @@ profile mkvtoolnix-gui @{exec_path} { owner @{user_cache_dirs}/bunkus.org/mkvtoolnix-gui/**/@{hex} rw, owner @{user_config_dirs}/qt5ct/{,**} r, - /usr/share/qt5ct/** r, owner /tmp/#[0-9]*[0-9] rw, owner /tmp/MKVToolNix-GUI-MuxConfig-* rwl -> /tmp/#[0-9]*[0-9], owner /tmp/MKVToolNix-process-*.json rwl -> /tmp/#[0-9]*[0-9], owner /tmp/MKVToolNix-GUI-MuxJob-*.json rwl -> /tmp/#[0-9]*[0-9], owner /tmp/MKVToolNix-GUI-Instance-Communicator-* rw, + owner /dev/shm/#[0-9]*[0-9] rw, deny owner @{PROC}/@{pid}/cmdline r, deny @{PROC}/sys/kernel/random/boot_id r, @{PROC}/@{pid}/mountinfo r, @{PROC}/@{pid}/mounts r, - /etc/fstab r, - - /dev/shm/#[0-9]*[0-9] rw, - - /usr/share/hwdata/pnp.ids r, - - /var/lib/dbus/machine-id r, - /etc/machine-id r, - - # file_inherit owner /dev/tty[0-9]* rw, include if exists