impl-metadata: check PW_PERM_M permission on subject

To set a metadata on a subject, the subject must be visible (R) and we
must have the M permission on the subject.
This commit is contained in:
Wim Taymans 2026-05-13 11:08:37 +02:00
parent a74109eef3
commit b53ec3bceb

View file

@ -416,7 +416,7 @@ static int metadata_set_property(void *object,
struct pw_impl_client *client = pw_resource_get_client(resource);
int res;
if ((res = pw_impl_client_check_permissions(client, subject, PW_PERM_R)) < 0)
if ((res = pw_impl_client_check_permissions(client, subject, PW_PERM_R | PW_PERM_M)) < 0)
goto error;
pw_metadata_set_property(impl->metadata, subject, key, type, value);