Skip to content

Commit

Permalink
account_control: allow local user account management (#12626)
Browse files Browse the repository at this point in the history
* account_control: allow local user account management

This MR adds support for adding, removing and modifying the users.
It is required for Core Desktop.

* Remove peer entries

* Add peer=(label=unconfined)

It works the same.

* Add extra peer=(label=unconfined)
  • Loading branch information
sergio-costas authored Jun 15, 2023
1 parent 8c723a5 commit cc7fab5
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions interfaces/builtin/account_control.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,39 @@ const accountControlBaseDeclarationSlots = `
`

const accountControlConnectedPlugAppArmor = `
#include <abstractions/dbus-strict>
# Introspection of org.freedesktop.Accounts
dbus (send)
bus=system
path=/org/freedesktop/Accounts{,/User[0-9]*}
interface=org.freedesktop.DBus.Introspectable
member=Introspect
peer=(label=unconfined),
dbus (send)
bus=system
path=/org/freedesktop/Accounts
interface=org.freedesktop.Accounts
peer=(label=unconfined),
dbus (send)
bus=system
path=/org/freedesktop/Accounts/User[0-9]*
interface=org.freedesktop.Accounts.User
peer=(label=unconfined),
# Read all properties from Accounts
dbus (send)
bus=system
path=/org/freedesktop/Accounts{,/User[0-9]*}
interface=org.freedesktop.DBus.Properties
member=Get{,All}
peer=(label=unconfined),
# Receive Accounts property changed events
dbus (receive)
bus=system
path=/org/freedesktop/Accounts{,/User[0-9]*}
interface=org.freedesktop.DBus.Properties
member=PropertiesChanged
peer=(label=unconfined),
/{,usr/}sbin/chpasswd ixr,
/{,usr/}sbin/user{add,del} ixr,
Expand Down

0 comments on commit cc7fab5

Please sign in to comment.