permissions: use current_client for security checks

Don't pass around the client object but keep track of the current
client in the core object. This way we don't need to add a client
argument to functions and can check security when needed.
This commit is contained in:
Wim Taymans 2018-01-24 11:41:40 +01:00
parent ab099d09dd
commit ff17fb68b5
10 changed files with 32 additions and 21 deletions

View file

@ -1001,7 +1001,7 @@ static bool do_export_node(struct data *data, const char *cmd, char *args, char
goto no_remote;
}
global = pw_core_find_global(data->core, NULL, atoi(a[0]));
global = pw_core_find_global(data->core, atoi(a[0]));
if (global == NULL) {
asprintf(error, "object %d does not exist", atoi(a[0]));
return false;