mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-02-11 20:55:19 +01:00
Merge branch 'roddhjav:main' into main
This commit is contained in:
commit
a6d85538b7
16 changed files with 96 additions and 13 deletions
|
@ -12,7 +12,7 @@
|
|||
@{sh_path} rix,
|
||||
@{bin}/nvim mix,
|
||||
@{bin}/sensible-editor mr,
|
||||
@{bin}/vim{,.*} mix,
|
||||
@{bin}/vim{,.*} mrix,
|
||||
@{bin}/which{,.debianutils} ix,
|
||||
|
||||
/usr/share/nvim/{,**} r,
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
owner @{cache_dirs}/ rw,
|
||||
owner @{cache_dirs}/** rwk,
|
||||
|
||||
/tmp/ r,
|
||||
/tmp/ rw,
|
||||
/var/tmp/ r,
|
||||
owner @{tmp}/@{name}/ rw,
|
||||
owner @{tmp}/@{name}/* rwk,
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
/usr/share/openal/hrtf/{,**} r,
|
||||
/usr/share/pipewire/client-rt.conf r,
|
||||
/usr/share/pipewire/client.conf r,
|
||||
/usr/share/pipewire/jack.conf r,
|
||||
/usr/share/sounds/{,**} r,
|
||||
|
||||
/etc/alsa/conf.d/{,**} r,
|
||||
|
@ -60,6 +61,8 @@
|
|||
/dev/shm/ r,
|
||||
owner /dev/shm/pulse-shm-@{int} rw,
|
||||
|
||||
/dev/snd/controlC@{int} r,
|
||||
|
||||
include if exists <abstractions/audio-client.d>
|
||||
|
||||
# vim:syntax=apparmor
|
||||
|
|
|
@ -58,6 +58,7 @@ profile gnome-boxes @{exec_path} {
|
|||
owner @{tmp}/*.iso-@{rand6} rw,
|
||||
owner @{tmp}/*.svg-@{rand6} rw,
|
||||
|
||||
owner @{run}/user/@{uid}/libvirt/ rw,
|
||||
owner @{run}/user/@{uid}/libvirt/virtqemud.lock rwk,
|
||||
|
||||
@{run}/mount/utab r,
|
||||
|
|
|
@ -16,6 +16,7 @@ profile scdaemon @{exec_path} {
|
|||
network netlink raw,
|
||||
|
||||
signal (send) peer=gpg-agent,
|
||||
signal send set=usr2 peer=unconfined,
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ profile hyprland @{exec_path} flags=(attach_disconnected) {
|
|||
|
||||
@{exec_path} mr,
|
||||
|
||||
/usr/share/hyprland/{,*} r,
|
||||
/usr/share/hypr{,land}/{,*} r,
|
||||
/usr/share/libinput/{,*} r,
|
||||
|
||||
owner @{user_cache_dirs}/hyprland/{,**} rw,
|
||||
|
|
|
@ -83,9 +83,10 @@ profile mkinitcpio @{exec_path} flags=(attach_disconnected) {
|
|||
|
||||
# Manage /boot
|
||||
/ r,
|
||||
/boot/ r,
|
||||
/boot/initramfs-*.img* rw,
|
||||
/boot/vmlinuz-* r,
|
||||
/{boot,efi}/ r,
|
||||
/{boot,efi}/EFI/{,**} rw,
|
||||
/{boot,efi}/initramfs-*.img* rw,
|
||||
/{boot,efi}/vmlinuz-* r,
|
||||
|
||||
/usr/share/systemd/bootctl/** r,
|
||||
|
||||
|
|
|
@ -24,11 +24,12 @@ profile systemd-localed @{exec_path} flags=(attach_disconnected) {
|
|||
/usr/share/systemd/*-map r,
|
||||
/usr/share/X11/xkb/{,**} r,
|
||||
|
||||
/etc/.#locale.conf@{hex16} rw,
|
||||
/etc/.#vconsole.conf* rw,
|
||||
/etc/default/.#locale* rw,
|
||||
/etc/default/keyboard r,
|
||||
/etc/default/locale rw,
|
||||
/etc/locale.conf r,
|
||||
/etc/locale.conf rw,
|
||||
/etc/vconsole.conf rw,
|
||||
/etc/X11/xorg.conf.d/ r,
|
||||
/etc/X11/xorg.conf.d/.#*.confd* rw,
|
||||
|
|
|
@ -62,6 +62,7 @@ profile mutt @{exec_path} {
|
|||
owner @{HOME}/.mutthistory rwk,
|
||||
owner @{HOME}/.muttrc* r,
|
||||
owner @{HOME}/.signature r, # Mutt signature file
|
||||
owner @{HOME}/ r,
|
||||
|
||||
# User mbox
|
||||
# Could be a file or dir depending on mbox_type variable
|
||||
|
@ -91,11 +92,14 @@ profile mutt @{exec_path} {
|
|||
@{bin}/w3m mrix,
|
||||
@{bin}/lynx mrix,
|
||||
|
||||
owner @{HOME}/.w3m/* rw,
|
||||
owner @{HOME}/.w3m/{,**} rw,
|
||||
owner @{user_mail_dirs}/{,**} r,
|
||||
owner @{user_mail_dirs}/tmp/{,**} rw,
|
||||
owner /{var/,}tmp/mutt* rw,
|
||||
|
||||
owner /tmp/w3m-@{rand6} rw,
|
||||
owner /tmp/w3m-@{rand6}/{,**} rw,
|
||||
|
||||
include if exists <local/mutt_html-renderer>
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ profile ouch @{exec_path} {
|
|||
@{exec_path} mr,
|
||||
|
||||
owner @{HOME}/.tmp@{rand6}/{,**} rw,
|
||||
owner @{HOME}/.tmp-ouch@{rand6}/{,**} rw,
|
||||
|
||||
@{sys}/fs/cgroup/user.slice/cpu.max r,
|
||||
@{sys}/fs/cgroup/user.slice/user-@{uid}.slice/cpu.max r,
|
||||
|
|
|
@ -17,6 +17,8 @@ profile pinentry-curses @{exec_path} {
|
|||
|
||||
/usr/share/terminfo/** r,
|
||||
|
||||
owner /dev/tty@{int} r,
|
||||
|
||||
include if exists <local/pinentry-curses>
|
||||
}
|
||||
|
||||
|
|
|
@ -7,9 +7,10 @@ abi <abi/4.0>,
|
|||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = @{bin}/pinentry-gtk-2
|
||||
profile pinentry-gtk-2 @{exec_path} {
|
||||
@{exec_path} = @{bin}/pinentry-gtk{,-2}
|
||||
profile pinentry-gtk @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/consoles>
|
||||
include <abstractions/gtk>
|
||||
include <abstractions/fonts>
|
||||
include <abstractions/fontconfig-cache-read>
|
||||
|
@ -17,11 +18,13 @@ profile pinentry-gtk-2 @{exec_path} {
|
|||
|
||||
@{exec_path} mr,
|
||||
|
||||
/usr/share/gtk-2.0/gtkrc r,
|
||||
/usr/share/gtk-@{int}.@{int}/{,**} r,
|
||||
|
||||
owner @{run}/user/@{uid}/.mutter-Xwaylandauth.@{rand6} r,
|
||||
|
||||
include if exists <local/pinentry-gtk-2>
|
||||
owner /dev/tty@{int} r,
|
||||
|
||||
include if exists <local/pinentry-gtk>
|
||||
}
|
||||
|
||||
# vim:syntax=apparmor
|
|
@ -18,6 +18,7 @@ profile signal-desktop-chrome-sandbox @{exec_path} {
|
|||
|
||||
capability sys_admin,
|
||||
capability sys_chroot,
|
||||
capability dac_override,
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
|
@ -27,6 +28,9 @@ profile signal-desktop-chrome-sandbox @{exec_path} {
|
|||
@{PROC}/@{pid}/oom_adj w,
|
||||
@{PROC}/@{pid}/oom_score_adj w,
|
||||
|
||||
# Silencer
|
||||
deny /dev/pts/@{int} rw, # file_inherit
|
||||
|
||||
include if exists <local/signal-desktop-chrome-sandbox>
|
||||
}
|
||||
|
||||
|
|
31
apparmor.d/profiles-s-z/v2ray
Normal file
31
apparmor.d/profiles-s-z/v2ray
Normal file
|
@ -0,0 +1,31 @@
|
|||
# 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>
|
||||
|
||||
@{exec_path} = @{bin}/v2ray
|
||||
profile v2ray @{exec_path} flags=(attach_disconnected) {
|
||||
include <abstractions/base>
|
||||
include <abstractions/attached/consoles>
|
||||
|
||||
network inet dgram,
|
||||
network inet stream,
|
||||
network inet raw,
|
||||
network inet6 dgram,
|
||||
network inet6 raw,
|
||||
network netlink raw,
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
/etc/v2ray/{,*} r,
|
||||
/usr/share/v2ray/**.dat r,
|
||||
|
||||
@{PROC}/sys/net/core/somaxconn r,
|
||||
|
||||
include if exists <local/v2ray>
|
||||
}
|
||||
|
||||
# vim:syntax=apparmor
|
|
@ -36,7 +36,7 @@ profile w3m @{exec_path} {
|
|||
|
||||
owner @{user_config_dirs}/w3m/{,**} rw,
|
||||
|
||||
owner @{tmp}/@{rand6}/{,**} rw,
|
||||
owner @{tmp}/w3m-@{rand6}/{,**} rw,
|
||||
|
||||
include if exists <local/w3m>
|
||||
}
|
||||
|
|
31
apparmor.d/profiles-s-z/xray
Normal file
31
apparmor.d/profiles-s-z/xray
Normal file
|
@ -0,0 +1,31 @@
|
|||
# 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>
|
||||
|
||||
@{exec_path} = @{bin}/xray
|
||||
profile xray @{exec_path} flags=(attach_disconnected) {
|
||||
include <abstractions/base>
|
||||
include <abstractions/attached/consoles>
|
||||
|
||||
network inet dgram,
|
||||
network inet stream,
|
||||
network inet raw,
|
||||
network inet6 dgram,
|
||||
network inet6 raw,
|
||||
network netlink raw,
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
/etc/xray/{,*} r,
|
||||
/usr/share/xray/**.dat r,
|
||||
|
||||
@{PROC}/sys/net/core/somaxconn r,
|
||||
|
||||
include if exists <local/xray>
|
||||
}
|
||||
|
||||
# vim:syntax=apparmor
|
Loading…
Reference in a new issue