feat(profiles): first set of rules for Ubuntu Core support.
This commit is contained in:
parent
1316e0ddde
commit
ef292b585c
27 changed files with 351 additions and 92 deletions
|
|
@ -9,6 +9,15 @@ include <tunables/global>
|
|||
@{exec_path} = /{usr/,}bin/hostnamectl
|
||||
profile hostnamectl @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/consoles>
|
||||
include <abstractions/dbus-strict>
|
||||
|
||||
capability net_admin,
|
||||
|
||||
dbus send bus=system path=/org/freedesktop/
|
||||
interface=org.freedesktop.hostname1
|
||||
member=Set*Hostname
|
||||
peer=(name=org.freedesktop.hostname1),
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ profile systemd-environment-d-generator @{exec_path} {
|
|||
@{etc_ro}/environment r,
|
||||
@{etc_ro}/environment.d/{,**} r,
|
||||
|
||||
/snap/snapd/[0-9]*/usr/lib/environment.d/{,*.conf} r,
|
||||
|
||||
owner @{user_config_dirs}/environment.d/{,*.conf} r,
|
||||
|
||||
/dev/tty rw,
|
||||
|
|
|
|||
|
|
@ -25,19 +25,24 @@ profile systemd-hostnamed @{exec_path} flags=(attach_disconnected) {
|
|||
member=CheckAuthorization
|
||||
peer=(name=org.freedesktop.PolicyKit1),
|
||||
|
||||
dbus receive bus=system path=/org/freedesktop/hostname[0-9]
|
||||
dbus receive bus=system path=/org/freedesktop/hostname1
|
||||
interface=org.freedesktop.{DBus.Properties,hostname1}
|
||||
member={Get,GetAll,SetHostname}
|
||||
peer=(name=:*),
|
||||
|
||||
dbus receive bus=system path=/org/freedesktop/hostname1
|
||||
interface=org.freedesktop.hostname1
|
||||
member=Set*Hostname
|
||||
peer=(name=:*, label=hostnamectl),
|
||||
|
||||
dbus bind bus=system
|
||||
name=org.freedesktop.hostname[0-9],
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
/etc/.#hostname* rw,
|
||||
@{etc_rw}/.#hostname* rw,
|
||||
@{etc_rw}/hostname rw,
|
||||
/etc/.#machine-info?????? rw,
|
||||
/etc/hostname rw,
|
||||
/etc/machine-info rw,
|
||||
|
||||
@{run}/systemd/default-hostname rw,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue