mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-18 08:58:15 +01:00
feat(dbus): rename all new dbus abstractions.
Use the dbus name as abstraction name.
This commit is contained in:
parent
aa1491a3c0
commit
799b778480
27 changed files with 84 additions and 51 deletions
|
@ -7,4 +7,4 @@
|
||||||
member={GetAll,PropertiesChanged}
|
member={GetAll,PropertiesChanged}
|
||||||
peer=(name=:*, label=wpa-supplicant),
|
peer=(name=:*, label=wpa-supplicant),
|
||||||
|
|
||||||
include if exists <abstractions/bus/wpa-supplicant.d>
|
include if exists <abstractions/bus/fi.w1.wpa_supplicant1.d>
|
|
@ -1,15 +0,0 @@
|
||||||
# apparmor.d - Full set of apparmor profiles
|
|
||||||
# Copyright (C) 2023 Alexandre Pujol <alexandre@pujol.io>
|
|
||||||
# SPDX-License-Identifier: GPL-2.0-only
|
|
||||||
|
|
||||||
dbus send bus=system path=/org/freedesktop/login1/session/auto
|
|
||||||
interface=org.freedesktop.DBus.Properties
|
|
||||||
member=GetAll
|
|
||||||
peer=(name=:*, label=systemd-logind),
|
|
||||||
|
|
||||||
dbus send bus=system path=/org/freedesktop/login1/session/auto
|
|
||||||
interface=org.freedesktop.login1.Session
|
|
||||||
member=SetBrightness
|
|
||||||
peer=(name=:*, label=systemd-logind),
|
|
||||||
|
|
||||||
include if exists <abstractions/bus/login-session.d>
|
|
|
@ -29,7 +29,6 @@
|
||||||
member=Embed
|
member=Embed
|
||||||
peer=(name=org.a11y.atspi.Registry, label=at-spi2-registryd),
|
peer=(name=org.a11y.atspi.Registry, label=at-spi2-registryd),
|
||||||
|
|
||||||
|
|
||||||
# Session bus
|
# Session bus
|
||||||
|
|
||||||
dbus send bus=session path=/org/a11y/bus
|
dbus send bus=session path=/org/a11y/bus
|
||||||
|
@ -37,4 +36,9 @@
|
||||||
member=GetAddress
|
member=GetAddress
|
||||||
peer=(name=org.a11y.Bus, label="{at-spi-bus-launcher,dbus-daemon}"),
|
peer=(name=org.a11y.Bus, label="{at-spi-bus-launcher,dbus-daemon}"),
|
||||||
|
|
||||||
include if exists <abstractions/bus/atspi.d>
|
dbus send bus=session path=/org/a11y/bus
|
||||||
|
interface=org.a11y.Bus
|
||||||
|
member=GetAddress
|
||||||
|
peer=(name=org.a11y.Bus),
|
||||||
|
|
||||||
|
include if exists <abstractions/bus/org.a11y.d>
|
|
@ -7,4 +7,4 @@
|
||||||
member=PropertiesChanged
|
member=PropertiesChanged
|
||||||
peer=(name=:*, label=bluetoothd),
|
peer=(name=:*, label=bluetoothd),
|
||||||
|
|
||||||
include if exists <abstractions/bus/bluetooth.d>
|
include if exists <abstractions/bus/org.bluez.d>
|
|
@ -22,4 +22,4 @@
|
||||||
member=*Changed
|
member=*Changed
|
||||||
peer=(name=:*, label=accounts-daemon),
|
peer=(name=:*, label=accounts-daemon),
|
||||||
|
|
||||||
include if exists <abstractions/bus/account-daemon.d>
|
include if exists <abstractions/bus/org.freedesktop.Accounts.d>
|
|
@ -22,4 +22,4 @@
|
||||||
member={ItemNew,AllForNow,CacheExhausted}
|
member={ItemNew,AllForNow,CacheExhausted}
|
||||||
peer=(name=:*, label=avahi-daemon),
|
peer=(name=:*, label=avahi-daemon),
|
||||||
|
|
||||||
include if exists <abstractions/bus/avahi.d>
|
include if exists <abstractions/bus/org.freedesktop.Avahi.d>
|
|
@ -12,4 +12,4 @@
|
||||||
member=GetAll
|
member=GetAll
|
||||||
peer=(name=:*, label=ModemManager),
|
peer=(name=:*, label=ModemManager),
|
||||||
|
|
||||||
include if exists <abstractions/bus/modem-manager.d>
|
include if exists <abstractions/bus/org.freedesktop.ModemManager1.d>
|
|
@ -32,4 +32,9 @@
|
||||||
member=CheckPermissions
|
member=CheckPermissions
|
||||||
peer=(name=:*, label=NetworkManager),
|
peer=(name=:*, label=NetworkManager),
|
||||||
|
|
||||||
include if exists <abstractions/bus/network-manager.d>
|
dbus receive bus=system path=/org/freedesktop/NetworkManager
|
||||||
|
interface=org.freedesktop.NetworkManager
|
||||||
|
member={DeviceAdded,DeviceRemoved,StateChanged}
|
||||||
|
peer=(name=:*, label=NetworkManager),
|
||||||
|
|
||||||
|
include if exists <abstractions/bus/org.freedesktop.NetworkManager.d>
|
|
@ -7,4 +7,4 @@
|
||||||
member=GetAll
|
member=GetAll
|
||||||
peer=(name=:*, label=gjs-console),
|
peer=(name=:*, label=gjs-console),
|
||||||
|
|
||||||
include if exists <abstractions/bus/notification.d>
|
include if exists <abstractions/bus/org.freedesktop.Notifications.d>
|
|
@ -21,4 +21,4 @@
|
||||||
member=Changed
|
member=Changed
|
||||||
peer=(name=:*, label=polkitd),
|
peer=(name=:*, label=polkitd),
|
||||||
|
|
||||||
include if exists <abstractions/bus/polkit.d>
|
include if exists <abstractions/bus/org.freedesktop.PolicyKit1.d>
|
|
@ -17,4 +17,4 @@
|
||||||
member=MakeThread*
|
member=MakeThread*
|
||||||
peer=(name="{:*,org.freedesktop.RealtimeKit1}", label=rtkit-daemon),
|
peer=(name="{:*,org.freedesktop.RealtimeKit1}", label=rtkit-daemon),
|
||||||
|
|
||||||
include if exists <abstractions/bus/rtkit.d>
|
include if exists <abstractions/bus/org.freedesktop.RealtimeKit1.d>
|
|
@ -22,4 +22,4 @@
|
||||||
member=Completed
|
member=Completed
|
||||||
peer=(name=:*, label=udisksd),
|
peer=(name=:*, label=udisksd),
|
||||||
|
|
||||||
include if exists <abstractions/bus/udisk.d>
|
include if exists <abstractions/bus/org.freedesktop.UDisks2.d>
|
|
@ -21,4 +21,4 @@
|
||||||
member={Get,GetAll}
|
member={Get,GetAll}
|
||||||
peer=(name=:*, label=upowerd),
|
peer=(name=:*, label=upowerd),
|
||||||
|
|
||||||
include if exists <abstractions/bus/upower.d>
|
include if exists <abstractions/bus/org.freedesktop.UPower.d>
|
|
@ -12,4 +12,4 @@
|
||||||
member={Get,GetAll}
|
member={Get,GetAll}
|
||||||
peer=(name=org.freedesktop.hostname1),
|
peer=(name=org.freedesktop.hostname1),
|
||||||
|
|
||||||
include if exists <abstractions/bus/hostname.d>
|
include if exists <abstractions/bus/org.freedesktop.hostname1.d>
|
|
@ -7,4 +7,4 @@
|
||||||
member=GetAll
|
member=GetAll
|
||||||
peer=(name=:*, label=systemd-localed),
|
peer=(name=:*, label=systemd-localed),
|
||||||
|
|
||||||
include if exists <abstractions/bus/locale.d>
|
include if exists <abstractions/bus/org.freedesktop.locale1.d>
|
|
@ -22,4 +22,4 @@
|
||||||
member={SessionNew,SessionRemoved,UserNew,UserRemoved,PrepareFor*}
|
member={SessionNew,SessionRemoved,UserNew,UserRemoved,PrepareFor*}
|
||||||
peer=(name=:*, label=systemd-logind),
|
peer=(name=:*, label=systemd-logind),
|
||||||
|
|
||||||
include if exists <abstractions/bus/login.d>
|
include if exists <abstractions/bus/org.freedesktop.login1.d>
|
30
apparmor.d/abstractions/bus/org.freedesktop.login1.Session
Normal file
30
apparmor.d/abstractions/bus/org.freedesktop.login1.Session
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
# apparmor.d - Full set of apparmor profiles
|
||||||
|
# Copyright (C) 2023 Alexandre Pujol <alexandre@pujol.io>
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
|
dbus send bus=system path=/org/freedesktop/login1
|
||||||
|
interface=org.freedesktop.login1.Manager
|
||||||
|
member=GetSession
|
||||||
|
peer=(name=:*, label=systemd-logind),
|
||||||
|
|
||||||
|
dbus send bus=system path=/org/freedesktop/login1/session/*
|
||||||
|
interface=org.freedesktop.DBus.Properties
|
||||||
|
member=GetAll
|
||||||
|
peer=(name=:*, label=systemd-logind),
|
||||||
|
|
||||||
|
dbus send bus=system path=/org/freedesktop/login1/session/*
|
||||||
|
interface=org.freedesktop.login1.Session
|
||||||
|
member={ReleaseDevice,TakeControl,TakeDevice,SetBrightness}
|
||||||
|
peer=(name=:*, label=systemd-logind),
|
||||||
|
|
||||||
|
dbus receive bus=system path=/org/freedesktop/login1/session/*
|
||||||
|
interface=org.freedesktop.DBus.Properties
|
||||||
|
member=PropertiesChanged
|
||||||
|
peer=(name=:*, label=systemd-logind),
|
||||||
|
|
||||||
|
dbus receive bus=system path=/org/freedesktop/login1/session/*
|
||||||
|
interface=org.freedesktop.login1.Session
|
||||||
|
member=PauseDevice
|
||||||
|
peer=(name=:*, label=systemd-logind),
|
||||||
|
|
||||||
|
include if exists <abstractions/bus/org.freedesktop.login1.Session.d>
|
|
@ -27,5 +27,4 @@
|
||||||
member={Read,ReadAll}
|
member={Read,ReadAll}
|
||||||
peer=(name=:*, label=xdg-desktop-portal),
|
peer=(name=:*, label=xdg-desktop-portal),
|
||||||
|
|
||||||
include if exists <abstractions/bus/desktop.d>
|
include if exists <abstractions/bus/org.freedesktop.portal.Desktop.d>
|
||||||
# include <abstractions/bus/desktop>
|
|
20
apparmor.d/abstractions/bus/org.freedesktop.systemd1
Normal file
20
apparmor.d/abstractions/bus/org.freedesktop.systemd1
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# apparmor.d - Full set of apparmor profiles
|
||||||
|
# Copyright (C) 2023 Alexandre Pujol <alexandre@pujol.io>
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
|
dbus send bus=system path=/org/freedesktop/systemd1
|
||||||
|
interface=org.freedesktop.DBus.Properties
|
||||||
|
member={Get,GetAll}
|
||||||
|
peer=(name=org.freedesktop.systemd1, label="@{systemd}"),
|
||||||
|
|
||||||
|
dbus send bus=session path=/org/freedesktop/systemd1
|
||||||
|
interface=org.freedesktop.systemd1.Manager
|
||||||
|
member={GetUnit,StartUnit,StartTransientUnit}
|
||||||
|
peer=(name=org.freedesktop.systemd1, label="@{systemd}"),
|
||||||
|
|
||||||
|
dbus send bus=session path=/org/freedesktop/systemd1
|
||||||
|
interface=org.freedesktop.systemd1.Manager
|
||||||
|
member={GetUnit,StartUnit,StartTransientUnit}
|
||||||
|
peer=(name=org.freedesktop.systemd1),
|
||||||
|
|
||||||
|
include if exists <abstractions/bus/org.freedesktop.systemd1.d>
|
|
@ -12,4 +12,4 @@
|
||||||
member=GetUnit
|
member=GetUnit
|
||||||
peer=(name="{:*,org.freedesktop.systemd1}", label="@{systemd}"),
|
peer=(name="{:*,org.freedesktop.systemd1}", label="@{systemd}"),
|
||||||
|
|
||||||
include if exists <abstractions/bus/systemd-session.d>
|
include if exists <abstractions/bus/org.freedesktop.systemd1-session.d>
|
|
@ -7,4 +7,4 @@
|
||||||
member=GetAll
|
member=GetAll
|
||||||
peer=(name=:*, label=systemd-timedated),
|
peer=(name=:*, label=systemd-timedated),
|
||||||
|
|
||||||
include if exists <abstractions/bus/timedate.d>
|
include if exists <abstractions/bus/org.freedesktop.timedate1.d>
|
|
@ -17,4 +17,4 @@
|
||||||
member={ActiveChanged,WakeUpScreen}
|
member={ActiveChanged,WakeUpScreen}
|
||||||
peer=(name=:*, label=gjs-console),
|
peer=(name=:*, label=gjs-console),
|
||||||
|
|
||||||
include if exists <abstractions/bus/gnome-screensaver.d>
|
include if exists <abstractions/bus/org.gnome.ScreenSaver.d>
|
|
@ -47,4 +47,4 @@
|
||||||
member=StatusChanged
|
member=StatusChanged
|
||||||
peer=(name=:*, label=gnome-session-binary),
|
peer=(name=:*, label=gnome-session-binary),
|
||||||
|
|
||||||
include if exists <abstractions/bus/session-manager.d>
|
include if exists <abstractions/bus/org.gnome.SessionManager.d>
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
dbus send bus=session path=/org/gtk/vfs/Daemon
|
dbus send bus=session path=/org/gtk/vfs/Daemon
|
||||||
interface=org.gtk.vfs.Daemon
|
interface=org.gtk.vfs.Daemon
|
||||||
member={ListMonitorImplementations,ListMountableInfo}
|
member={GetConnection,ListMonitorImplementations,ListMountableInfo}
|
||||||
peer=(name=:*, label=gvfsd),
|
peer=(name=:*, label=gvfsd),
|
||||||
|
|
||||||
include if exists <abstractions/bus/vfs/daemon.d>
|
include if exists <abstractions/bus/org.gtk.vfs.Daemon.d>
|
|
@ -12,4 +12,4 @@
|
||||||
member=AttributeChanged
|
member=AttributeChanged
|
||||||
peer=(name=:*, label=gvfsd-metadata),
|
peer=(name=:*, label=gvfsd-metadata),
|
||||||
|
|
||||||
include if exists <abstractions/bus/vfs/metadata.d>
|
include if exists <abstractions/bus/org.gtk.vfs.Metadata.d>
|
|
@ -17,4 +17,4 @@
|
||||||
member=Mounted
|
member=Mounted
|
||||||
peer=(name=:*, label=gvfsd),
|
peer=(name=:*, label=gvfsd),
|
||||||
|
|
||||||
include if exists <abstractions/bus/vfs/mount.d>
|
include if exists <abstractions/bus/org.gtk.vfs.MountTracker.d>
|
|
@ -1,10 +0,0 @@
|
||||||
# apparmor.d - Full set of apparmor profiles
|
|
||||||
# Copyright (C) 2023 Alexandre Pujol <alexandre@pujol.io>
|
|
||||||
# SPDX-License-Identifier: GPL-2.0-only
|
|
||||||
|
|
||||||
dbus send bus=system path=/org/freedesktop/systemd1
|
|
||||||
interface=org.freedesktop.DBus.Properties
|
|
||||||
member={Get,GetAll}
|
|
||||||
peer=(name=org.freedesktop.systemd1, label="@{systemd}"),
|
|
||||||
|
|
||||||
include if exists <abstractions/bus/systemd.d>
|
|
Loading…
Reference in a new issue