mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-30 21:53:25 +00:00
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:
parent
47bd311e3d
commit
9cee4ec5e6
14 changed files with 256 additions and 254 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue