mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-18 17:08:09 +01:00
feat(profiles): complete the dbus-session abstactions and related rules.
This commit is contained in:
parent
8f53366cd8
commit
a5c9a58c3c
17 changed files with 26 additions and 23 deletions
12
apparmor.d/abstractions/dbus-session-strict.d/complete
Normal file
12
apparmor.d/abstractions/dbus-session-strict.d/complete
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
# apparmor.d - Full set of apparmor profiles
|
||||||
|
# Copyright (C) 2022 Alexandre Pujol <alexandre@pujol.io>
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
|
unix (bind, listen) type=stream addr="@/tmp/dbus-*",
|
||||||
|
|
||||||
|
unix (connect, receive, send, accept)
|
||||||
|
type=stream
|
||||||
|
peer=(addr="@/tmp/dbus-*"),
|
||||||
|
|
||||||
|
owner @{run}/user/@{uid}/at-spi/ rw,
|
||||||
|
owner @{run}/user/@{uid}/at-spi/bus{,_[0-9]*} rw,
|
|
@ -9,6 +9,7 @@ include <tunables/global>
|
||||||
@{exec_path} = /usr/share/unattended-upgrades/unattended-upgrade-shutdown
|
@{exec_path} = /usr/share/unattended-upgrades/unattended-upgrade-shutdown
|
||||||
profile unattended-upgrade-shutdown @{exec_path} flags=(attach_disconnected) {
|
profile unattended-upgrade-shutdown @{exec_path} flags=(attach_disconnected) {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
|
include <abstractions/dbus-network-manager-strict>
|
||||||
include <abstractions/dbus-strict>
|
include <abstractions/dbus-strict>
|
||||||
include <abstractions/nameservice-strict>
|
include <abstractions/nameservice-strict>
|
||||||
include <abstractions/python>
|
include <abstractions/python>
|
||||||
|
|
|
@ -68,7 +68,6 @@ profile dbus-daemon @{exec_path} flags=(attach_disconnected) {
|
||||||
|
|
||||||
owner /tmp/dbus-[0-9a-zA-Z]* rw,
|
owner /tmp/dbus-[0-9a-zA-Z]* rw,
|
||||||
|
|
||||||
owner @{run}/user/@{uid}/at-spi/bus{,_[0-9]*} rw,
|
|
||||||
owner @{run}/user/@{uid}/dbus-1/ rw,
|
owner @{run}/user/@{uid}/dbus-1/ rw,
|
||||||
owner @{run}/user/@{uid}/dbus-1/services/ rw,
|
owner @{run}/user/@{uid}/dbus-1/services/ rw,
|
||||||
@{run}/systemd/inhibit/[0-9]*.ref rw,
|
@{run}/systemd/inhibit/[0-9]*.ref rw,
|
||||||
|
|
|
@ -34,11 +34,7 @@ profile ibus-extension-gtk3 @{exec_path} {
|
||||||
/usr/share/icons/{,**} r,
|
/usr/share/icons/{,**} r,
|
||||||
/usr/share/X11/xkb/** r,
|
/usr/share/X11/xkb/** r,
|
||||||
|
|
||||||
/etc/machine-id r,
|
|
||||||
/var/lib/dbus/machine-id r,
|
|
||||||
|
|
||||||
owner @{run}/user/@{uid}/.mutter-Xwaylandauth.[0-9A-Z]* r,
|
owner @{run}/user/@{uid}/.mutter-Xwaylandauth.[0-9A-Z]* r,
|
||||||
owner @{run}/user/@{uid}/at-spi/bus rw,
|
|
||||||
owner @{run}/user/@{uid}/gdm/Xauthority r,
|
owner @{run}/user/@{uid}/gdm/Xauthority r,
|
||||||
owner @{run}/user/@{uid}/wayland-[0-9] rw,
|
owner @{run}/user/@{uid}/wayland-[0-9] rw,
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,6 @@ profile ibus-x11 @{exec_path} flags=(attach_disconnected) {
|
||||||
owner @{user_config_dirs}/ibus/bus/[0-9a-f]*-unix-[0-9] r,
|
owner @{user_config_dirs}/ibus/bus/[0-9a-f]*-unix-[0-9] r,
|
||||||
|
|
||||||
owner @{run}/user/@{uid}/.mutter-Xwaylandauth.[0-9A-Z]* r,
|
owner @{run}/user/@{uid}/.mutter-Xwaylandauth.[0-9A-Z]* r,
|
||||||
owner @{run}/user/@{uid}/at-spi/bus rw,
|
|
||||||
owner @{run}/user/@{uid}/bus rw,
|
owner @{run}/user/@{uid}/bus rw,
|
||||||
owner @{run}/user/@{uid}/gdm/Xauthority r,
|
owner @{run}/user/@{uid}/gdm/Xauthority r,
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,6 @@ profile at-spi-bus-launcher @{exec_path} flags=(attach_disconnected) {
|
||||||
owner @{HOME}/.Xauthority r,
|
owner @{HOME}/.Xauthority r,
|
||||||
owner @{HOME}/.xsession-errors w,
|
owner @{HOME}/.xsession-errors w,
|
||||||
|
|
||||||
owner @{run}/user/@{uid}/at-spi/{,bus} rw,
|
|
||||||
owner @{run}/user/@{uid}/gdm/Xauthority r,
|
owner @{run}/user/@{uid}/gdm/Xauthority r,
|
||||||
|
|
||||||
/var/lib/lightdm/.Xauthority r,
|
/var/lib/lightdm/.Xauthority r,
|
||||||
|
|
|
@ -23,7 +23,6 @@ profile at-spi2-registryd @{exec_path} flags=(attach_disconnected) {
|
||||||
owner @{HOME}/.Xauthority r,
|
owner @{HOME}/.Xauthority r,
|
||||||
owner @{HOME}/.xsession-errors w,
|
owner @{HOME}/.xsession-errors w,
|
||||||
|
|
||||||
owner @{run}/user/@{uid}/at-spi/bus rw,
|
|
||||||
owner @{run}/user/@{uid}/gdm/Xauthority r,
|
owner @{run}/user/@{uid}/gdm/Xauthority r,
|
||||||
|
|
||||||
owner /dev/tty[0-9]* rw,
|
owner /dev/tty[0-9]* rw,
|
||||||
|
|
|
@ -24,10 +24,22 @@ profile xdg-desktop-portal-gtk @{exec_path} {
|
||||||
interface=org.freedesktop.DBus.Properties
|
interface=org.freedesktop.DBus.Properties
|
||||||
member=GetAll,
|
member=GetAll,
|
||||||
|
|
||||||
|
dbus receive bus=system path=/org/freedesktop/Accounts/User[0-9]*
|
||||||
|
interface=org.freedesktop.DBus.Properties
|
||||||
|
member=PropertiesChanged,
|
||||||
|
|
||||||
dbus receive bus=system path=/org/freedesktop/Accounts/User[0-9]*
|
dbus receive bus=system path=/org/freedesktop/Accounts/User[0-9]*
|
||||||
interface=org.freedesktop.Accounts.User
|
interface=org.freedesktop.Accounts.User
|
||||||
member=Changed,
|
member=Changed,
|
||||||
|
|
||||||
|
dbus receive bus=system path=/org/freedesktop/NetworkManager
|
||||||
|
interface=org.freedesktop.NetworkManager
|
||||||
|
member=CheckPermissions,
|
||||||
|
|
||||||
|
dbus receive bus=system path=/org/freedesktop/NetworkManager
|
||||||
|
interface=org.freedesktop.DBus.Properties
|
||||||
|
member=PropertiesChanged,
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
/usr/share/glib-2.0/schemas/gschemas.compiled r,
|
/usr/share/glib-2.0/schemas/gschemas.compiled r,
|
||||||
|
@ -40,7 +52,6 @@ profile xdg-desktop-portal-gtk @{exec_path} {
|
||||||
owner @{HOME}/@{XDG_DATA_HOME}/ r,
|
owner @{HOME}/@{XDG_DATA_HOME}/ r,
|
||||||
|
|
||||||
owner @{run}/user/@{uid}/.mutter-Xwaylandauth.[0-9A-Z]* rw,
|
owner @{run}/user/@{uid}/.mutter-Xwaylandauth.[0-9A-Z]* rw,
|
||||||
owner @{run}/user/@{uid}/at-spi/bus rw,
|
|
||||||
owner @{run}/user/@{uid}/wayland-[0-9]* rw,
|
owner @{run}/user/@{uid}/wayland-[0-9]* rw,
|
||||||
@{run}/mount/utab r,
|
@{run}/mount/utab r,
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,5 @@ profile evolution-alarm-notify @{exec_path} {
|
||||||
/usr/share/ubuntu/applications/ r,
|
/usr/share/ubuntu/applications/ r,
|
||||||
/usr/share/zoneinfo-icu/{,**} r,
|
/usr/share/zoneinfo-icu/{,**} r,
|
||||||
|
|
||||||
owner @{run}/user/@{uid}/at-spi/bus rw,
|
|
||||||
|
|
||||||
include if exists <local/evolution-alarm-notify>
|
include if exists <local/evolution-alarm-notify>
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,8 +53,6 @@ profile gnome-extension-ding @{exec_path} {
|
||||||
owner @{user_share_dirs}/gvfs-metadata/home r,
|
owner @{user_share_dirs}/gvfs-metadata/home r,
|
||||||
owner @{user_share_dirs}/gvfs-metadata/home-*.log r,
|
owner @{user_share_dirs}/gvfs-metadata/home-*.log r,
|
||||||
|
|
||||||
owner @{run}/user/@{uid}/at-spi/bus rw,
|
|
||||||
|
|
||||||
owner @{PROC}/@{pid}/mounts r,
|
owner @{PROC}/@{pid}/mounts r,
|
||||||
owner @{PROC}/@{pid}/stat r,
|
owner @{PROC}/@{pid}/stat r,
|
||||||
owner @{PROC}/@{pid}/task/@{tid}/stat r,
|
owner @{PROC}/@{pid}/task/@{tid}/stat r,
|
||||||
|
|
|
@ -48,7 +48,6 @@ profile gsd-color @{exec_path} flags=(attach_disconnected) {
|
||||||
owner @{user_share_dirs}/icc/ r,
|
owner @{user_share_dirs}/icc/ r,
|
||||||
owner @{user_share_dirs}/icc/edid-*.icc rw,
|
owner @{user_share_dirs}/icc/edid-*.icc rw,
|
||||||
|
|
||||||
owner @{run}/user/@{uid}/at-spi/bus rw,
|
|
||||||
owner @{run}/user/@{uid}/gdm/Xauthority r,
|
owner @{run}/user/@{uid}/gdm/Xauthority r,
|
||||||
owner @{run}/user/@{uid}/wayland-[0-9] rw,
|
owner @{run}/user/@{uid}/wayland-[0-9] rw,
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,6 @@ profile gsd-keyboard @{exec_path} flags=(attach_disconnected) {
|
||||||
owner @{user_config_dirs}/.gsd-keyboard.settings-ported* rw,
|
owner @{user_config_dirs}/.gsd-keyboard.settings-ported* rw,
|
||||||
owner @{user_share_dirs}/gnome-settings-daemon/ rw,
|
owner @{user_share_dirs}/gnome-settings-daemon/ rw,
|
||||||
|
|
||||||
owner @{run}/user/@{uid}/at-spi/bus rw,
|
|
||||||
owner @{run}/user/@{uid}/gdm/Xauthority r,
|
owner @{run}/user/@{uid}/gdm/Xauthority r,
|
||||||
owner @{run}/user/@{uid}/wayland-[0-9] rw,
|
owner @{run}/user/@{uid}/wayland-[0-9] rw,
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,6 @@ profile gsd-media-keys @{exec_path} flags=(attach_disconnected) {
|
||||||
/var/lib/gdm/.config/pulse/client.conf r,
|
/var/lib/gdm/.config/pulse/client.conf r,
|
||||||
/var/lib/gdm/.config/pulse/cookie rk,
|
/var/lib/gdm/.config/pulse/cookie rk,
|
||||||
|
|
||||||
owner @{run}/user/@{uid}/at-spi/bus rw,
|
|
||||||
owner @{run}/user/@{uid}/gdm/Xauthority r,
|
owner @{run}/user/@{uid}/gdm/Xauthority r,
|
||||||
owner @{run}/user/@{uid}/wayland-[0-9]* rw,
|
owner @{run}/user/@{uid}/wayland-[0-9]* rw,
|
||||||
@{run}/systemd/inhibit/[0-9]*.ref rw,
|
@{run}/systemd/inhibit/[0-9]*.ref rw,
|
||||||
|
|
|
@ -60,7 +60,6 @@ profile gsd-power @{exec_path} flags=(attach_disconnected) {
|
||||||
/var/lib/gdm/.config/dconf/user r,
|
/var/lib/gdm/.config/dconf/user r,
|
||||||
/var/lib/gdm/.config/pulse/client.conf r,
|
/var/lib/gdm/.config/pulse/client.conf r,
|
||||||
|
|
||||||
owner @{run}/user/@{uid}/at-spi/bus rw,
|
|
||||||
owner @{run}/user/@{uid}/gdm/Xauthority r,
|
owner @{run}/user/@{uid}/gdm/Xauthority r,
|
||||||
owner @{run}/user/@{uid}/wayland-[0-9] rw,
|
owner @{run}/user/@{uid}/wayland-[0-9] rw,
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@ profile gsd-wacom @{exec_path} flags=(attach_disconnected) {
|
||||||
|
|
||||||
/etc/machine-id r,
|
/etc/machine-id r,
|
||||||
|
|
||||||
owner @{run}/user/@{uid}/at-spi/bus rw,
|
|
||||||
owner @{run}/user/@{uid}/gdm/Xauthority r,
|
owner @{run}/user/@{uid}/gdm/Xauthority r,
|
||||||
owner @{run}/user/@{uid}/wayland-[0-9] rw,
|
owner @{run}/user/@{uid}/wayland-[0-9] rw,
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ include <tunables/global>
|
||||||
@{exec_path} = /{usr/,}lib/update-notifier/ubuntu-advantage-notification
|
@{exec_path} = /{usr/,}lib/update-notifier/ubuntu-advantage-notification
|
||||||
profile ubuntu-advantage-notification @{exec_path} {
|
profile ubuntu-advantage-notification @{exec_path} {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
include <abstractions/dbus-session>
|
include <abstractions/dbus-session-strict>
|
||||||
include <abstractions/dconf-write>
|
include <abstractions/dconf-write>
|
||||||
include <abstractions/gtk>
|
include <abstractions/gtk>
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@ profile ubuntu-advantage-notification @{exec_path} {
|
||||||
/usr/share/icons/{,**} r,
|
/usr/share/icons/{,**} r,
|
||||||
/usr/share/X11/xkb/{,**} r,
|
/usr/share/X11/xkb/{,**} r,
|
||||||
|
|
||||||
owner @{run}/user/@{uid}/at-spi/bus rw,
|
|
||||||
owner @{run}/user/@{uid}/wayland-[0-9]* rw,
|
owner @{run}/user/@{uid}/wayland-[0-9]* rw,
|
||||||
|
|
||||||
include if exists <local/ubuntu-advantage-notification>
|
include if exists <local/ubuntu-advantage-notification>
|
||||||
|
|
|
@ -13,8 +13,6 @@ profile spice-vdagent @{exec_path} {
|
||||||
include <abstractions/dbus-session-strict>
|
include <abstractions/dbus-session-strict>
|
||||||
include <abstractions/gtk>
|
include <abstractions/gtk>
|
||||||
|
|
||||||
unix (connect, receive, send) type=stream peer=(addr="@/tmp/.X11-unix/X[0-9]*"),
|
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
/etc/machine-id r,
|
/etc/machine-id r,
|
||||||
|
@ -22,7 +20,6 @@ profile spice-vdagent @{exec_path} {
|
||||||
|
|
||||||
owner @{user_config_dirs}/user-dirs.dirs r,
|
owner @{user_config_dirs}/user-dirs.dirs r,
|
||||||
|
|
||||||
owner @{run}/user/@{uid}/at-spi/bus rw,
|
|
||||||
owner @{run}/user/@{uid}/.mutter-Xwaylandauth.[a-zA-z0-9]* rw,
|
owner @{run}/user/@{uid}/.mutter-Xwaylandauth.[a-zA-z0-9]* rw,
|
||||||
@{run}/spice-vdagentd/spice-vdagent-sock rw,
|
@{run}/spice-vdagentd/spice-vdagent-sock rw,
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue