various improvements

This commit is contained in:
valoq 2024-10-27 12:17:22 +01:00
parent db6c94ba5a
commit 0640a17b1a
No known key found for this signature in database
GPG key ID: 19F09A0FB865CBD8
12 changed files with 54 additions and 4 deletions

View file

@ -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,

View file

@ -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,

View file

@ -11,8 +11,10 @@
/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,
/etc/asound.conf r,
/etc/esound/esd.conf r,
@ -24,6 +26,7 @@
/etc/pulse/client.conf.d/{,**} r,
/etc/wildmidi/wildmidi.cfg r,
owner @{desktop_cache_dirs}/event-sound-cache.tdb.@{hex32}.@{multiarch} rwk, # libcanberra
owner @{desktop_config_dirs}/pulse/ rw,
owner @{desktop_config_dirs}/pulse/client.conf r,
@ -60,6 +63,9 @@
/dev/shm/ r,
owner /dev/shm/pulse-shm-@{int} rw,
/dev/snd/controlC0 r,
/dev/snd/controlC1 r,
include if exists <abstractions/audio-client.d>
# vim:syntax=apparmor

View file

@ -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,

View file

@ -18,6 +18,8 @@ profile git @{exec_path} flags=(attach_disconnected) {
include <abstractions/nameservice-strict>
include <abstractions/ssl_certs>
capability dac_read_search,
network inet dgram,
network inet6 dgram,
network inet stream,

View file

@ -71,6 +71,7 @@ profile libreoffice @{exec_path} {
/etc/libreoffice/{,**} r,
/etc/paperspecs r,
/etc/xdg/* r,
/etc/machine-id r,
owner @{user_cache_dirs}/libreoffice/{,**} rw,
owner @{user_config_dirs}/libreoffice/ rw,

View file

@ -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>
}

View file

@ -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,

View file

@ -17,6 +17,8 @@ profile pinentry-curses @{exec_path} {
/usr/share/terminfo/** r,
owner /dev/tty@{int} r,
include if exists <local/pinentry-curses>
}

View file

@ -0,0 +1,29 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2024 valoq <valoq@mailbox.org>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/4.0>,
include <tunables/global>
@{exec_path} = @{bin}/pinentry-gtk
profile pinentry-gtk @{exec_path} {
include <abstractions/base>
include <abstractions/consoles>
include <abstractions/gtk>
include <abstractions/fonts>
include <abstractions/fontconfig-cache-read>
include <abstractions/freedesktop.org>
@{exec_path} mr,
/usr/share/** r,
owner @{run}/user/@{uid}/.mutter-Xwaylandauth.@{rand6} r,
owner /dev/tty@{int} r,
include if exists <local/pinentry-gtk>
}
# vim:syntax=apparmor

View file

@ -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/0 rw, # file_inherit
include if exists <local/signal-desktop-chrome-sandbox>
}

View file

@ -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>
}