From 963e69b8efc39369915e7f0c6f370ac0d5d2b60f Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 19 Sep 2007 11:11:41 -0400 Subject: [PATCH] xace: add special-case for just setting the event mask on a window, this should only check "receive" permission, not "setattr" permission. --- dix/dispatch.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dix/dispatch.c b/dix/dispatch.c index 507854ee6..8c68e5567 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -570,11 +570,13 @@ ProcChangeWindowAttributes(ClientPtr client) { WindowPtr pWin; REQUEST(xChangeWindowAttributesReq); - int result; - int len, rc; + int result, len, rc; + Mask access_mode = DixSetAttrAccess; REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq); - rc = dixLookupWindow(&pWin, stuff->window, client, DixSetAttrAccess); + if (stuff->valueMask == CWEventMask) + access_mode = DixReceiveAccess; + rc = dixLookupWindow(&pWin, stuff->window, client, access_mode); if (rc != Success) return rc; len = client->req_len - (sizeof(xChangeWindowAttributesReq) >> 2);