Xnamespace: whitelist resource access for serverClient

The server itself is allowed to access anything w/o restrictions.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2025-03-24 00:26:20 +01:00
parent eaa08af7d1
commit df56b26ed4

View File

@ -15,6 +15,10 @@ void hookResourceAccess(CallbackListPtr *pcbl, void *unused, void *calldata)
ClientPtr owner = dixLookupXIDOwner(param->id);
struct XnamespaceClientPriv *obj = XnsClientPriv(owner);
// server can do anything
if (param->client == serverClient)
goto pass;
// special filtering for windows: block transparency for untrusted clients
if (param->rtype == X11_RESTYPE_WINDOW) {
WindowPtr pWindow = (WindowPtr) param->res;