Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interfaces/builtin: network-manager and bluez can change hostname #2204

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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