feat(dbus): rewrite some dbus rules (8).
This commit is contained in:
parent
c4b48b06e2
commit
6a3cc952e1
12 changed files with 32 additions and 101 deletions
|
|
@ -9,6 +9,7 @@ include <tunables/global>
|
|||
@{exec_path} = @{bin}/hostnamectl
|
||||
profile hostnamectl @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/bus/hostname>
|
||||
include <abstractions/consoles>
|
||||
include <abstractions/dbus-strict>
|
||||
|
||||
|
|
|
|||
|
|
@ -9,22 +9,14 @@ include <tunables/global>
|
|||
@{exec_path} = @{bin}/loginctl
|
||||
profile loginctl @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/bus/login-session>
|
||||
include <abstractions/bus/login>
|
||||
include <abstractions/dbus-strict>
|
||||
include <abstractions/systemd-common>
|
||||
|
||||
capability net_admin,
|
||||
capability sys_resource,
|
||||
|
||||
dbus (send) bus=system path=/org/freedesktop/login1*
|
||||
interface=org.freedesktop.login1*.Manager
|
||||
member={ListSessions,GetSession}
|
||||
peer=(name=org.freedesktop.login1*, label=systemd-logind),
|
||||
|
||||
dbus (send) bus=system path=/org/freedesktop/login1*/session/**
|
||||
interface=org.freedesktop.DBus.Properties
|
||||
member={Get,GetAll}
|
||||
peer=(name=org.freedesktop.login1*, label=systemd-logind),
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
@{bin}/less rPx -> child-pager,
|
||||
|
|
|
|||
|
|
@ -24,6 +24,14 @@ profile systemd-machined @{exec_path} {
|
|||
capability sys_chroot,
|
||||
capability sys_ptrace,
|
||||
|
||||
dbus bind bus=system name=org.freedesktop.machine1,
|
||||
dbus receive bus=system path=/org/freedesktop/machine1{,/**}
|
||||
interface=org.freedesktop.machine1.Manager
|
||||
peer=(name=:*),
|
||||
dbus receive bus=system path=/org/freedesktop/machine1{,/**}
|
||||
interface=org.freedesktop.DBus.Properties
|
||||
peer=(name=:*),
|
||||
|
||||
dbus send bus=system path=/org/freedesktop/systemd1/{,{unit,job}/*}
|
||||
interface=org.freedesktop.DBus.Properties
|
||||
member=Get
|
||||
|
|
@ -44,19 +52,6 @@ profile systemd-machined @{exec_path} {
|
|||
member={JobRemoved,UnitRemoved,Reloading}
|
||||
peer=(name=:*),
|
||||
|
||||
dbus receive bus=system path=/org/freedesktop/machine1
|
||||
interface=org.freedesktop.machine1.Manager
|
||||
member={TerminateMachine,GetMachineByPID,CreateMachineWithNetwork}
|
||||
peer=(name=:*, label=libvirtd),
|
||||
|
||||
dbus receive bus=system path=/org/freedesktop/machine1/machine/*
|
||||
interface=org.freedesktop.DBus.Properties
|
||||
member=Get
|
||||
peer=(name=:*, label=libvirtd),
|
||||
|
||||
dbus bind bus=system
|
||||
name=org.freedesktop.machine1,
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
/var/lib/machines/{,**} rw,
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ include <tunables/global>
|
|||
@{exec_path} = @{lib}/systemd/systemd-networkd
|
||||
profile systemd-networkd @{exec_path} flags=(attach_disconnected,complain) {
|
||||
include <abstractions/base>
|
||||
include <abstractions/bus/hostname>
|
||||
include <abstractions/dbus-strict>
|
||||
include <abstractions/systemd-common>
|
||||
|
||||
|
|
@ -28,12 +29,7 @@ profile systemd-networkd @{exec_path} flags=(attach_disconnected,complain) {
|
|||
|
||||
dbus bind bus=system name=org.freedesktop.network1,
|
||||
|
||||
dbus send bus=system path=/org/freedesktop/hostname1
|
||||
interface=org.freedesktop.hostname1
|
||||
member=SetHostname
|
||||
peer=(name=org.freedesktop.hostname1),
|
||||
|
||||
dbus receive bus=system path=/org/freedesktop/network[0-9]
|
||||
dbus receive bus=system path=/org/freedesktop/network1
|
||||
interface=org.freedesktop.DBus.Properties
|
||||
member=Get,
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ include <tunables/global>
|
|||
@{exec_path} = @{lib}/systemd/systemd-resolved
|
||||
profile systemd-resolved @{exec_path} flags=(attach_disconnected) {
|
||||
include <abstractions/base>
|
||||
include <abstractions/bus/login>
|
||||
include <abstractions/dbus-strict>
|
||||
include <abstractions/nameservice-strict>
|
||||
include <abstractions/openssl>
|
||||
|
|
@ -30,19 +31,14 @@ profile systemd-resolved @{exec_path} flags=(attach_disconnected) {
|
|||
network netlink raw,
|
||||
|
||||
dbus bind bus=system name=org.freedesktop.resolve1,
|
||||
|
||||
dbus receive bus=system path=/org/freedesktop/resolve1
|
||||
interface=org.freedesktop.{resolve1.Manager,DBus.Peer,DBus.Properties},
|
||||
interface=org.freedesktop.resolve1.Manager
|
||||
peer=(name=:*),
|
||||
|
||||
dbus send bus=system path=/org/freedesktop/DBus
|
||||
interface=org.freedesktop.DBus
|
||||
member={RequestName,GetConnectionUnixUser}
|
||||
peer=(name=org.freedesktop.DBus),
|
||||
|
||||
dbus receive bus=system path=/org/freedesktop/login1
|
||||
interface=org.freedesktop.login1.Manager
|
||||
member={PrepareForSleep,PrepareForShutdown}
|
||||
peer=(name=:*, label=systemd-logind),
|
||||
member={GetConnectionUnixUser,GetConnectionUnixProcessID}
|
||||
peer=(name=org.freedesktop.DBus, label=dbus-daemon),
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue