summaryrefslogtreecommitdiff
path: root/dix/dixutils.c
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2007-04-17 16:01:56 -0400
committerEamon Walsh <ewalsh@moss-uranus.epoch.ncsc.mil>2007-04-17 16:01:56 -0400
commit9cee4ec5e6e06d23aafb302494b082c77ade4623 (patch)
treeee073cce5999f79df2c8aa87f4891e83a38afaaa /dix/dixutils.c
parent47bd311e3dcc501cbb202ce79a55ac32e9db50f2 (diff)
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.
Diffstat (limited to 'dix/dixutils.c')
-rw-r--r--dix/dixutils.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/dix/dixutils.c b/dix/dixutils.c
index e97a791a8..4d082cd58 100644
--- a/dix/dixutils.c
+++ b/dix/dixutils.c
@@ -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);