damage: fix resource access flag on destroy

When destroying a resource, the lookup needs to be done with
DixDestroyAccess (instead of DixWriteAccess) flag - otherwise
xace hooks can't properly differenciate what's happening.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Fixes: 6c46645cfc
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-03-24 11:30:40 +01:00
committed by Enrico Weigelt, metux IT consult .
parent 37b7ea8f8a
commit a78203e6ca

View File

@@ -317,7 +317,7 @@ ProcDamageDestroy(ClientPtr client)
DamageExtPtr pDamageExt;
REQUEST_SIZE_MATCH(xDamageDestroyReq);
VERIFY_DAMAGEEXT(pDamageExt, stuff->damage, client, DixWriteAccess);
VERIFY_DAMAGEEXT(pDamageExt, stuff->damage, client, DixDestroyAccess);
FreeResource(stuff->damage, X11_RESTYPE_NONE);
return Success;
}