Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
security-context: fix assertion failure
And make this assert trigger even if a security context is not in use so
that I don't keep regressing it.
river/Server.zig | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/river/Server.zig b/river/Server.zig
index 97246e6..cd3a9ea 100644
--- a/river/Server.zig
+++ b/river/Server.zig
@@ -261,10 +261,11 @@ fn globalFilter(client: *const wl.Client, global: *const wl.Global, server: *Ser
}
// User-configurable allow/block lists are TODO
+ const allowed = server.allowlist(global);
+ const blocked = server.blocklist(global);
+ assert(allowed != blocked);
+
if (server.security_context_manager.lookupClient(client) != null) {
- const allowed = server.allowlist(global);
- const blocked = server.blocklist(global);
- assert(allowed != blocked);
return allowed;
} else {
return true;
@@ -319,6 +320,7 @@ fn allowlist(server: *Server, global: *const wl.Global) bool {
fn blocklist(server: *Server, global: *const wl.Global) bool {
return global == server.security_context_manager.global or
global == server.wm.global or
+ global == server.xkb_bindings.global or
global == server.foreign_toplevel_manager.global or
global == server.screencopy_manager.global or
global == server.export_dmabuf_manager.global or