2020-09-12 17:19:23 +02:00
|
|
|
# vim:syntax=apparmor
|
|
|
|
# ------------------------------------------------------------------
|
|
|
|
#
|
2021-01-10 16:35:07 +01:00
|
|
|
# Copyright (C) 2019-2021 Mikhail Morfikov
|
2020-09-12 17:19:23 +02:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of version 2 of the GNU General Public
|
|
|
|
# License published by the Free Software Foundation.
|
|
|
|
#
|
|
|
|
# ------------------------------------------------------------------
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
abi <abi/3.0>,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include <tunables/global>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
@{exec_path} = /{usr/,}bin/gtk{,2,3}-youtube-viewer
|
|
|
|
profile gtk-youtube-viewer @{exec_path} {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/fonts>
|
|
|
|
include <abstractions/fontconfig-cache-read>
|
|
|
|
include <abstractions/freedesktop.org>
|
|
|
|
include <abstractions/gtk>
|
|
|
|
include <abstractions/nameservice-strict>
|
|
|
|
include <abstractions/perl>
|
|
|
|
include <abstractions/openssl>
|
|
|
|
include <abstractions/ssl_certs>
|
|
|
|
include <abstractions/deny-root-dir-access>
|
|
|
|
|
|
|
|
network inet dgram,
|
|
|
|
network inet6 dgram,
|
|
|
|
network inet stream,
|
|
|
|
network inet6 stream,
|
|
|
|
network netlink raw,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
@{exec_path} r,
|
|
|
|
/{usr/,}bin/perl r,
|
|
|
|
|
2020-12-09 10:30:52 +01:00
|
|
|
/{usr/,}bin/{,ba,da}sh rix,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
/{usr/,}bin/xterm rCx -> xterm,
|
|
|
|
/{usr/,}bin/rxvt rCx -> xterm,
|
|
|
|
/{usr/,}bin/urxvt rCx -> xterm,
|
|
|
|
|
|
|
|
# Players
|
|
|
|
/{usr/,}bin/mpv rPx,
|
|
|
|
/{usr/,}bin/vlc rPx,
|
|
|
|
/{usr/,}bin/smplayer rPx,
|
|
|
|
|
|
|
|
/{usr/,}lib/firefox/firefox rPx,
|
|
|
|
|
|
|
|
/{usr/,}bin/xdg-open rCx -> open,
|
|
|
|
/{usr/,}lib/@{multiarch}/glib-[0-9]*/gio-launch-desktop rCx -> open,
|
|
|
|
|
|
|
|
owner @{HOME}/.config/youtube-viewer/{,*} rw,
|
|
|
|
|
|
|
|
owner @{HOME}/.cache/ rw,
|
|
|
|
owner @{HOME}/.cache/youtube-viewer/ rw,
|
|
|
|
|
|
|
|
owner @{PROC}/@{pid}/fd/ r,
|
|
|
|
owner @{PROC}/@{pid}/mounts r,
|
|
|
|
|
|
|
|
|
|
|
|
profile xterm {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/consoles>
|
|
|
|
include <abstractions/fonts>
|
|
|
|
include <abstractions/fontconfig-cache-read>
|
|
|
|
include <abstractions/freedesktop.org>
|
|
|
|
include <abstractions/nameservice-strict>
|
|
|
|
include <abstractions/perl>
|
|
|
|
include <abstractions/wutmp>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
signal (send) set=(hup, winch) peer=youtube-viewer,
|
|
|
|
signal (send) set=(hup, winch) peer=youtube-viewer//wget,
|
|
|
|
|
|
|
|
/{usr/,}bin/xterm mr,
|
|
|
|
/{usr/,}bin/rxvt mr,
|
|
|
|
/{usr/,}bin/urxvt mr,
|
|
|
|
|
2020-12-09 10:30:52 +01:00
|
|
|
/{usr/,}bin/zsh rix,
|
|
|
|
/{usr/,}bin/{,ba,da}sh rix,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
/{usr/,}bin/youtube-viewer rPx,
|
|
|
|
|
|
|
|
owner @{PROC}/@{pid}/loginuid r,
|
|
|
|
|
|
|
|
/etc/shells r,
|
|
|
|
/etc/zsh/* r,
|
|
|
|
|
|
|
|
/etc/X11/app-defaults/* r,
|
|
|
|
|
|
|
|
/usr/include/X11/bitmaps/vlines2 r,
|
|
|
|
|
|
|
|
owner @{HOME}/.urxvt/** r,
|
|
|
|
|
|
|
|
owner @{HOME}/.Xauthority r,
|
|
|
|
owner @{HOME}/.ICEauthority r,
|
|
|
|
|
|
|
|
# file_inherit
|
|
|
|
owner @{HOME}/.xsession-errors w,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
profile open {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/xdg-open>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
/{usr/,}bin/xdg-open mr,
|
|
|
|
/{usr/,}lib/@{multiarch}/glib-[0-9]*/gio-launch-desktop mr,
|
|
|
|
|
2021-02-13 15:00:16 +01:00
|
|
|
/{usr/,}bin/{,ba,da}sh rix,
|
|
|
|
/{usr/,}bin/gawk rix,
|
|
|
|
/{usr/,}bin/readlink rix,
|
|
|
|
/{usr/,}bin/basename rix,
|
|
|
|
|
2020-12-09 10:30:52 +01:00
|
|
|
owner @{HOME}/ r,
|
|
|
|
|
|
|
|
owner @{run}/user/[0-9]*/ r,
|
|
|
|
|
2020-09-12 17:19:23 +02:00
|
|
|
# Allowed apps to open
|
|
|
|
/{usr/,}lib/firefox/firefox rPUx,
|
|
|
|
|
|
|
|
# file_inherit
|
|
|
|
owner @{HOME}/.xsession-errors w,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include if exists <local/gtk-youtube-viewer>
|
2020-09-12 17:19:23 +02:00
|
|
|
}
|