Send unique keymap file descriptors

To prevent wl_keyboard keymap being written to by clients, use a unique
file descriptor for each wl_keyboard resource.

Reference: weston, commit 76829fc4eaea329d2a525c3978271e13bd76c078
This commit is contained in:
random human 2018-09-18 03:47:33 +05:30
parent 8b112730ca
commit 40a43003a1
No known key found for this signature in database
GPG key ID: 73E5A60444CC77A3
3 changed files with 33 additions and 34 deletions

View file

@ -50,7 +50,7 @@ struct wlr_keyboard_modifiers {
struct wlr_keyboard {
const struct wlr_keyboard_impl *impl;
int keymap_fd;
char *keymap_string;
size_t keymap_size;
struct xkb_keymap *keymap;
struct xkb_state *xkb_state;