mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-02-07 02:35:06 +01:00
57 lines
1.5 KiB
Text
57 lines
1.5 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/bus-session>
|
|
include <abstractions/bus/org.freedesktop.ScreenSaver>
|
|
include <abstractions/bus/org.kde.StatusNotifierWatcher>
|
|
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,
|
|
@{bin}/lsb_release rPx -> lsb_release,
|
|
|
|
@{lib_dirs}/chrome-sandbox rix,
|
|
@{lib_dirs}/chrome_crashpad_handler rix,
|
|
|
|
@{open_path} rPx -> child-open-strict,
|
|
|
|
owner @{user_videos_dirs}/{,**} rwl,
|
|
owner @{user_pictures_dirs}/{,**} rwl,
|
|
|
|
owner @{tmp}/net-export/ rw,
|
|
owner @{tmp}/discord.sock rw,
|
|
owner "@{tmp}/Discord Crashes/" rw,
|
|
|
|
audit owner @{config_dirs}/*/modules/** rm,
|
|
|
|
owner @{run}/user/@{uid}/discord-ipc-@{int} rw,
|
|
|
|
owner @{PROC}/@{pid}/task/@{tid}/comm r,
|
|
|
|
include if exists <local/discord>
|
|
}
|
|
|
|
# vim:syntax=apparmor
|