From 4267785e6fcdbf4d7c161eb8cfc3aafcaf433972 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 19 Jun 2025 03:12:11 +0200 Subject: [PATCH] xres: fix XResQueryClientIds always returning 0 clients XaceHookClientAccess added in 098008879b3a9d433072a15818d204a88f232d54 has incorrect condition in ConstructClientIds. This fixes #182 Signed-off-by: dec05eba --- Xext/xres.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Xext/xres.c b/Xext/xres.c index 9c7df9832..1026dffb5 100644 --- a/Xext/xres.c +++ b/Xext/xres.c @@ -516,7 +516,7 @@ ConstructClientIds(ClientPtr client, for (c = 0; c < currentMaxClients; ++c) { if (clients[c] && (XaceHookClientAccess(client, clients[c], DixReadAccess) - != Success)) { + == Success)) { if (!ConstructClientIdValue(client, clients[c], specs[specIdx].mask, ctx)) { return BadAlloc; @@ -527,7 +527,7 @@ ConstructClientIds(ClientPtr client, ClientPtr owner = dixClientForXID(specs[specIdx].client); if (owner && (XaceHookClientAccess(client, owner, DixReadAccess) - != Success)) { + == Success)) { if (!ConstructClientIdValue(client, owner, specs[specIdx].mask, ctx)) { return BadAlloc;