Use more fine grained access control

Make it possible to add more permissions to an object than just visible
or not. Pass these permissions to the client. This way we can make a
difference between being able to see and read, modify or query an
object. More permissions can be added later when needed. Because the
permissions is set on the resource by the access control module, the
implementations can check if the right permission is set before doing
anything.
This commit is contained in:
Wim Taymans 2017-08-01 17:09:57 +02:00
parent c59bc457d4
commit 4f08dbcd24
14 changed files with 110 additions and 59 deletions

View file

@ -234,7 +234,7 @@ static struct pw_client *client_new(struct listener *l, int fd)
pw_signal_add(&client->busy_changed, &this->busy_changed, on_busy_changed);
pw_global_bind(protocol->core->global, client, PW_VERSION_CORE, 0);
pw_global_bind(protocol->core->global, client, PW_PERM_RWX, PW_VERSION_CORE, 0);
return client;