Skip to content

Commit

Permalink
interfaces/builtin: network-manager and bluez can change hostname (#2204
Browse files Browse the repository at this point in the history
)
  • Loading branch information
morphis authored and niemeyer committed Oct 25, 2016
1 parent a1c5b68 commit dfd2d58
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
7 changes: 7 additions & 0 deletions interfaces/builtin/bluez.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ var bluezPermanentSlotAppArmor = []byte(`
bus=system
path=/org/bluez{,/**}
interface=org.freedesktop.DBus.**,
# Allow access to hostname system service
dbus (receive, send)
bus=system
path=/org/freedesktop/hostname1
interface=org.freedesktop.DBus.Properties
peer=(label=unconfined),
`)

var bluezConnectedPlugAppArmor = []byte(`
Expand Down
9 changes: 8 additions & 1 deletion interfaces/builtin/network_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,17 @@ dbus (receive, send)
interface=org.freedesktop.DBus.*,
# Allow access to hostname system service
dbus (send)
dbus (receive, send)
bus=system
path=/org/freedesktop/hostname1
interface=org.freedesktop.DBus.Properties
peer=(label=unconfined),
dbus(receive, send)
bus=system
path=/org/freedesktop/hostname1
interface=org.freedesktop.hostname1
member={Set,SetStatic}Hostname
peer=(label=unconfined),
# Sleep monitor inside NetworkManager needs this
dbus (send)
Expand Down Expand Up @@ -204,6 +210,7 @@ sendmmsg
sendmsg
sendto
setsockopt
sethostname
shutdown
socketpair
socket
Expand Down

0 comments on commit dfd2d58

Please sign in to comment.