mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-14 06:59:57 -05:00
client: update busy status after check_access
So that we block clients without permissions
This commit is contained in:
parent
f2c1ab6069
commit
4d4904187b
1 changed files with 10 additions and 2 deletions
|
|
@ -273,6 +273,13 @@ static const struct pw_context_events context_events = {
|
||||||
.global_removed = context_global_removed,
|
.global_removed = context_global_removed,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static void update_busy(struct pw_impl_client *client)
|
||||||
|
{
|
||||||
|
struct pw_permission *def;
|
||||||
|
def = find_permission(client, PW_ID_CORE);
|
||||||
|
pw_impl_client_set_busy(client, (def->permissions & PW_PERM_R) ? false : true);
|
||||||
|
}
|
||||||
|
|
||||||
/** Make a new client object
|
/** Make a new client object
|
||||||
*
|
*
|
||||||
* \param context a \ref pw_context object to register the client with
|
* \param context a \ref pw_context object to register the client with
|
||||||
|
|
@ -346,6 +353,8 @@ struct pw_impl_client *pw_context_create_client(struct pw_impl_core *core,
|
||||||
|
|
||||||
pw_context_emit_check_access(this->context, this);
|
pw_context_emit_check_access(this->context, this);
|
||||||
|
|
||||||
|
update_busy(this);
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
|
||||||
error_clear_array:
|
error_clear_array:
|
||||||
|
|
@ -633,8 +642,7 @@ int pw_impl_client_update_permissions(struct pw_impl_client *client,
|
||||||
pw_global_update_permissions(global, client, old_perm, new_perm);
|
pw_global_update_permissions(global, client, old_perm, new_perm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
def = find_permission(client, PW_ID_CORE);
|
update_busy(client);
|
||||||
pw_impl_client_set_busy(client, (def->permissions & PW_PERM_R) ? false : true);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue