summaryrefslogtreecommitdiff
path: root/Xext
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2007-08-29 14:40:10 -0400
committerEamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil>2007-08-29 14:40:10 -0400
commit4795df62456b73c6790f271e0a20a83c60496490 (patch)
tree3a6c11da0113787485ea912cc4cb7cb5e43a161a /Xext
parente39694789e31e221fc8dec44ace9c697daf7acad (diff)
xace: add hooks + new access codes: TOG-CUP extension.
Diffstat (limited to 'Xext')
-rw-r--r--Xext/cup.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/Xext/cup.c b/Xext/cup.c
index 6bfa27837..b544a7517 100644
--- a/Xext/cup.c
+++ b/Xext/cup.c
@@ -224,12 +224,13 @@ int ProcStoreColors(
{
REQUEST (xXcupStoreColorsReq);
ColormapPtr pcmp;
+ int rc;
REQUEST_AT_LEAST_SIZE (xXcupStoreColorsReq);
- pcmp = (ColormapPtr) SecurityLookupIDByType (client, stuff->cmap,
- RT_COLORMAP, DixWriteAccess);
+ rc = dixLookupResource((pointer *)&pcmp, stuff->cmap, RT_COLORMAP,
+ client, DixAddAccess);
- if (pcmp) {
+ if (rc == Success) {
int ncolors, n;
xXcupStoreColorsReply rep;
xColorItem* cptr;
@@ -273,7 +274,7 @@ int ProcStoreColors(
return client->noClientException;
} else {
client->errorValue = stuff->cmap;
- return BadColor;
+ return (rc == BadValue) ? BadColor : rc;
}
}