59 lines
1.6 KiB
Text
59 lines
1.6 KiB
Text
# apparmor.d - Full set of apparmor profiles
|
|
# Copyright (C) 2024 EricLin
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
abi <abi/4.0>,
|
|
|
|
include <tunables/global>
|
|
|
|
@{name} = wechat-universal
|
|
@{lib_dirs} = /opt/wechat-universal/
|
|
@{config_dirs} = @{user_config_dirs}/@{name}
|
|
@{cache_dirs} = @{user_cache_dirs}/@{name}
|
|
|
|
@{exec_path} = @{bin}/wechat-universal @{lib_dirs}/wechat
|
|
profile wechat-universal @{exec_path} flags=(attach_disconnected) {
|
|
include <abstractions/base>
|
|
include <abstractions/audio-client>
|
|
include <abstractions/common/bwrap>
|
|
include <abstractions/common/electron>
|
|
include <abstractions/consoles>
|
|
|
|
network netlink raw,
|
|
network netlink dgram,
|
|
network inet stream,
|
|
network inet dgram,
|
|
network inet6 dgram,
|
|
network inet6 stream,
|
|
|
|
@{exec_path} mrix,
|
|
|
|
@{sh_path} rix,
|
|
@{bin}/bwrap rix,
|
|
@{bin}/ln ix,
|
|
@{bin}/lsblk Px,
|
|
@{bin}/mkdir ix,
|
|
@{bin}/sed ix,
|
|
@{bin}/xdg-user-dir rix,
|
|
@{lib_dirs}/crashpad_handler ix,
|
|
@{lib}/wechat-appimage.AppImage ix,
|
|
@{open_path} Px -> child-open-strict,
|
|
|
|
/etc/lsb-release r,
|
|
/etc/machine-id r,
|
|
|
|
owner @{user_documents_dirs}/WeChat_Data/{,**} rwk,
|
|
owner @{HOME}/.xwechat/{,**} rwk,
|
|
owner @{HOME}/.sys1og.conf rw,
|
|
|
|
@{att}/@{run}/systemd/inhibit/@{int}.ref rw,
|
|
@{run}/utmp r,
|
|
|
|
@{PROC}/@{pid}/net/route r,
|
|
|
|
/dev/tty rw,
|
|
|
|
include if exists <local/wechat-universal>
|
|
}
|
|
|
|
# vim:syntax=apparmor
|