apparmor.d/apparmor.d/profiles-g-l/gtk-youtube-viewer

122 lines
2.7 KiB
Text
Raw Normal View History

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2019-2021 Mikhail Morfikov
# SPDX-License-Identifier: GPL-2.0-only
2020-12-10 22:33:39 +01:00
abi <abi/3.0>,
2020-12-10 22:33:39 +01:00
include <tunables/global>
@{exec_path} = @{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>
network inet dgram,
network inet6 dgram,
network inet stream,
network inet6 stream,
network netlink raw,
@{exec_path} r,
@{bin}/perl r,
@{bin}/{,ba,da}sh rix,
@{bin}/xterm rCx -> xterm,
@{bin}/rxvt rCx -> xterm,
@{bin}/urxvt rCx -> xterm,
# Players
@{bin}/mpv rPx,
@{bin}/vlc rPx,
@{bin}/smplayer rPx,
@{lib}/firefox/firefox rPx,
@{bin}/xdg-open rCx -> open,
@{lib}/@{multiarch}/glib-[0-9]*/gio-launch-desktop rCx -> open,
2021-04-01 17:21:33 +01:00
owner @{user_config_dirs}/youtube-viewer/{,*} rw,
2021-04-01 17:20:05 +01:00
owner @{user_cache_dirs}/ rw,
owner @{user_cache_dirs}/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>
signal (send) set=(hup, winch) peer=youtube-viewer,
signal (send) set=(hup, winch) peer=youtube-viewer//wget,
@{bin}/xterm mr,
@{bin}/rxvt mr,
@{bin}/urxvt mr,
@{bin}/zsh rix,
@{bin}/{,ba,da}sh rix,
@{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>
@{bin}/xdg-open mr,
@{lib}/@{multiarch}/glib-[0-9]*/gio-launch-desktop mr,
@{bin}/{,ba,da}sh rix,
@{bin}/{m,g,}awk rix,
@{bin}/readlink rix,
@{bin}/basename rix,
2021-02-13 15:00:16 +01:00
2020-12-09 10:30:52 +01:00
owner @{HOME}/ r,
owner @{run}/user/@{uid}/ r,
2020-12-09 10:30:52 +01:00
# Allowed apps to open
@{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>
}