Commit 6c46645c authored by Eamon Walsh's avatar Eamon Walsh Committed by Eamon Walsh

Naming change: Security*Access -> Dix*Access

parent b88ad820
......@@ -432,7 +432,7 @@ int ProcXagDestroy(
REQUEST_SIZE_MATCH (xXagDestroyReq);
pAppGrp = (AppGroupPtr)SecurityLookupIDByType (client,
(XID)stuff->app_group, RT_APPGROUP, SecurityReadAccess);
(XID)stuff->app_group, RT_APPGROUP, DixReadAccess);
if (!pAppGrp) return XagBadAppGroup;
FreeResource ((XID)stuff->app_group, RT_NONE);
if (--XagCallbackRefCount == 0)
......@@ -451,7 +451,7 @@ int ProcXagGetAttr(
REQUEST_SIZE_MATCH (xXagGetAttrReq);
pAppGrp = (AppGroupPtr)SecurityLookupIDByType (client,
(XID)stuff->app_group, RT_APPGROUP, SecurityReadAccess);
(XID)stuff->app_group, RT_APPGROUP, DixReadAccess);
if (!pAppGrp) return XagBadAppGroup;
rep.type = X_Reply;
rep.length = 0;
......
......@@ -227,7 +227,7 @@ int ProcStoreColors(
REQUEST_AT_LEAST_SIZE (xXcupStoreColorsReq);
pcmp = (ColormapPtr) SecurityLookupIDByType (client, stuff->cmap,
RT_COLORMAP, SecurityWriteAccess);
RT_COLORMAP, DixWriteAccess);
if (pcmp) {
int ncolors, n;
......
This diff is collapsed.
......@@ -1279,7 +1279,7 @@ ProcScreenSaverSetAttributes (ClientPtr client)
REQUEST_AT_LEAST_SIZE (xScreenSaverSetAttributesReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable;
len = stuff->length - (sizeof(xScreenSaverSetAttributesReq) >> 2);
......@@ -1291,7 +1291,7 @@ ProcScreenSaverSetAttributes (ClientPtr client)
tmp = *((CARD32 *) &stuff[1] + pback_offset);
if ((tmp != None) && (tmp != ParentRelative)) {
if(!(backPix = (PanoramiXRes*) SecurityLookupIDByType(
client, tmp, XRT_PIXMAP, SecurityReadAccess)))
client, tmp, XRT_PIXMAP, DixReadAccess)))
return BadPixmap;
}
}
......@@ -1301,7 +1301,7 @@ ProcScreenSaverSetAttributes (ClientPtr client)
tmp = *((CARD32 *) &stuff[1] + pbord_offset);
if (tmp != CopyFromParent) {
if(!(bordPix = (PanoramiXRes*) SecurityLookupIDByType(
client, tmp, XRT_PIXMAP, SecurityReadAccess)))
client, tmp, XRT_PIXMAP, DixReadAccess)))
return BadPixmap;
}
}
......@@ -1311,7 +1311,7 @@ ProcScreenSaverSetAttributes (ClientPtr client)
tmp = *((CARD32 *) &stuff[1] + cmap_offset);
if ((tmp != CopyFromParent) && (tmp != None)) {
if(!(cmap = (PanoramiXRes*) SecurityLookupIDByType(
client, tmp, XRT_COLORMAP, SecurityReadAccess)))
client, tmp, XRT_COLORMAP, DixReadAccess)))
return BadColor;
}
}
......@@ -1351,7 +1351,7 @@ ProcScreenSaverUnsetAttributes (ClientPtr client)
int i;
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable;
for(i = PanoramiXNumScreens - 1; i > 0; i--) {
......
......@@ -600,7 +600,7 @@ ProcSecurityRevokeAuthorization(
REQUEST_SIZE_MATCH(xSecurityRevokeAuthorizationReq);
pAuth = (SecurityAuthorizationPtr)SecurityLookupIDByType(client,
stuff->authId, SecurityAuthorizationResType, SecurityDestroyAccess);
stuff->authId, SecurityAuthorizationResType, DixDestroyAccess);
if (!pAuth)
return SecurityErrorBase + XSecurityBadAuthorization;
......@@ -966,7 +966,7 @@ CALLBACK(SecurityCheckResourceIDAccess)
int cid, reqtype;
if (TRUSTLEVEL(client) == XSecurityClientTrusted ||
SecurityUnknownAccess == access_mode)
DixUnknownAccess == access_mode)
return; /* for compatibility, we have to allow access */
cid = CLIENT_ID(id);
......@@ -1217,7 +1217,7 @@ CALLBACK(SecurityCheckHostlistAccess)
if (TRUSTLEVEL(rec->client) != XSecurityClientTrusted)
{
rec->rval = FALSE;
if (rec->access_mode == SecurityWriteAccess)
if (rec->access_mode == DixWriteAccess)
SecurityAudit("client %d attempted to change host access\n",
rec->client->index);
else
......@@ -1798,11 +1798,11 @@ CALLBACK(SecurityCheckPropertyAccess)
* executed a continue, which will skip the follwing code.
*/
action = XaceAllowOperation;
if (access_mode & SecurityReadAccess)
if (access_mode & DixReadAccess)
action = max(action, pacl->readAction);
if (access_mode & SecurityWriteAccess)
if (access_mode & DixWriteAccess)
action = max(action, pacl->writeAction);
if (access_mode & SecurityDestroyAccess)
if (access_mode & DixDestroyAccess)
action = max(action, pacl->destroyAction);
break;
} /* end for each pacl */
......
......@@ -390,7 +390,7 @@ ProcPanoramiXShapeRectangles(
REQUEST_AT_LEAST_SIZE (xShapeRectanglesReq);
if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->dest, XRT_WINDOW, SecurityWriteAccess)))
client, stuff->dest, XRT_WINDOW, DixWriteAccess)))
return BadWindow;
FOR_NSCREENS(j) {
......@@ -422,7 +422,7 @@ ProcShapeMask (client)
REQUEST_SIZE_MATCH (xShapeMaskReq);
UpdateCurrentTime();
pWin = SecurityLookupWindow (stuff->dest, client, SecurityWriteAccess);
pWin = SecurityLookupWindow (stuff->dest, client, DixWriteAccess);
if (!pWin)
return BadWindow;
switch (stuff->destKind) {
......@@ -444,7 +444,7 @@ ProcShapeMask (client)
srcRgn = 0;
else {
pPixmap = (PixmapPtr) SecurityLookupIDByType(client, stuff->src,
RT_PIXMAP, SecurityReadAccess);
RT_PIXMAP, DixReadAccess);
if (!pPixmap)
return BadPixmap;
if (pPixmap->drawable.pScreen != pScreen ||
......@@ -488,12 +488,12 @@ ProcPanoramiXShapeMask(
REQUEST_SIZE_MATCH (xShapeMaskReq);
if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->dest, XRT_WINDOW, SecurityWriteAccess)))
client, stuff->dest, XRT_WINDOW, DixWriteAccess)))
return BadWindow;
if(stuff->src != None) {
if(!(pmap = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->src, XRT_PIXMAP, SecurityReadAccess)))
client, stuff->src, XRT_PIXMAP, DixReadAccess)))
return BadPixmap;
} else
pmap = NULL;
......@@ -616,11 +616,11 @@ ProcPanoramiXShapeCombine(
REQUEST_AT_LEAST_SIZE (xShapeCombineReq);
if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->dest, XRT_WINDOW, SecurityWriteAccess)))
client, stuff->dest, XRT_WINDOW, DixWriteAccess)))
return BadWindow;
if(!(win2 = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->src, XRT_WINDOW, SecurityReadAccess)))
client, stuff->src, XRT_WINDOW, DixReadAccess)))
return BadWindow;
FOR_NSCREENS(j) {
......@@ -688,7 +688,7 @@ ProcPanoramiXShapeOffset(
REQUEST_AT_LEAST_SIZE (xShapeOffsetReq);
if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->dest, XRT_WINDOW, SecurityWriteAccess)))
client, stuff->dest, XRT_WINDOW, DixWriteAccess)))
return BadWindow;
FOR_NSCREENS(j) {
......@@ -822,11 +822,11 @@ ProcShapeSelectInput (client)
XID clientResource;
REQUEST_SIZE_MATCH (xShapeSelectInputReq);
pWin = SecurityLookupWindow (stuff->window, client, SecurityWriteAccess);
pWin = SecurityLookupWindow (stuff->window, client, DixWriteAccess);
if (!pWin)
return BadWindow;
pHead = (ShapeEventPtr *)SecurityLookupIDByType(client,
pWin->drawable.id, EventType, SecurityWriteAccess);
pWin->drawable.id, EventType, DixWriteAccess);
switch (stuff->enable) {
case xTrue:
if (pHead) {
......@@ -999,7 +999,7 @@ ProcShapeInputSelected (client)
if (!pWin)
return BadWindow;
pHead = (ShapeEventPtr *) SecurityLookupIDByType(client,
pWin->drawable.id, EventType, SecurityReadAccess);
pWin->drawable.id, EventType, DixReadAccess);
enabled = xFalse;
if (pHead) {
for (pShapeEvent = *pHead;
......
......@@ -571,11 +571,11 @@ ProcPanoramiXShmPutImage(register ClientPtr client)
REQUEST_SIZE_MATCH(xShmPutImageReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable;
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess)))
client, stuff->gc, XRT_GC, DixReadAccess)))
return BadGC;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
......@@ -621,7 +621,7 @@ ProcPanoramiXShmGetImage(ClientPtr client)
}
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable;
if (draw->type == XRT_PIXMAP)
......
......@@ -436,7 +436,7 @@ SyncInitTrigger(client, pTrigger, counter, changes)
if (counter == None)
pCounter = NULL;
else if (!(pCounter = (SyncCounter *)SecurityLookupIDByType(
client, counter, RTCounter, SecurityReadAccess)))
client, counter, RTCounter, DixReadAccess)))
{
client->errorValue = counter;
return SyncErrorBase + XSyncBadCounter;
......@@ -1550,7 +1550,7 @@ ProcSyncSetCounter(client)
REQUEST_SIZE_MATCH(xSyncSetCounterReq);
pCounter = (SyncCounter *)SecurityLookupIDByType(client, stuff->cid,
RTCounter, SecurityWriteAccess);
RTCounter, DixWriteAccess);
if (pCounter == NULL)
{
client->errorValue = stuff->cid;
......@@ -1583,7 +1583,7 @@ ProcSyncChangeCounter(client)
REQUEST_SIZE_MATCH(xSyncChangeCounterReq);
pCounter = (SyncCounter *) SecurityLookupIDByType(client, stuff->cid,
RTCounter, SecurityWriteAccess);
RTCounter, DixWriteAccess);
if (pCounter == NULL)
{
client->errorValue = stuff->cid;
......@@ -1621,7 +1621,7 @@ ProcSyncDestroyCounter(client)
REQUEST_SIZE_MATCH(xSyncDestroyCounterReq);
pCounter = (SyncCounter *)SecurityLookupIDByType(client, stuff->counter,
RTCounter, SecurityDestroyAccess);
RTCounter, DixDestroyAccess);
if (pCounter == NULL)
{
client->errorValue = stuff->counter;
......@@ -1767,7 +1767,7 @@ ProcSyncQueryCounter(client)
REQUEST_SIZE_MATCH(xSyncQueryCounterReq);
pCounter = (SyncCounter *)SecurityLookupIDByType(client, stuff->counter,
RTCounter, SecurityReadAccess);
RTCounter, DixReadAccess);
if (pCounter == NULL)
{
client->errorValue = stuff->counter;
......@@ -1896,7 +1896,7 @@ ProcSyncChangeAlarm(client)
REQUEST_AT_LEAST_SIZE(xSyncChangeAlarmReq);
if (!(pAlarm = (SyncAlarm *)SecurityLookupIDByType(client, stuff->alarm,
RTAlarm, SecurityWriteAccess)))
RTAlarm, DixWriteAccess)))
{
client->errorValue = stuff->alarm;
return SyncErrorBase + XSyncBadAlarm;
......@@ -1937,7 +1937,7 @@ ProcSyncQueryAlarm(client)
REQUEST_SIZE_MATCH(xSyncQueryAlarmReq);
pAlarm = (SyncAlarm *)SecurityLookupIDByType(client, stuff->alarm,
RTAlarm, SecurityReadAccess);
RTAlarm, DixReadAccess);
if (!pAlarm)
{
client->errorValue = stuff->alarm;
......@@ -1997,7 +1997,7 @@ ProcSyncDestroyAlarm(client)
REQUEST_SIZE_MATCH(xSyncDestroyAlarmReq);
if (!((SyncAlarm *)SecurityLookupIDByType(client, stuff->alarm,
RTAlarm, SecurityDestroyAccess)))
RTAlarm, DixDestroyAccess)))
{
client->errorValue = stuff->alarm;
return SyncErrorBase + XSyncBadAlarm;
......
......@@ -445,11 +445,11 @@ ProcXF86BigfontQueryFont(
#endif
client->errorValue = stuff->id; /* EITHER font or gc */
pFont = (FontPtr)SecurityLookupIDByType(client, stuff->id, RT_FONT,
SecurityReadAccess);
DixReadAccess);
if (!pFont) {
/* can't use VERIFY_GC because it might return BadGC */
GC *pGC = (GC *) SecurityLookupIDByType(client, stuff->id, RT_GC,
SecurityReadAccess);
DixReadAccess);
if (!pGC) {
client->errorValue = stuff->id;
return BadFont; /* procotol spec says only error is BadFont */
......
......@@ -749,7 +749,7 @@ ProcXpGetPageDimensions(ClientPtr client)
if((pContext =(XpContextPtr)SecurityLookupIDByType(client,
stuff->printContext,
RTcontext,
SecurityReadAccess))
DixReadAccess))
== (XpContextPtr)NULL)
{
client->errorValue = stuff->printContext;
......@@ -811,7 +811,7 @@ ProcXpSetImageResolution(ClientPtr client)
if((pContext =(XpContextPtr)SecurityLookupIDByType(client,
stuff->printContext,
RTcontext,
SecurityWriteAccess))
DixWriteAccess))
== (XpContextPtr)NULL)
{
client->errorValue = stuff->printContext;
......@@ -859,7 +859,7 @@ ProcXpGetImageResolution(ClientPtr client)
if((pContext =(XpContextPtr)SecurityLookupIDByType(client,
stuff->printContext,
RTcontext,
SecurityReadAccess))
DixReadAccess))
== (XpContextPtr)NULL)
{
client->errorValue = stuff->printContext;
......@@ -1068,7 +1068,7 @@ ProcXpSetContext(ClientPtr client)
if((pContext =(XpContextPtr)SecurityLookupIDByType(client,
stuff->printContext,
RTcontext,
SecurityWriteAccess))
DixWriteAccess))
== (XpContextPtr)NULL)
{
client->errorValue = stuff->printContext;
......@@ -1141,7 +1141,7 @@ ProcXpDestroyContext(ClientPtr client)
if((pContext =(XpContextPtr)SecurityLookupIDByType(client,
stuff->printContext,
RTcontext,
SecurityDestroyAccess))
DixDestroyAccess))
== (XpContextPtr)NULL)
{
client->errorValue = stuff->printContext;
......@@ -1167,7 +1167,7 @@ ProcXpGetContextScreen(ClientPtr client)
if((pContext =(XpContextPtr)SecurityLookupIDByType(client,
stuff->printContext,
RTcontext,
SecurityReadAccess))
DixReadAccess))
== (XpContextPtr)NULL)
return XpErrorBase+XPBadContext;
......@@ -1853,7 +1853,7 @@ ProcXpStartPage(ClientPtr client)
return XpErrorBase+XPBadSequence;
pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
SecurityWriteAccess);
DixWriteAccess);
if (!pWin || pWin->drawable.pScreen->myNum != pContext->screenNum)
return BadWindow;
......@@ -1994,7 +1994,7 @@ ProcXpGetDocumentData(ClientPtr client)
if((pContext = (XpContextPtr)SecurityLookupIDByType(client,
stuff->printContext,
RTcontext,
SecurityWriteAccess))
DixWriteAccess))
== (XpContextPtr)NULL)
{
client->errorValue = stuff->printContext;
......@@ -2077,7 +2077,7 @@ ProcXpGetAttributes(ClientPtr client)
client,
stuff->printContext,
RTcontext,
SecurityReadAccess))
DixReadAccess))
== (XpContextPtr)NULL)
{
client->errorValue = stuff->printContext;
......@@ -2149,7 +2149,7 @@ ProcXpSetAttributes(ClientPtr client)
client,
stuff->printContext,
RTcontext,
SecurityWriteAccess))
DixWriteAccess))
== (XpContextPtr)NULL)
{
client->errorValue = stuff->printContext;
......@@ -2229,7 +2229,7 @@ ProcXpGetOneAttribute(ClientPtr client)
client,
stuff->printContext,
RTcontext,
SecurityReadAccess))
DixReadAccess))
== (XpContextPtr)NULL)
{
client->errorValue = stuff->printContext;
......@@ -2300,7 +2300,7 @@ ProcXpSelectInput(ClientPtr client)
if((pContext=(XpContextPtr)SecurityLookupIDByType(client,
stuff->printContext,
RTcontext,
SecurityWriteAccess))
DixWriteAccess))
== (XpContextPtr)NULL)
{
client->errorValue = stuff->printContext;
......@@ -2336,7 +2336,7 @@ ProcXpInputSelected(ClientPtr client)
if((pContext=(XpContextPtr)SecurityLookupIDByType(client,
stuff->printContext,
RTcontext,
SecurityReadAccess))
DixReadAccess))
== (XpContextPtr)NULL)
{
client->errorValue = stuff->printContext;
......
......@@ -1877,11 +1877,11 @@ XineramaXvStopVideo(ClientPtr client)
REQUEST_SIZE_MATCH(xvStopVideoReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable;
if(!(port = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->port, XvXRTPort, SecurityReadAccess)))
client, stuff->port, XvXRTPort, DixReadAccess)))
return _XvBadPort;
FOR_NSCREENS_BACKWARD(i) {
......@@ -1905,7 +1905,7 @@ XineramaXvSetPortAttribute(ClientPtr client)
REQUEST_SIZE_MATCH(xvSetPortAttributeReq);
if(!(port = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->port, XvXRTPort, SecurityReadAccess)))
client, stuff->port, XvXRTPort, DixReadAccess)))
return _XvBadPort;
FOR_NSCREENS_BACKWARD(i) {
......@@ -1931,15 +1931,15 @@ XineramaXvShmPutImage(ClientPtr client)
REQUEST_SIZE_MATCH(xvShmPutImageReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable;
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess)))
client, stuff->gc, XRT_GC, DixReadAccess)))
return BadGC;
if(!(port = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->port, XvXRTPort, SecurityReadAccess)))
client, stuff->port, XvXRTPort, DixReadAccess)))
return _XvBadPort;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
......@@ -1978,15 +1978,15 @@ XineramaXvPutImage(ClientPtr client)
REQUEST_AT_LEAST_SIZE(xvPutImageReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable;
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess)))
client, stuff->gc, XRT_GC, DixReadAccess)))
return BadGC;
if(!(port = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->port, XvXRTPort, SecurityReadAccess)))
client, stuff->port, XvXRTPort, DixReadAccess)))
return _XvBadPort;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
......@@ -2023,15 +2023,15 @@ XineramaXvPutVideo(ClientPtr client)
REQUEST_AT_LEAST_SIZE(xvPutVideoReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable;
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess)))
client, stuff->gc, XRT_GC, DixReadAccess)))
return BadGC;
if(!(port = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->port, XvXRTPort, SecurityReadAccess)))
client, stuff->port, XvXRTPort, DixReadAccess)))
return _XvBadPort;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
......@@ -2068,15 +2068,15 @@ XineramaXvPutStill(ClientPtr client)
REQUEST_AT_LEAST_SIZE(xvPutImageReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable;
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess)))
client, stuff->gc, XRT_GC, DixReadAccess)))
return BadGC;
if(!(port = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->port, XvXRTPort, SecurityReadAccess)))
client, stuff->port, XvXRTPort, DixReadAccess)))
return _XvBadPort;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
......
......@@ -179,7 +179,7 @@ ProcDamageCreate (ClientPtr client)
REQUEST_SIZE_MATCH(xDamageCreateReq);
LEGAL_NEW_RESOURCE(stuff->damage, client);
SECURITY_VERIFY_DRAWABLE (pDrawable, stuff->drawable, client,
SecurityReadAccess);
DixReadAccess);
switch (stuff->level) {
case XDamageReportRawRectangles:
level = DamageReportRawRegion;
......@@ -237,7 +237,7 @@ ProcDamageDestroy (ClientPtr client)
DamageExtPtr pDamageExt;
REQUEST_SIZE_MATCH(xDamageDestroyReq);
VERIFY_DAMAGEEXT(pDamageExt, stuff->damage, client, SecurityWriteAccess);
VERIFY_DAMAGEEXT(pDamageExt, stuff->damage, client, DixWriteAccess);
FreeResource (stuff->damage, RT_NONE);
return (client->noClientException);
}
......@@ -251,9 +251,9 @@ ProcDamageSubtract (ClientPtr client)
RegionPtr pParts;
REQUEST_SIZE_MATCH(xDamageSubtractReq);
VERIFY_DAMAGEEXT(pDamageExt, stuff->damage, client, SecurityWriteAccess);
VERIFY_REGION_OR_NONE(pRepair, stuff->repair, client, SecurityWriteAccess);
VERIFY_REGION_OR_NONE(pParts, stuff->parts, client, SecurityWriteAccess);
VERIFY_DAMAGEEXT(pDamageExt, stuff->damage, client, DixWriteAccess);
VERIFY_REGION_OR_NONE(pRepair, stuff->repair, client, DixWriteAccess);
VERIFY_REGION_OR_NONE(pParts, stuff->parts, client, DixWriteAccess);
if (pDamageExt->level != DamageReportRawRegion)
{
......
......@@ -406,7 +406,7 @@ ProcDbeAllocateBackBufferName(ClientPtr client)
/* The window must be valid. */
if (!(pWin = SecurityLookupWindow(stuff->window, client,
SecurityWriteAccess)))
DixWriteAccess)))
{
return(BadWindow);
}
......@@ -633,9 +633,9 @@ ProcDbeDeallocateBackBufferName(ClientPtr client)
/* Buffer name must be valid */
if (!(pDbeWindowPriv = (DbeWindowPrivPtr)SecurityLookupIDByType(client,
stuff->buffer, dbeWindowPrivResType, SecurityDestroyAccess)) ||
stuff->buffer, dbeWindowPrivResType, DixDestroyAccess)) ||
!(SecurityLookupIDByType(client, stuff->buffer, dbeDrawableResType,
SecurityDestroyAccess)))
DixDestroyAccess)))
{
client->errorValue = stuff->buffer;
return(dbeErrorBase + DbeBadBuffer);
......@@ -730,7 +730,7 @@ ProcDbeSwapBuffers(ClientPtr client)
/* Each window must be a valid window - BadWindow. */
if (!(pWin = SecurityLookupWindow(dbeSwapInfo[i].window, client,
SecurityWriteAccess)))
DixWriteAccess)))
{
DEALLOCATE_LOCAL(swapInfo);
return(BadWindow);
......@@ -890,7 +890,7 @@ ProcDbeGetVisualInfo(ClientPtr client)
for (i = 0; i < stuff->n; i++)
{
if (!(pDrawables[i] = (DrawablePtr)SecurityLookupDrawable(
drawables[i], client, SecurityReadAccess)))
drawables[i], client, DixReadAccess)))
{
DEALLOCATE_LOCAL(pDrawables);
return(BadDrawable);
......@@ -1047,7 +1047,7 @@ ProcDbeGetBackBufferAttributes(ClientPtr client)
REQUEST_SIZE_MATCH(xDbeGetBackBufferAttributesReq);
if (!(pDbeWindowPriv = (DbeWindowPrivPtr)SecurityLookupIDByType(client,
stuff->buffer, dbeWindowPrivResType, SecurityReadAccess)))
stuff->buffer, dbeWindowPrivResType, DixReadAccess)))
{
rep.attributes = None;
}
......
......@@ -903,7 +903,7 @@ AllocColor (ColormapPtr pmap,
{
ColormapPtr prootmap = (ColormapPtr)
SecurityLookupIDByType (clients[client], pmap->pScreen->defColormap,
RT_COLORMAP, SecurityReadAccess);
RT_COLORMAP, DixReadAccess);
if (pmap->class == prootmap->class)
FindColorInRootCmap (prootmap, prootmap->red, entries, &rgb,
......@@ -920,7 +920,7 @@ AllocColor (ColormapPtr pmap,
{
ColormapPtr prootmap = (ColormapPtr)
SecurityLookupIDByType (clients[client], pmap->pScreen->defColormap,
RT_COLORMAP, SecurityReadAccess);
RT_COLORMAP, DixReadAccess);
if (pmap->class == prootmap->class)
{
......
......@@ -262,9 +262,9 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar,
GlyphSharePtr pShare;
sourcefont = (FontPtr) SecurityLookupIDByType(client, source, RT_FONT,
SecurityReadAccess);
DixReadAccess);
maskfont = (FontPtr) SecurityLookupIDByType(client, mask, RT_FONT,
SecurityReadAccess);
DixReadAccess);
if (!sourcefont)
{
......
This diff is collapsed.
......@@ -1178,7 +1178,7 @@ doPolyText(ClientPtr client, register PTclosurePtr c)
if (c->slept &&
c->pDraw &&
c->pDraw != (DrawablePtr)SecurityLookupIDByClass(client, c->did,
RC_DRAWABLE, SecurityWriteAccess))
RC_DRAWABLE, DixWriteAccess))
{
/* Our drawable has disappeared. Treat like client died... ask
the FPE code to clean up after client and avoid further
......@@ -1208,7 +1208,7 @@ doPolyText(ClientPtr client, register PTclosurePtr c)
| ((Font)*(c->pElt+2)) << 16
| ((Font)*(c->pElt+1)) << 24;
pFont = (FontPtr)SecurityLookupIDByType(client, fid, RT_FONT,
SecurityReadAccess);