3 Commits (00b211dcb149ea1e5466352657b0db283713b974)

Author SHA1 Message Date
Laurent Montel 86c6238cfa Don't use QtTest => use QTest + missing include 1 year ago
Kai Uwe Broulik 1393f524ff test_utils: Test whether mmap PROT_WRITE fails
Writing is what our guard is supposed to prevent, let's try to mmap it
for writing. It seems FreeBSD still allows PROT_READ for sealed-for-writing
mmaps.
2 years ago
Kai Uwe Broulik 3646620430 utils: Introduce RamFile class for memfd
This class can be used to create an anonymous file, for instance
to pass data between compositor and clients, through means of a
file descriptor, as is done in various Wayland protocols, notably
the keymap exchange.

It also implements sealing the file, so that it can be shared
between multiple clients without them being able to modify it.

If supported, memfd_create is used, otherwise a `QTemporaryFile`
is used.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2 years ago