eis: capabilities can only be reduced

If a REIS implementation sends multiple ConfigureCapabilities messages,
the allowed capabilities would be whichever ones were sent last rather
than the intersection of all capablities.

Fallout from 7fc9498f1d.
This commit is contained in:
Peter Hutterer 2022-07-28 11:01:08 +10:00
parent 2ec3ced24c
commit 2142daadc5

View file

@ -473,7 +473,8 @@ client_msg_configure_capabilities(struct eis_client *client, uint32_t allowed_ca
if (client->state != EIS_CLIENT_STATE_NEW)
return 0;
client->restrictions.cap_allow_mask = allowed_caps;
/* restrictions can only be reduced */
client->restrictions.cap_allow_mask &= allowed_caps;
return 0;
}