mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-11-14 23:43:56 +01:00
feat(profiles): add mullvad profiles.
This commit is contained in:
parent
48c023d4bd
commit
595a27560f
54
apparmor.d/groups/network/mullvad-daemon
Normal file
54
apparmor.d/groups/network/mullvad-daemon
Normal file
@ -0,0 +1,54 @@
|
||||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2022 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/3.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = "/opt/Mullvad VPN/resources/mullvad-daemon"
|
||||
profile mullvad-daemon @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/nameservice-strict>
|
||||
|
||||
capability dac_override,
|
||||
capability net_admin,
|
||||
capability net_raw,
|
||||
capability sys_admin,
|
||||
|
||||
network inet stream,
|
||||
network inet6 stream,
|
||||
network inet dgram,
|
||||
network inet6 dgram,
|
||||
network inet raw,
|
||||
network inet6 raw,
|
||||
network netlink raw,
|
||||
network netlink dgram,
|
||||
|
||||
mount fstype=cgroup -> /sys/fs/cgroup/net_cls/,
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
"/opt/Mullvad VPN/resources/*" r,
|
||||
|
||||
/etc/mullvad-vpn/{,*} r,
|
||||
/etc/mullvad-vpn/*.json rw,
|
||||
/etc/resolv.conf rw,
|
||||
/etc/resolv.conf.mullvadbackup rw,
|
||||
|
||||
/var/cache/mullvad-vpn/{,*} rw,
|
||||
/var/log/mullvad-vpn/{,*} rw,
|
||||
|
||||
@{run}/mullvad-vpn rw,
|
||||
@{run}/NetworkManager/resolv.conf r,
|
||||
|
||||
@{sys}/fs/cgroup/net_cls/ w,
|
||||
@{sys}/fs/cgroup/net_cls/mullvad-exclusions/ w,
|
||||
@{sys}/fs/cgroup/net_cls/mullvad-exclusions/net_cls.classid rw,
|
||||
@{sys}/kernel/mm/transparent_hugepage/hpage_pmd_size r,
|
||||
|
||||
owner @{PROC}/@{pid}/mounts r,
|
||||
@{PROC}/sys/net/ipv{4,6}/conf/all/src_valid_mark rw,
|
||||
|
||||
include if exists <local/mullvad-daemon>
|
||||
}
|
75
apparmor.d/groups/network/mullvad-gui
Normal file
75
apparmor.d/groups/network/mullvad-gui
Normal file
@ -0,0 +1,75 @@
|
||||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2022 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/3.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = "/opt/Mullvad VPN/mullvad-gui"
|
||||
profile mullvad-gui @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/chromium-common>
|
||||
include <abstractions/dconf-write>
|
||||
include <abstractions/dri-common>
|
||||
include <abstractions/dri-enumerate>
|
||||
include <abstractions/fonts>
|
||||
include <abstractions/freedesktop.org>
|
||||
include <abstractions/gtk>
|
||||
include <abstractions/mesa>
|
||||
include <abstractions/nameservice-strict>
|
||||
include <abstractions/vulkan>
|
||||
|
||||
capability sys_chroot,
|
||||
capability sys_ptrace,
|
||||
capability sys_admin,
|
||||
|
||||
network inet stream,
|
||||
network inet6 stream,
|
||||
network inet dgram,
|
||||
network inet6 dgram,
|
||||
network netlink raw,
|
||||
|
||||
@{exec_path} mrix,
|
||||
|
||||
"/opt/Mullvad VPN/*.so*" rm,
|
||||
|
||||
/{usr/,}bin/{,ba,da}sh rix,
|
||||
/{usr/,}bin/gsettings rix,
|
||||
/{usr/,}bin/xdg-open rPx,
|
||||
|
||||
"/opt/Mullvad VPN/{,**}" r,
|
||||
/usr/share/themes/{,**} r,
|
||||
/usr/share/glib-2.0/schemas/gschemas.compiled r,
|
||||
|
||||
/etc/libva.conf r,
|
||||
/var/lib/dbus/machine-id r,
|
||||
|
||||
owner "@{user_config_dirs}/Mullvad VPN/{,**}" rwk,
|
||||
|
||||
owner "/tmp/.org.chromium.Chromium.*/Mullvad VPN*.png" rw,
|
||||
owner @{run}/user/@{uid}/.mutter-Xwaylandauth.[a-zA-z0-9]* r,
|
||||
|
||||
@{sys}/bus/pci/devices/ r,
|
||||
@{sys}/devices/virtual/tty/tty[0-9]*/active r,
|
||||
@{sys}/devices/pci[0-9]*/**/{vendor,device,class,config} r,
|
||||
|
||||
@{PROC}/ r,
|
||||
@{PROC}/sys/fs/inotify/max_user_watches r,
|
||||
@{PROC}/sys/kernel/yama/ptrace_scope r,
|
||||
owner @{PROC}/@{uid}/cmdline r,
|
||||
owner @{PROC}/@{uid}/fd/ r,
|
||||
owner @{PROC}/@{uid}/cgroup r,
|
||||
owner @{PROC}/@{uid}/gid_map w,
|
||||
owner @{PROC}/@{uid}/oom_score_adj w,
|
||||
owner @{PROC}/@{uid}/setgroups w,
|
||||
owner @{PROC}/@{uid}/stat r,
|
||||
owner @{PROC}/@{uid}/statm r,
|
||||
owner @{PROC}/@{uid}/task/ r,
|
||||
owner @{PROC}/@{uid}/task/@{tid}/status r,
|
||||
owner @{PROC}/@{uid}/uid_map w,
|
||||
|
||||
/dev/tty rw,
|
||||
|
||||
include if exists <local/mullvad-gui>
|
||||
}
|
@ -95,6 +95,8 @@ mke2fs complain
|
||||
ModemManager attach_disconnected,complain
|
||||
molly-guard complain
|
||||
mount complain
|
||||
mullvad-daemon complain
|
||||
mullvad-gui complain
|
||||
nautilus complain
|
||||
needrestart attach_disconnected,complain
|
||||
needrestart-iucode-scan-versions complain
|
||||
|
Loading…
Reference in New Issue
Block a user