apparmor.d/apparmor.d/groups/apps/discord
fira959 f86b305a66
Update discord profile (#332)
---------

Co-authored-by: Alex <roddhjav@users.noreply.github.com>
2024-05-16 10:33:24 +00:00

49 lines
1.3 KiB
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2019-2021 Mikhail Morfikov
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{name} = discord
@{lib_dirs} = /usr/share/@{name} /opt/@{name}
@{config_dirs} = @{user_config_dirs}/@{name} @{user_config_dirs}/discordptb
@{cache_dirs} = @{user_cache_dirs}/@{name}
@{exec_path} = @{bin}/discord{,-ptb} @{lib_dirs}/Discord{,PTB}
profile discord @{exec_path} {
include <abstractions/base>
include <abstractions/audio-client>
include <abstractions/common/electron>
include <abstractions/thumbnails-cache-read>
include <abstractions/user-download-strict>
network inet dgram,
network inet6 dgram,
network inet stream,
network inet6 stream,
network netlink raw,
@{exec_path} mrix,
@{sh_path} rix,
@{lib_dirs}/chrome-sandbox rix,
@{lib_dirs}/chrome_crashpad_handler rix,
@{open_path} rPx -> child-open-browsers,
/var/lib/dbus/machine-id r,
/etc/machine-id r,
owner @{tmp}/net-export/ rw,
owner @{tmp}/discord.sock rw,
owner "@{tmp}/Discord Crashes/" rw,
owner @{config_dirs}/discord/*/modules/** rm,
owner @{run}/user/@{uid}/discord-ipc-@{int} rw,
include if exists <local/discord>
}