Add support for linuxqq (#474)

This commit is contained in:
EricLin0509 2024-09-12 18:59:25 +08:00 committed by GitHub
parent 0fdf514418
commit e4a986096f
Failed to generate hash of commit

View file

@ -0,0 +1,58 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2024 EricLin <ericlin050914@gmail.com>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{name} = QQ
@{lib_dirs} = /opt/QQ/
@{config_dirs} = @{user_config_dirs}/@{name}
@{cache_dirs} = @{user_cache_dirs}/@{name}
@{exec_path} = @{bin}/linuxqq
@{exec_path} += /opt/QQ/qq
profile linuxqq @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>
include <abstractions/nameservice-strict>
include <abstractions/common/electron>
include <abstractions/graphics>
include <abstractions/ssl_certs>
include <abstractions/fontconfig-cache-read>
include <abstractions/audio-client>
network netlink raw,
network netlink dgram,
network inet stream,
network inet dgram,
network inet6 dgram,
network inet6 stream,
@{exec_path} mr,
@{sh_path} r,
@{bin}/find rix,
@{bin}/rm rix,
@{bin}/xdg-open rix,
@{bin}/grep rix,
/opt/QQ/qq ix,
/opt/QQ/chrome_crashpad_handler ix,
@{lib_dirs}/resources/app/{,**} m,
/etc/machine-id r,
@{run}/systemd/inhibit/@{int}.ref rw,
@{run}/utmp r,
owner @{PROC}/@{pid}/loginuid r,
owner @{PROC}/@{pid}/mounts r,
owner @{PROC}/@{pid}/cmdline r,
/dev/tty rw,
/dev/pts/@{int} rw,
include if exists <local/linuxqq>
}