* 'tunables' of https://github.com/nobody43/apparmor.d: dbus temp tails Update apparmor.d Update gdm-runtime-config more unrelated changes adjust date-time random tails rename to int, convert more profiles fixes tunables
122 lines
2.9 KiB
Text
122 lines
2.9 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>
|
|
|
|
@{TELEGRAM_WORK_DIR} = @{MOUNTS}/Kabi/telegram
|
|
|
|
@{exec_path} = @{bin}/telegram-desktop
|
|
profile telegram-desktop @{exec_path} {
|
|
include <abstractions/base>
|
|
include <abstractions/consoles>
|
|
include <abstractions/dconf-write>
|
|
include <abstractions/opencl-intel>
|
|
include <abstractions/gtk>
|
|
include <abstractions/fonts>
|
|
include <abstractions/fontconfig-cache-read>
|
|
include <abstractions/freedesktop.org>
|
|
include <abstractions/audio>
|
|
include <abstractions/user-download-strict>
|
|
include <abstractions/qt5-compose-cache-write>
|
|
include <abstractions/qt5-settings-write>
|
|
include <abstractions/qt5-shader-cache>
|
|
include <abstractions/mesa>
|
|
include <abstractions/nameservice-strict>
|
|
include <abstractions/enchant>
|
|
include <abstractions/openssl>
|
|
include <abstractions/ssl_certs>
|
|
|
|
network inet dgram,
|
|
network inet6 dgram,
|
|
network inet stream,
|
|
network inet6 stream,
|
|
network netlink dgram,
|
|
network netlink raw,
|
|
|
|
@{exec_path} mrix,
|
|
|
|
@{bin}/{,ba,da}sh rix,
|
|
|
|
# Launch external apps
|
|
@{bin}/xdg-open rCx -> open,
|
|
|
|
# What's this for?
|
|
deny @{bin}/fc-list rx,
|
|
|
|
# Telegram files
|
|
/usr/share/TelegramDesktop/{,**} r,
|
|
|
|
# Download dir
|
|
owner @{TELEGRAM_WORK_DIR}/ rw,
|
|
owner @{TELEGRAM_WORK_DIR}/** rwkl -> @{TELEGRAM_WORK_DIR}/#@{int},
|
|
|
|
# Telegram's profile (via telegram -many -workdir ~/some/dir/)
|
|
#owner @{TELEGRAM_WORK_DIR}/{,**} rw,
|
|
|
|
# Autostart
|
|
owner @{user_config_dirs}/autostart/telegramdesktop.desktop rw,
|
|
|
|
owner /tmp/@{hex}-* rwk,
|
|
owner @{run}/user/@{uid}/@{hex}-* rwk,
|
|
|
|
/dev/shm/#@{int} rw,
|
|
|
|
owner @{PROC}/@{pid}/fd/ r,
|
|
deny owner @{PROC}/@{pid}/cmdline r,
|
|
owner @{PROC}/@{pid}/mountinfo r,
|
|
owner @{PROC}/@{pid}/mounts r,
|
|
deny @{PROC}/sys/kernel/random/boot_id r,
|
|
|
|
/etc/fstab r,
|
|
|
|
/var/lib/dbus/machine-id r,
|
|
/etc/machine-id r,
|
|
|
|
/usr/share/hwdata/pnp.ids r,
|
|
|
|
owner @{user_config_dirs}/qt5ct/{,**} r,
|
|
/usr/share/qt5ct/** r,
|
|
|
|
# Allowed apps to open
|
|
@{lib}/firefox/firefox rPx,
|
|
@{bin}/smplayer rPx,
|
|
@{bin}/viewnior rPUx,
|
|
@{bin}/qpdfview rPx,
|
|
@{bin}/geany rPx,
|
|
|
|
# file_inherit
|
|
owner /dev/tty[0-9]* rw,
|
|
|
|
|
|
profile open {
|
|
include <abstractions/base>
|
|
include <abstractions/xdg-open>
|
|
|
|
@{bin}/xdg-open mr,
|
|
|
|
@{bin}/{,ba,da}sh rix,
|
|
@{bin}/{m,g,}awk rix,
|
|
@{bin}/readlink rix,
|
|
@{bin}/basename rix,
|
|
|
|
owner @{TELEGRAM_WORK_DIR}/ r,
|
|
|
|
owner @{run}/user/@{uid}/ r,
|
|
|
|
# Allowed apps to open
|
|
@{lib}/firefox/firefox rPx,
|
|
@{bin}/smplayer rPx,
|
|
@{bin}/qpdfview rPx,
|
|
@{bin}/viewnior rPUx,
|
|
@{bin}/geany rPx,
|
|
|
|
# file_inherit
|
|
owner @{HOME}/.xsession-errors w,
|
|
|
|
}
|
|
|
|
include if exists <local/telegram-desktop>
|
|
}
|