Skip to content

Commit

Permalink
feat(profile): various improvements and update.
Browse files Browse the repository at this point in the history
  • Loading branch information
roddhjav committed Dec 24, 2024
1 parent 57ddfd2 commit 2560e96
Show file tree
Hide file tree
Showing 20 changed files with 22 additions and 16 deletions.
2 changes: 2 additions & 0 deletions apparmor.d/groups/gnome/gnome-session
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ profile gnome-session @{exec_path} {
/etc/X11/xinit/xinputrc r,
/etc/X11/Xsession.d/*im-config_launch r,

owner @{HOME}/ r,

owner @{PROC}/@{pid}/cmdline r,
owner @{PROC}/@{pid}/fd/ r,
owner @{PROC}/@{pid}/loginuid r,
Expand Down
1 change: 1 addition & 0 deletions apparmor.d/groups/gnome/gnome-software
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ profile gnome-software @{exec_path} {

/usr/share/app-info/{,**} r,
/usr/share/appdata/{,**} r,
/usr/share/flatpak/remotes.d/ r,
/usr/share/metainfo/{,**} r,
/usr/share/swcatalog/{,**} r,
/usr/share/xml/iso-codes/{,**} r,
Expand Down
1 change: 1 addition & 0 deletions apparmor.d/groups/network/mullvad-daemon
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ profile mullvad-daemon @{exec_path} flags=(attach_disconnected) {
owner @{tmp}/@{uuid} rw,
owner @{tmp}/talpid-openvpn-@{uuid} rw,

@{PROC}/sys/net/ipv{4,6}/conf/all/arp_ignore rw,
@{PROC}/sys/net/ipv{4,6}/conf/all/src_valid_mark rw,
owner @{PROC}/@{pid}/mounts r,
owner @{PROC}/sys/net/ipv6/conf/all/disable_ipv6 r,
Expand Down
1 change: 1 addition & 0 deletions apparmor.d/groups/pacman/pacman-hook-systemd
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ profile pacman-hook-systemd @{exec_path} {
include <abstractions/app/systemctl>

capability net_admin,
capability sys_resource,

signal send set=term peer=systemd-tty-ask-password-agent,

Expand Down
2 changes: 1 addition & 1 deletion apparmor.d/groups/systemd/bootctl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ abi <abi/4.0>,
include <tunables/global>

@{exec_path} = @{bin}/bootctl
profile bootctl @{exec_path} {
profile bootctl @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>
include <abstractions/consoles>
include <abstractions/disks-read>
Expand Down
2 changes: 1 addition & 1 deletion apparmor.d/groups/systemd/busctl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ abi <abi/4.0>,
include <tunables/global>

@{exec_path} = @{bin}/busctl
profile busctl @{exec_path} {
profile busctl @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>
include <abstractions/bus-accessibility>
include <abstractions/bus-session>
Expand Down
2 changes: 1 addition & 1 deletion apparmor.d/groups/systemd/systemd-backlight
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ abi <abi/4.0>,
include <tunables/global>

@{exec_path} = @{lib}/systemd/systemd-backlight
profile systemd-backlight @{exec_path} {
profile systemd-backlight @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>
include <abstractions/common/systemd>

Expand Down
2 changes: 1 addition & 1 deletion apparmor.d/groups/systemd/systemd-cryptsetup
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ abi <abi/4.0>,
include <tunables/global>

@{exec_path} = @{bin}/systemd-cryptsetup @{lib}/systemd/systemd-cryptsetup
profile systemd-cryptsetup @{exec_path} {
profile systemd-cryptsetup @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>
include <abstractions/common/systemd>
include <abstractions/disks-write>
Expand Down
2 changes: 1 addition & 1 deletion apparmor.d/groups/systemd/systemd-generator-user-autostart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ abi <abi/4.0>,
include <tunables/global>

@{exec_path} = @{lib}/systemd/user-generators/systemd-xdg-autostart-generator
profile systemd-generator-user-autostart @{exec_path} {
profile systemd-generator-user-autostart @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>
include <abstractions/common/systemd>
include <abstractions/nameservice-strict>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ abi <abi/4.0>,
include <tunables/global>

@{exec_path} = @{lib}/systemd/user-environment-generators/*
profile systemd-generator-user-environment @{exec_path} {
profile systemd-generator-user-environment @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>
include <abstractions/common/systemd>
include <abstractions/nameservice-strict>
Expand Down
2 changes: 1 addition & 1 deletion apparmor.d/groups/systemd/systemd-journald
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ abi <abi/4.0>,
include <tunables/global>

@{exec_path} = @{lib}/systemd/systemd-journald
profile systemd-journald @{exec_path} {
profile systemd-journald @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>
include <abstractions/consoles>
include <abstractions/common/systemd>
Expand Down
2 changes: 1 addition & 1 deletion apparmor.d/groups/systemd/systemd-machined
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ abi <abi/4.0>,
include <tunables/global>

@{exec_path} = @{lib}/systemd/systemd-machined
profile systemd-machined @{exec_path} {
profile systemd-machined @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>
include <abstractions/bus-system>
include <abstractions/nameservice-strict>
Expand Down
2 changes: 1 addition & 1 deletion apparmor.d/groups/systemd/systemd-random-seed
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ abi <abi/4.0>,
include <tunables/global>

@{exec_path} = @{lib}/systemd/systemd-random-seed
profile systemd-random-seed @{exec_path} {
profile systemd-random-seed @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>
include <abstractions/common/systemd>

Expand Down
2 changes: 1 addition & 1 deletion apparmor.d/groups/systemd/systemd-update-done
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ abi <abi/4.0>,
include <tunables/global>

@{exec_path} = @{lib}/systemd/systemd-update-done
profile systemd-update-done @{exec_path} {
profile systemd-update-done @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>

capability net_admin,
Expand Down
2 changes: 1 addition & 1 deletion apparmor.d/groups/systemd/systemd-update-utmp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ abi <abi/4.0>,
include <tunables/global>

@{exec_path} = @{lib}/systemd/systemd-update-utmp
profile systemd-update-utmp @{exec_path} {
profile systemd-update-utmp @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>
include <abstractions/common/systemd>
include <abstractions/wutmp>
Expand Down
2 changes: 1 addition & 1 deletion apparmor.d/groups/systemd/systemd-user-runtime-dir
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ abi <abi/4.0>,
include <tunables/global>

@{exec_path} = @{lib}/systemd/systemd-user-runtime-dir
profile systemd-user-runtime-dir @{exec_path} {
profile systemd-user-runtime-dir @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>
include <abstractions/bus-system>
include <abstractions/bus/org.freedesktop.login1>
Expand Down
2 changes: 1 addition & 1 deletion apparmor.d/groups/systemd/systemd-user-sessions
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ abi <abi/4.0>,
include <tunables/global>

@{exec_path} = @{lib}/systemd/systemd-user-sessions
profile systemd-user-sessions @{exec_path} {
profile systemd-user-sessions @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>
include <abstractions/common/systemd>

Expand Down
1 change: 1 addition & 0 deletions apparmor.d/groups/virt/libvirtd
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ profile libvirtd @{exec_path} flags=(attach_disconnected) {
@{run}/udev/data/+leds:* r,
@{run}/udev/data/+pci:* r, # Identifies all PCI devices (CPU, GPU, Network, Disks, USB, etc.)
@{run}/udev/data/+platform:* r,
@{run}/udev/data/+power_supply:* r,
@{run}/udev/data/+rfkill:* r,
@{run}/udev/data/+sound:card@{int} r, # For sound card
@{run}/udev/data/+thunderbolt:* r,
Expand Down
3 changes: 2 additions & 1 deletion apparmor.d/profiles-a-f/flatpak-system-helper
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ profile flatpak-system-helper @{exec_path} {
/etc/flatpak/{,**} r,
/etc/machine-id r,

/usr/share/mime/mime.cache r,
/usr/share/flatpak/remotes.d/ r,
/usr/share/flatpak/triggers/ r,
/usr/share/mime/mime.cache r,

/var/lib/flatpak/{,**} rwkl,
/var/tmp/flatpak-cache-*/{,**} rw,
Expand Down
3 changes: 1 addition & 2 deletions apparmor.d/profiles-a-f/fwupd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ profile fwupd @{exec_path} flags=(attach_disconnected,complain) {
include <abstractions/bus/org.freedesktop.UDisks2>
include <abstractions/bus/org.freedesktop.UPower>
include <abstractions/consoles>
include <abstractions/disks-read>
include <abstractions/disks-write>
include <abstractions/fonts>
include <abstractions/nameservice-strict>

Expand Down Expand Up @@ -129,7 +129,6 @@ profile fwupd @{exec_path} flags=(attach_disconnected,complain) {
/dev/mei@{int} rw,
/dev/mem r,
/dev/mtd@{int} rw,
/dev/sd[a-z]* r,
/dev/tpm@{int} rw,
/dev/tpmrm@{int} rw,
/dev/wmi/* r,
Expand Down

0 comments on commit 2560e96

Please sign in to comment.