mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-11-15 16:03:51 +01:00
feat(profile): general update.
This commit is contained in:
parent
1739c07ca1
commit
8f102dea0a
@ -37,8 +37,8 @@
|
|||||||
owner / r,
|
owner / r,
|
||||||
owner /newroot/{,**} w,
|
owner /newroot/{,**} w,
|
||||||
|
|
||||||
owner @{tmp}/newroot/ w,
|
owner /tmp/newroot/ w,
|
||||||
owner @{tmp}/oldroot/ w,
|
owner /tmp/oldroot/ w,
|
||||||
|
|
||||||
@{PROC}/sys/kernel/overflowgid r,
|
@{PROC}/sys/kernel/overflowgid r,
|
||||||
@{PROC}/sys/kernel/overflowuid r,
|
@{PROC}/sys/kernel/overflowuid r,
|
||||||
|
@ -33,11 +33,18 @@ profile grub-probe @{exec_path} {
|
|||||||
|
|
||||||
/dev/*vg*/ r,
|
/dev/*vg*/ r,
|
||||||
/dev/bsg/ r,
|
/dev/bsg/ r,
|
||||||
|
/dev/bus/ r,
|
||||||
|
/dev/bus/usb/ r,
|
||||||
|
/dev/bus/usb/@{int}/ r,
|
||||||
/dev/cpu/ r,
|
/dev/cpu/ r,
|
||||||
/dev/cpu/@{int}/ r,
|
/dev/cpu/@{int}/ r,
|
||||||
|
/dev/dma_heap/ r,
|
||||||
/dev/dri/ r,
|
/dev/dri/ r,
|
||||||
/dev/dri/by-path/ r,
|
/dev/dri/by-path/ r,
|
||||||
/dev/hugepages/ r,
|
/dev/hugepages/ r,
|
||||||
|
/dev/input/ r,
|
||||||
|
/dev/input/by-id/ r,
|
||||||
|
/dev/input/by-path/ r,
|
||||||
/dev/mapper/control rw,
|
/dev/mapper/control rw,
|
||||||
/dev/mqueue/ r,
|
/dev/mqueue/ r,
|
||||||
/dev/shm/ r,
|
/dev/shm/ r,
|
||||||
|
@ -13,6 +13,7 @@ profile nm-dispatcher @{exec_path} flags=(attach_disconnected) {
|
|||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
include <abstractions/bus-system>
|
include <abstractions/bus-system>
|
||||||
include <abstractions/nameservice-strict>
|
include <abstractions/nameservice-strict>
|
||||||
|
include <abstractions/python>
|
||||||
|
|
||||||
capability net_admin,
|
capability net_admin,
|
||||||
capability sys_nice,
|
capability sys_nice,
|
||||||
@ -30,6 +31,7 @@ profile nm-dispatcher @{exec_path} flags=(attach_disconnected) {
|
|||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
@{sh_path} rix,
|
@{sh_path} rix,
|
||||||
|
@{bin}/python3.@{int} rix,
|
||||||
@{bin}/basename rix,
|
@{bin}/basename rix,
|
||||||
@{bin}/cat rix,
|
@{bin}/cat rix,
|
||||||
@{bin}/chronyc rPUx,
|
@{bin}/chronyc rPUx,
|
||||||
|
@ -18,11 +18,16 @@ profile mousepad @{exec_path} {
|
|||||||
|
|
||||||
@{open_path} rPx -> child-open-help,
|
@{open_path} rPx -> child-open-help,
|
||||||
|
|
||||||
|
/usr/share/hunspell/{,**} r,
|
||||||
|
|
||||||
owner @{user_config_dirs}/Mousepad/ rw,
|
owner @{user_config_dirs}/Mousepad/ rw,
|
||||||
owner @{user_config_dirs}/Mousepad/{,**} rw,
|
owner @{user_config_dirs}/Mousepad/** rwk,
|
||||||
|
|
||||||
|
owner @{user_config_dirs}/enchant/ rw,
|
||||||
|
owner @{user_config_dirs}/enchant/ rwk,
|
||||||
|
|
||||||
owner @{user_share_dirs}/Mousepad/ rw,
|
owner @{user_share_dirs}/Mousepad/ rw,
|
||||||
owner @{user_share_dirs}/Mousepad/{,**} rw,
|
owner @{user_share_dirs}/Mousepad/** rwk,
|
||||||
|
|
||||||
include if exists <local/mousepad>
|
include if exists <local/mousepad>
|
||||||
}
|
}
|
@ -27,7 +27,7 @@ profile startxfce @{exec_path} {
|
|||||||
/etc/X11/xinit/xinitrc.d/{,**} r,
|
/etc/X11/xinit/xinitrc.d/{,**} r,
|
||||||
/etc/xdg/xfce4/{,**} r,
|
/etc/xdg/xfce4/{,**} r,
|
||||||
|
|
||||||
profile systemctl {
|
profile systemctl flags=(attach_disconnected) {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
include <abstractions/app/systemctl>
|
include <abstractions/app/systemctl>
|
||||||
|
|
||||||
|
@ -20,10 +20,12 @@ profile thunar @{exec_path} {
|
|||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
@{bin}/thunar-volman rPx,
|
@{bin}/thunar-volman rPx,
|
||||||
|
@{bin}/dbus-launch rCx -> dbus,
|
||||||
@{open_path} rPx -> child-open,
|
@{open_path} rPx -> child-open,
|
||||||
|
|
||||||
/usr/share/ r,
|
/usr/share/ r,
|
||||||
/usr/share/anon-apps-config/share/{,**} r, #aa:only whonix
|
/usr/share/anon-apps-config/share/{,**} r, #aa:only whonix
|
||||||
|
/usr/share/gvfs/{,**} r,
|
||||||
/usr/share/Thunar/{,**} r,
|
/usr/share/Thunar/{,**} r,
|
||||||
|
|
||||||
/etc/fstab r,
|
/etc/fstab r,
|
||||||
@ -50,5 +52,14 @@ profile thunar @{exec_path} {
|
|||||||
|
|
||||||
owner @{PROC}/@{pid}/mountinfo r,
|
owner @{PROC}/@{pid}/mountinfo r,
|
||||||
|
|
||||||
|
profile dbus {
|
||||||
|
include <abstractions/base>
|
||||||
|
include <abstractions/nameservice-strict>
|
||||||
|
|
||||||
|
@{bin}/dbus-launch mr,
|
||||||
|
|
||||||
|
include if exists <local/thunar_dbus>
|
||||||
|
}
|
||||||
|
|
||||||
include if exists <local/thunar>
|
include if exists <local/thunar>
|
||||||
}
|
}
|
@ -15,6 +15,13 @@ profile xfce-notifyd @{exec_path} {
|
|||||||
include <abstractions/nameservice-strict>
|
include <abstractions/nameservice-strict>
|
||||||
include <abstractions/xfce>
|
include <abstractions/xfce>
|
||||||
|
|
||||||
|
# TODO: local only
|
||||||
|
network inet dgram,
|
||||||
|
network inet stream,
|
||||||
|
network inet6 dgram,
|
||||||
|
network inet6 stream,
|
||||||
|
network netlink raw,
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
owner @{user_cache_dirs}/xfce4/notifyd/ rw,
|
owner @{user_cache_dirs}/xfce4/notifyd/ rw,
|
||||||
|
@ -7,7 +7,7 @@ abi <abi/3.0>,
|
|||||||
include <tunables/global>
|
include <tunables/global>
|
||||||
|
|
||||||
@{exec_path} = @{bin}/xfce4-session
|
@{exec_path} = @{bin}/xfce4-session
|
||||||
profile xfce-session @{exec_path} {
|
profile xfce-session @{exec_path} flags=(attach_disconnected) {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
include <abstractions/app-launcher-user>
|
include <abstractions/app-launcher-user>
|
||||||
include <abstractions/graphics>
|
include <abstractions/graphics>
|
||||||
@ -47,20 +47,22 @@ profile xfce-session @{exec_path} {
|
|||||||
/etc/xdg/autostart/ r,
|
/etc/xdg/autostart/ r,
|
||||||
/etc/xdg/autostart/*.desktop r,
|
/etc/xdg/autostart/*.desktop r,
|
||||||
|
|
||||||
|
owner @{user_cache_dirs}/sessions/{,**} rw,
|
||||||
|
|
||||||
owner @{tmp}/.xfsm-ICE-@{rand6} rw,
|
owner @{tmp}/.xfsm-ICE-@{rand6} rw,
|
||||||
|
|
||||||
owner @{PROC}/@{pid}/stat r,
|
owner @{PROC}/@{pid}/stat r,
|
||||||
|
|
||||||
/dev/tty rw,
|
/dev/tty rw,
|
||||||
|
|
||||||
profile systemctl {
|
profile systemctl flags=(attach_disconnected) {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
include <abstractions/app/systemctl>
|
include <abstractions/app/systemctl>
|
||||||
|
|
||||||
include if exists <local/xfce-session_systemctl>
|
include if exists <local/xfce-session_systemctl>
|
||||||
}
|
}
|
||||||
|
|
||||||
profile dbus {
|
profile dbus flags=(attach_disconnected) {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
include <abstractions/bus-session>
|
include <abstractions/bus-session>
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ profile xfdesktop @{exec_path} {
|
|||||||
|
|
||||||
/etc/fstab r,
|
/etc/fstab r,
|
||||||
|
|
||||||
owner @{HOME}/@{XDG_DESKTOP_DIR}/ r,
|
owner @{HOME}/@{XDG_DESKTOP_DIR}/{,**} r,
|
||||||
|
|
||||||
owner @{user_config_dirs}/Thunar/{,**} rw,
|
owner @{user_config_dirs}/Thunar/{,**} rw,
|
||||||
owner @{user_config_dirs}/xfce4/desktop/{,**} rw,
|
owner @{user_config_dirs}/xfce4/desktop/{,**} rw,
|
||||||
|
@ -35,7 +35,7 @@ profile qemu-ga @{exec_path} {
|
|||||||
owner @{run}/qga.state* rw,
|
owner @{run}/qga.state* rw,
|
||||||
|
|
||||||
@{sys}/devices/system/node/ r,
|
@{sys}/devices/system/node/ r,
|
||||||
@{sys}/devices/system/node/node*/meminfo r,
|
@{sys}/devices/system/node/node@{int}/meminfo r,
|
||||||
|
|
||||||
owner @{PROC}/@{pid}/net/dev r,
|
owner @{PROC}/@{pid}/net/dev r,
|
||||||
|
|
||||||
|
@ -7,8 +7,6 @@ abi <abi/3.0>,
|
|||||||
|
|
||||||
include <tunables/global>
|
include <tunables/global>
|
||||||
|
|
||||||
@{ANDROID_SOURCE_DIR} = @{MOUNTS}/Android/
|
|
||||||
|
|
||||||
@{exec_path} = @{bin}/repo
|
@{exec_path} = @{bin}/repo
|
||||||
profile repo @{exec_path} {
|
profile repo @{exec_path} {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
@ -23,55 +21,44 @@ profile repo @{exec_path} {
|
|||||||
network netlink raw,
|
network netlink raw,
|
||||||
|
|
||||||
@{exec_path} r,
|
@{exec_path} r,
|
||||||
@{bin}/python3.@{int} rix,
|
|
||||||
|
|
||||||
@{bin}/ r,
|
|
||||||
@{bin}/env rix,
|
|
||||||
@{sh_path} rix,
|
@{sh_path} rix,
|
||||||
@{bin}/uname rix,
|
@{bin}/ r,
|
||||||
|
@{bin}/curl rix,
|
||||||
|
@{bin}/env rix,
|
||||||
@{bin}/git rix,
|
@{bin}/git rix,
|
||||||
|
@{bin}/python3.@{int} rix,
|
||||||
|
@{bin}/uname rix,
|
||||||
@{lib}/git{,-core}/git* rix,
|
@{lib}/git{,-core}/git* rix,
|
||||||
|
|
||||||
@{bin}/curl rCx -> curl,
|
|
||||||
@{bin}/gpg{,2} rCx -> gpg,
|
@{bin}/gpg{,2} rCx -> gpg,
|
||||||
@{bin}/ssh rPx,
|
@{bin}/ssh rPx,
|
||||||
|
|
||||||
|
/usr/share/git-core/{,**} r,
|
||||||
|
|
||||||
# Android source dir
|
# Android source dir
|
||||||
owner @{ANDROID_SOURCE_DIR}/** rwkl -> @{ANDROID_SOURCE_DIR}/**,
|
owner @{user_projects_dirs}/** rwkl -> @{user_projects_dirs}/**,
|
||||||
owner @{ANDROID_SOURCE_DIR}/**/.repo/repo/main.py rix,
|
owner @{user_projects_dirs}/**/.repo/repo/main.py rix,
|
||||||
|
|
||||||
owner @{HOME}/.repoconfig/{,**} rw,
|
|
||||||
owner @{HOME}/.repo_.gitconfig.json rw,
|
|
||||||
|
|
||||||
owner @{user_config_dirs}/git/config rw,
|
|
||||||
owner @{HOME}/.gitconfig rw,
|
owner @{HOME}/.gitconfig rw,
|
||||||
owner @{HOME}/.gitconfig.lock rwk,
|
owner @{HOME}/.gitconfig.lock rwk,
|
||||||
|
owner @{HOME}/.repo_.gitconfig.json rw,
|
||||||
|
owner @{HOME}/.repoconfig/{,**} rw,
|
||||||
|
|
||||||
/usr/share/git-core/{,**} r,
|
owner @{user_config_dirs}/git/config rw,
|
||||||
|
|
||||||
owner @{tmp}/.git_vtag_tmp@{rand6} rw,
|
owner @{tmp}/.git_vtag_tmp@{rand6} rw,
|
||||||
owner @{tmp}/ssh-*/ rw,
|
owner @{tmp}/ssh-*/ rw,
|
||||||
|
|
||||||
owner @{PROC}/@{pid}/fd/ r,
|
|
||||||
owner @{PROC}/@{pid}/mounts r,
|
|
||||||
|
|
||||||
owner /dev/shm/* rw,
|
owner /dev/shm/* rw,
|
||||||
owner /dev/shm/sem.mp-???????? rwl -> /dev/shm/*, # unconventional '_' tail
|
owner /dev/shm/sem.mp-???????? rwl -> /dev/shm/*, # unconventional '_' tail
|
||||||
|
|
||||||
|
owner @{PROC}/@{pid}/fd/ r,
|
||||||
|
owner @{PROC}/@{pid}/mounts r,
|
||||||
|
|
||||||
# Silencer
|
# Silencer
|
||||||
deny /etc/.repo_gitconfig.json w,
|
deny /etc/.repo_gitconfig.json w,
|
||||||
|
|
||||||
|
|
||||||
profile curl {
|
|
||||||
include <abstractions/base>
|
|
||||||
include <abstractions/nameservice-strict>
|
|
||||||
include <abstractions/ssl_certs>
|
|
||||||
|
|
||||||
@{bin}/curl mr,
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
profile gpg {
|
profile gpg {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
|
|
||||||
@ -82,6 +69,7 @@ profile repo @{exec_path} {
|
|||||||
|
|
||||||
owner @{tmp}/.git_vtag_tmp@{rand6} r,
|
owner @{tmp}/.git_vtag_tmp@{rand6} r,
|
||||||
|
|
||||||
|
include if exists <local/repo_gpg>
|
||||||
}
|
}
|
||||||
|
|
||||||
include if exists <local/repo>
|
include if exists <local/repo>
|
||||||
|
@ -1,25 +1,22 @@
|
|||||||
# apparmor.d - Full set of apparmor profiles
|
# apparmor.d - Full set of apparmor profiles
|
||||||
# Copyright (C) 2020 krathalan https://git.sr.ht/~krathalan/apparmor-profiles/
|
# Copyright (C) 2020 krathalan https://git.sr.ht/~krathalan/apparmor-profiles/
|
||||||
# 2021 Alexandre Pujol <alexandre@pujol.io>
|
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
|
||||||
# SPDX-License-Identifier: GPL-3.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
# Version of program profiled: 0.13
|
|
||||||
|
|
||||||
abi <abi/3.0>,
|
abi <abi/3.0>,
|
||||||
|
|
||||||
include <tunables/global>
|
include <tunables/global>
|
||||||
|
|
||||||
@{exec_path} = @{bin}/xclip
|
@{exec_path} = @{bin}/xclip
|
||||||
profile xclip @{exec_path} {
|
profile xclip @{exec_path} {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
|
include <abstractions/X-strict>
|
||||||
|
|
||||||
network unix stream,
|
network unix stream,
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
owner @{tmp}/mutt-* rw,
|
|
||||||
owner @{tmp}/xauth_@{rand6} r,
|
|
||||||
|
|
||||||
owner @{HOME}/.Xauthority r,
|
|
||||||
|
|
||||||
deny /dev/tty rw,
|
deny /dev/tty rw,
|
||||||
|
|
||||||
|
include if exists <local/xclip>
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user