xace: change the semantics of the return value of XACE hooks to allow

arbitrary X status codes instead of just TRUE/FALSE.

The dix layer in most cases still does not propagate the return value of
XACE hooks back to the client, however.  There is more error propagation
work to do.
This commit is contained in:
Eamon Walsh 2007-04-17 16:01:56 -04:00 • committed by Eamon Walsh
commit 9cee4ec5e6
14 changed files with 256 additions and 254 deletions

View file

@ -209,6 +209,8 @@ dixLookupDrawable(DrawablePtr *pDraw, XID id, ClientPtr client,
{
DrawablePtr pTmp;
RESTYPE rtype;
int rc;
*pDraw = NULL;
client->errorValue = id;
@ -220,8 +222,9 @@ dixLookupDrawable(DrawablePtr *pDraw, XID id, ClientPtr client,
/* an access check is required for cached drawables */
rtype = (type & M_WINDOW) ? RT_WINDOW : RT_PIXMAP;
if (!XaceHook(XACE_RESOURCE_ACCESS, client, id, rtype, access, pTmp))
return BadDrawable;
rc = XaceHook(XACE_RESOURCE_ACCESS, client, id, rtype, access, pTmp);
if (rc != Success)
return rc;
} else
dixLookupResource((void **)&pTmp, id, RC_DRAWABLE, client, access);