Unverified Commit 3c322ffb authored by Mihai Moldovan's avatar Mihai Moldovan

Merge branch 'sunweaver-pr/security-acl-naming-change' into 3.6.x

parents c79f2d28 104a3e9e
...@@ -1199,7 +1199,7 @@ ProcScreenSaverSetAttributes (ClientPtr client) ...@@ -1199,7 +1199,7 @@ ProcScreenSaverSetAttributes (ClientPtr client)
REQUEST_AT_LEAST_SIZE (xScreenSaverSetAttributesReq); REQUEST_AT_LEAST_SIZE (xScreenSaverSetAttributesReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess))) client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable; return BadDrawable;
len = stuff->length - (sizeof(xScreenSaverSetAttributesReq) >> 2); len = stuff->length - (sizeof(xScreenSaverSetAttributesReq) >> 2);
...@@ -1211,7 +1211,7 @@ ProcScreenSaverSetAttributes (ClientPtr client) ...@@ -1211,7 +1211,7 @@ ProcScreenSaverSetAttributes (ClientPtr client)
tmp = *((CARD32 *) &stuff[1] + pback_offset); tmp = *((CARD32 *) &stuff[1] + pback_offset);
if ((tmp != None) && (tmp != ParentRelative)) { if ((tmp != None) && (tmp != ParentRelative)) {
if(!(backPix = (PanoramiXRes*) SecurityLookupIDByType( if(!(backPix = (PanoramiXRes*) SecurityLookupIDByType(
client, tmp, XRT_PIXMAP, SecurityReadAccess))) client, tmp, XRT_PIXMAP, DixReadAccess)))
return BadPixmap; return BadPixmap;
} }
} }
...@@ -1221,7 +1221,7 @@ ProcScreenSaverSetAttributes (ClientPtr client) ...@@ -1221,7 +1221,7 @@ ProcScreenSaverSetAttributes (ClientPtr client)
tmp = *((CARD32 *) &stuff[1] + pbord_offset); tmp = *((CARD32 *) &stuff[1] + pbord_offset);
if (tmp != CopyFromParent) { if (tmp != CopyFromParent) {
if(!(bordPix = (PanoramiXRes*) SecurityLookupIDByType( if(!(bordPix = (PanoramiXRes*) SecurityLookupIDByType(
client, tmp, XRT_PIXMAP, SecurityReadAccess))) client, tmp, XRT_PIXMAP, DixReadAccess)))
return BadPixmap; return BadPixmap;
} }
} }
...@@ -1231,7 +1231,7 @@ ProcScreenSaverSetAttributes (ClientPtr client) ...@@ -1231,7 +1231,7 @@ ProcScreenSaverSetAttributes (ClientPtr client)
tmp = *((CARD32 *) &stuff[1] + cmap_offset); tmp = *((CARD32 *) &stuff[1] + cmap_offset);
if ((tmp != CopyFromParent) && (tmp != None)) { if ((tmp != CopyFromParent) && (tmp != None)) {
if(!(cmap = (PanoramiXRes*) SecurityLookupIDByType( if(!(cmap = (PanoramiXRes*) SecurityLookupIDByType(
client, tmp, XRT_COLORMAP, SecurityReadAccess))) client, tmp, XRT_COLORMAP, DixReadAccess)))
return BadColor; return BadColor;
} }
} }
...@@ -1271,7 +1271,7 @@ ProcScreenSaverUnsetAttributes (ClientPtr client) ...@@ -1271,7 +1271,7 @@ ProcScreenSaverUnsetAttributes (ClientPtr client)
int i; int i;
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess))) client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable; return BadDrawable;
for(i = PanoramiXNumScreens - 1; i > 0; i--) { for(i = PanoramiXNumScreens - 1; i > 0; i--) {
......
...@@ -750,7 +750,7 @@ ProcSecurityRevokeAuthorization( ...@@ -750,7 +750,7 @@ ProcSecurityRevokeAuthorization(
REQUEST_SIZE_MATCH(xSecurityRevokeAuthorizationReq); REQUEST_SIZE_MATCH(xSecurityRevokeAuthorizationReq);
pAuth = (SecurityAuthorizationPtr)SecurityLookupIDByType(client, pAuth = (SecurityAuthorizationPtr)SecurityLookupIDByType(client,
stuff->authId, SecurityAuthorizationResType, SecurityDestroyAccess); stuff->authId, SecurityAuthorizationResType, DixDestroyAccess);
if (!pAuth) if (!pAuth)
return SecurityErrorBase + XSecurityBadAuthorization; return SecurityErrorBase + XSecurityBadAuthorization;
...@@ -1115,7 +1115,7 @@ SecurityCheckResourceIDAccess( ...@@ -1115,7 +1115,7 @@ SecurityCheckResourceIDAccess(
int cid = CLIENT_ID(id); int cid = CLIENT_ID(id);
int reqtype = ((xReq *)client->requestBuffer)->reqType; int reqtype = ((xReq *)client->requestBuffer)->reqType;
if (SecurityUnknownAccess == access_mode) if (DixUnknownAccess == access_mode)
return rval; /* for compatibility, we have to allow access */ return rval; /* for compatibility, we have to allow access */
switch (reqtype) switch (reqtype)
...@@ -2051,11 +2051,11 @@ SecurityCheckPropertyAccess(client, pWin, propertyName, access_mode) ...@@ -2051,11 +2051,11 @@ SecurityCheckPropertyAccess(client, pWin, propertyName, access_mode)
* executed a continue, which will skip the follwing code. * executed a continue, which will skip the follwing code.
*/ */
action = SecurityAllowOperation; action = SecurityAllowOperation;
if (access_mode & SecurityReadAccess) if (access_mode & DixReadAccess)
action = max(action, pacl->readAction); action = max(action, pacl->readAction);
if (access_mode & SecurityWriteAccess) if (access_mode & DixWriteAccess)
action = max(action, pacl->writeAction); action = max(action, pacl->writeAction);
if (access_mode & SecurityDestroyAccess) if (access_mode & DixDestroyAccess)
action = max(action, pacl->destroyAction); action = max(action, pacl->destroyAction);
break; break;
} /* end for each pacl */ } /* end for each pacl */
......
...@@ -385,7 +385,7 @@ ProcPanoramiXShapeRectangles( ...@@ -385,7 +385,7 @@ ProcPanoramiXShapeRectangles(
REQUEST_AT_LEAST_SIZE (xShapeRectanglesReq); REQUEST_AT_LEAST_SIZE (xShapeRectanglesReq);
if(!(win = (PanoramiXRes *)SecurityLookupIDByType( if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->dest, XRT_WINDOW, SecurityWriteAccess))) client, stuff->dest, XRT_WINDOW, DixWriteAccess)))
return BadWindow; return BadWindow;
FOR_NSCREENS(j) { FOR_NSCREENS(j) {
...@@ -417,7 +417,7 @@ ProcShapeMask (client) ...@@ -417,7 +417,7 @@ ProcShapeMask (client)
REQUEST_SIZE_MATCH (xShapeMaskReq); REQUEST_SIZE_MATCH (xShapeMaskReq);
UpdateCurrentTime(); UpdateCurrentTime();
pWin = SecurityLookupWindow (stuff->dest, client, SecurityWriteAccess); pWin = SecurityLookupWindow (stuff->dest, client, DixWriteAccess);
if (!pWin) if (!pWin)
return BadWindow; return BadWindow;
switch (stuff->destKind) { switch (stuff->destKind) {
...@@ -439,7 +439,7 @@ ProcShapeMask (client) ...@@ -439,7 +439,7 @@ ProcShapeMask (client)
srcRgn = 0; srcRgn = 0;
else { else {
pPixmap = (PixmapPtr) SecurityLookupIDByType(client, stuff->src, pPixmap = (PixmapPtr) SecurityLookupIDByType(client, stuff->src,
RT_PIXMAP, SecurityReadAccess); RT_PIXMAP, DixReadAccess);
if (!pPixmap) if (!pPixmap)
return BadPixmap; return BadPixmap;
if (pPixmap->drawable.pScreen != pScreen || if (pPixmap->drawable.pScreen != pScreen ||
...@@ -483,12 +483,12 @@ ProcPanoramiXShapeMask( ...@@ -483,12 +483,12 @@ ProcPanoramiXShapeMask(
REQUEST_SIZE_MATCH (xShapeMaskReq); REQUEST_SIZE_MATCH (xShapeMaskReq);
if(!(win = (PanoramiXRes *)SecurityLookupIDByType( if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->dest, XRT_WINDOW, SecurityWriteAccess))) client, stuff->dest, XRT_WINDOW, DixWriteAccess)))
return BadWindow; return BadWindow;
if(stuff->src != None) { if(stuff->src != None) {
if(!(pmap = (PanoramiXRes *)SecurityLookupIDByType( if(!(pmap = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->src, XRT_PIXMAP, SecurityReadAccess))) client, stuff->src, XRT_PIXMAP, DixReadAccess)))
return BadPixmap; return BadPixmap;
} else } else
pmap = NULL; pmap = NULL;
...@@ -611,11 +611,11 @@ ProcPanoramiXShapeCombine( ...@@ -611,11 +611,11 @@ ProcPanoramiXShapeCombine(
REQUEST_AT_LEAST_SIZE (xShapeCombineReq); REQUEST_AT_LEAST_SIZE (xShapeCombineReq);
if(!(win = (PanoramiXRes *)SecurityLookupIDByType( if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->dest, XRT_WINDOW, SecurityWriteAccess))) client, stuff->dest, XRT_WINDOW, DixWriteAccess)))
return BadWindow; return BadWindow;
if(!(win2 = (PanoramiXRes *)SecurityLookupIDByType( if(!(win2 = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->src, XRT_WINDOW, SecurityReadAccess))) client, stuff->src, XRT_WINDOW, DixReadAccess)))
return BadWindow; return BadWindow;
FOR_NSCREENS(j) { FOR_NSCREENS(j) {
...@@ -683,7 +683,7 @@ ProcPanoramiXShapeOffset( ...@@ -683,7 +683,7 @@ ProcPanoramiXShapeOffset(
REQUEST_AT_LEAST_SIZE (xShapeOffsetReq); REQUEST_AT_LEAST_SIZE (xShapeOffsetReq);
if(!(win = (PanoramiXRes *)SecurityLookupIDByType( if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->dest, XRT_WINDOW, SecurityWriteAccess))) client, stuff->dest, XRT_WINDOW, DixWriteAccess)))
return BadWindow; return BadWindow;
FOR_NSCREENS(j) { FOR_NSCREENS(j) {
...@@ -817,11 +817,11 @@ ProcShapeSelectInput (client) ...@@ -817,11 +817,11 @@ ProcShapeSelectInput (client)
XID clientResource; XID clientResource;
REQUEST_SIZE_MATCH (xShapeSelectInputReq); REQUEST_SIZE_MATCH (xShapeSelectInputReq);
pWin = SecurityLookupWindow (stuff->window, client, SecurityWriteAccess); pWin = SecurityLookupWindow (stuff->window, client, DixWriteAccess);
if (!pWin) if (!pWin)
return BadWindow; return BadWindow;
pHead = (ShapeEventPtr *)SecurityLookupIDByType(client, pHead = (ShapeEventPtr *)SecurityLookupIDByType(client,
pWin->drawable.id, EventType, SecurityWriteAccess); pWin->drawable.id, EventType, DixWriteAccess);
switch (stuff->enable) { switch (stuff->enable) {
case xTrue: case xTrue:
if (pHead) { if (pHead) {
...@@ -988,7 +988,7 @@ ProcShapeInputSelected (client) ...@@ -988,7 +988,7 @@ ProcShapeInputSelected (client)
if (!pWin) if (!pWin)
return BadWindow; return BadWindow;
pHead = (ShapeEventPtr *) SecurityLookupIDByType(client, pHead = (ShapeEventPtr *) SecurityLookupIDByType(client,
pWin->drawable.id, EventType, SecurityReadAccess); pWin->drawable.id, EventType, DixReadAccess);
enabled = xFalse; enabled = xFalse;
if (pHead) { if (pHead) {
for (pShapeEvent = *pHead; for (pShapeEvent = *pHead;
......
...@@ -568,11 +568,11 @@ ProcPanoramiXShmPutImage(register ClientPtr client) ...@@ -568,11 +568,11 @@ ProcPanoramiXShmPutImage(register ClientPtr client)
REQUEST_SIZE_MATCH(xShmPutImageReq); REQUEST_SIZE_MATCH(xShmPutImageReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess))) client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable; return BadDrawable;
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess))) client, stuff->gc, XRT_GC, DixReadAccess)))
return BadGC; return BadGC;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
...@@ -618,7 +618,7 @@ ProcPanoramiXShmGetImage(ClientPtr client) ...@@ -618,7 +618,7 @@ ProcPanoramiXShmGetImage(ClientPtr client)
} }
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess))) client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable; return BadDrawable;
if (draw->type == XRT_PIXMAP) if (draw->type == XRT_PIXMAP)
......
...@@ -425,7 +425,7 @@ SyncInitTrigger(client, pTrigger, counter, changes) ...@@ -425,7 +425,7 @@ SyncInitTrigger(client, pTrigger, counter, changes)
if (counter == None) if (counter == None)
pCounter = NULL; pCounter = NULL;
else if (!(pCounter = (SyncCounter *)SecurityLookupIDByType( else if (!(pCounter = (SyncCounter *)SecurityLookupIDByType(
client, counter, RTCounter, SecurityReadAccess))) client, counter, RTCounter, DixReadAccess)))
{ {
client->errorValue = counter; client->errorValue = counter;
return SyncErrorBase + XSyncBadCounter; return SyncErrorBase + XSyncBadCounter;
...@@ -1527,7 +1527,7 @@ ProcSyncSetCounter(client) ...@@ -1527,7 +1527,7 @@ ProcSyncSetCounter(client)
REQUEST_SIZE_MATCH(xSyncSetCounterReq); REQUEST_SIZE_MATCH(xSyncSetCounterReq);
pCounter = (SyncCounter *)SecurityLookupIDByType(client, stuff->cid, pCounter = (SyncCounter *)SecurityLookupIDByType(client, stuff->cid,
RTCounter, SecurityWriteAccess); RTCounter, DixWriteAccess);
if (pCounter == NULL) if (pCounter == NULL)
{ {
client->errorValue = stuff->cid; client->errorValue = stuff->cid;
...@@ -1560,7 +1560,7 @@ ProcSyncChangeCounter(client) ...@@ -1560,7 +1560,7 @@ ProcSyncChangeCounter(client)
REQUEST_SIZE_MATCH(xSyncChangeCounterReq); REQUEST_SIZE_MATCH(xSyncChangeCounterReq);
pCounter = (SyncCounter *) SecurityLookupIDByType(client, stuff->cid, pCounter = (SyncCounter *) SecurityLookupIDByType(client, stuff->cid,
RTCounter, SecurityWriteAccess); RTCounter, DixWriteAccess);
if (pCounter == NULL) if (pCounter == NULL)
{ {
client->errorValue = stuff->cid; client->errorValue = stuff->cid;
...@@ -1598,7 +1598,7 @@ ProcSyncDestroyCounter(client) ...@@ -1598,7 +1598,7 @@ ProcSyncDestroyCounter(client)
REQUEST_SIZE_MATCH(xSyncDestroyCounterReq); REQUEST_SIZE_MATCH(xSyncDestroyCounterReq);
pCounter = (SyncCounter *)SecurityLookupIDByType(client, stuff->counter, pCounter = (SyncCounter *)SecurityLookupIDByType(client, stuff->counter,
RTCounter, SecurityDestroyAccess); RTCounter, DixDestroyAccess);
if (pCounter == NULL) if (pCounter == NULL)
{ {
client->errorValue = stuff->counter; client->errorValue = stuff->counter;
...@@ -1744,7 +1744,7 @@ ProcSyncQueryCounter(client) ...@@ -1744,7 +1744,7 @@ ProcSyncQueryCounter(client)
REQUEST_SIZE_MATCH(xSyncQueryCounterReq); REQUEST_SIZE_MATCH(xSyncQueryCounterReq);
pCounter = (SyncCounter *)SecurityLookupIDByType(client, stuff->counter, pCounter = (SyncCounter *)SecurityLookupIDByType(client, stuff->counter,
RTCounter, SecurityReadAccess); RTCounter, DixReadAccess);
if (pCounter == NULL) if (pCounter == NULL)
{ {
client->errorValue = stuff->counter; client->errorValue = stuff->counter;
...@@ -1872,7 +1872,7 @@ ProcSyncChangeAlarm(client) ...@@ -1872,7 +1872,7 @@ ProcSyncChangeAlarm(client)
REQUEST_AT_LEAST_SIZE(xSyncChangeAlarmReq); REQUEST_AT_LEAST_SIZE(xSyncChangeAlarmReq);
if (!(pAlarm = (SyncAlarm *)SecurityLookupIDByType(client, stuff->alarm, if (!(pAlarm = (SyncAlarm *)SecurityLookupIDByType(client, stuff->alarm,
RTAlarm, SecurityWriteAccess))) RTAlarm, DixWriteAccess)))
{ {
client->errorValue = stuff->alarm; client->errorValue = stuff->alarm;
return SyncErrorBase + XSyncBadAlarm; return SyncErrorBase + XSyncBadAlarm;
...@@ -1913,7 +1913,7 @@ ProcSyncQueryAlarm(client) ...@@ -1913,7 +1913,7 @@ ProcSyncQueryAlarm(client)
REQUEST_SIZE_MATCH(xSyncQueryAlarmReq); REQUEST_SIZE_MATCH(xSyncQueryAlarmReq);
pAlarm = (SyncAlarm *)SecurityLookupIDByType(client, stuff->alarm, pAlarm = (SyncAlarm *)SecurityLookupIDByType(client, stuff->alarm,
RTAlarm, SecurityReadAccess); RTAlarm, DixReadAccess);
if (!pAlarm) if (!pAlarm)
{ {
client->errorValue = stuff->alarm; client->errorValue = stuff->alarm;
...@@ -1972,7 +1972,7 @@ ProcSyncDestroyAlarm(client) ...@@ -1972,7 +1972,7 @@ ProcSyncDestroyAlarm(client)
REQUEST_SIZE_MATCH(xSyncDestroyAlarmReq); REQUEST_SIZE_MATCH(xSyncDestroyAlarmReq);
if (!((SyncAlarm *)SecurityLookupIDByType(client, stuff->alarm, if (!((SyncAlarm *)SecurityLookupIDByType(client, stuff->alarm,
RTAlarm, SecurityDestroyAccess))) RTAlarm, DixDestroyAccess)))
{ {
client->errorValue = stuff->alarm; client->errorValue = stuff->alarm;
return SyncErrorBase + XSyncBadAlarm; return SyncErrorBase + XSyncBadAlarm;
......
...@@ -443,11 +443,11 @@ ProcXF86BigfontQueryFont( ...@@ -443,11 +443,11 @@ ProcXF86BigfontQueryFont(
#endif #endif
client->errorValue = stuff->id; /* EITHER font or gc */ client->errorValue = stuff->id; /* EITHER font or gc */
pFont = (FontPtr)SecurityLookupIDByType(client, stuff->id, RT_FONT, pFont = (FontPtr)SecurityLookupIDByType(client, stuff->id, RT_FONT,
SecurityReadAccess); DixReadAccess);
if (!pFont) { if (!pFont) {
/* can't use VERIFY_GC because it might return BadGC */ /* can't use VERIFY_GC because it might return BadGC */
GC *pGC = (GC *) SecurityLookupIDByType(client, stuff->id, RT_GC, GC *pGC = (GC *) SecurityLookupIDByType(client, stuff->id, RT_GC,
SecurityReadAccess); DixReadAccess);
if (!pGC) { if (!pGC) {
client->errorValue = stuff->id; client->errorValue = stuff->id;
return BadFont; /* procotol spec says only error is BadFont */ return BadFont; /* procotol spec says only error is BadFont */
......
...@@ -1854,11 +1854,11 @@ XineramaXvStopVideo(ClientPtr client) ...@@ -1854,11 +1854,11 @@ XineramaXvStopVideo(ClientPtr client)
REQUEST_SIZE_MATCH(xvStopVideoReq); REQUEST_SIZE_MATCH(xvStopVideoReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess))) client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable; return BadDrawable;
if(!(port = (PanoramiXRes *)SecurityLookupIDByType( if(!(port = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->port, XvXRTPort, SecurityReadAccess))) client, stuff->port, XvXRTPort, DixReadAccess)))
return _XvBadPort; return _XvBadPort;
FOR_NSCREENS_BACKWARD(i) { FOR_NSCREENS_BACKWARD(i) {
...@@ -1882,7 +1882,7 @@ XineramaXvSetPortAttribute(ClientPtr client) ...@@ -1882,7 +1882,7 @@ XineramaXvSetPortAttribute(ClientPtr client)
REQUEST_SIZE_MATCH(xvSetPortAttributeReq); REQUEST_SIZE_MATCH(xvSetPortAttributeReq);
if(!(port = (PanoramiXRes *)SecurityLookupIDByType( if(!(port = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->port, XvXRTPort, SecurityReadAccess))) client, stuff->port, XvXRTPort, DixReadAccess)))
return _XvBadPort; return _XvBadPort;
FOR_NSCREENS_BACKWARD(i) { FOR_NSCREENS_BACKWARD(i) {
...@@ -1908,15 +1908,15 @@ XineramaXvShmPutImage(ClientPtr client) ...@@ -1908,15 +1908,15 @@ XineramaXvShmPutImage(ClientPtr client)
REQUEST_SIZE_MATCH(xvShmPutImageReq); REQUEST_SIZE_MATCH(xvShmPutImageReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess))) client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable; return BadDrawable;
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess))) client, stuff->gc, XRT_GC, DixReadAccess)))
return BadGC; return BadGC;
if(!(port = (PanoramiXRes *)SecurityLookupIDByType( if(!(port = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->port, XvXRTPort, SecurityReadAccess))) client, stuff->port, XvXRTPort, DixReadAccess)))
return _XvBadPort; return _XvBadPort;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
...@@ -1955,15 +1955,15 @@ XineramaXvPutImage(ClientPtr client) ...@@ -1955,15 +1955,15 @@ XineramaXvPutImage(ClientPtr client)
REQUEST_AT_LEAST_SIZE(xvPutImageReq); REQUEST_AT_LEAST_SIZE(xvPutImageReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess))) client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable; return BadDrawable;
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess))) client, stuff->gc, XRT_GC, DixReadAccess)))
return BadGC; return BadGC;
if(!(port = (PanoramiXRes *)SecurityLookupIDByType( if(!(port = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->port, XvXRTPort, SecurityReadAccess))) client, stuff->port, XvXRTPort, DixReadAccess)))
return _XvBadPort; return _XvBadPort;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
...@@ -2000,15 +2000,15 @@ XineramaXvPutVideo(ClientPtr client) ...@@ -2000,15 +2000,15 @@ XineramaXvPutVideo(ClientPtr client)
REQUEST_AT_LEAST_SIZE(xvPutVideoReq); REQUEST_AT_LEAST_SIZE(xvPutVideoReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess))) client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable; return BadDrawable;
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess))) client, stuff->gc, XRT_GC, DixReadAccess)))
return BadGC; return BadGC;
if(!(port = (PanoramiXRes *)SecurityLookupIDByType( if(!(port = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->port, XvXRTPort, SecurityReadAccess))) client, stuff->port, XvXRTPort, DixReadAccess)))
return _XvBadPort; return _XvBadPort;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
...@@ -2045,15 +2045,15 @@ XineramaXvPutStill(ClientPtr client) ...@@ -2045,15 +2045,15 @@ XineramaXvPutStill(ClientPtr client)
REQUEST_AT_LEAST_SIZE(xvPutImageReq); REQUEST_AT_LEAST_SIZE(xvPutImageReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess))) client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable; return BadDrawable;
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess))) client, stuff->gc, XRT_GC, DixReadAccess)))
return BadGC; return BadGC;
if(!(port = (PanoramiXRes *)SecurityLookupIDByType( if(!(port = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->port, XvXRTPort, SecurityReadAccess))) client, stuff->port, XvXRTPort, DixReadAccess)))
return _XvBadPort; return _XvBadPort;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
......
...@@ -83,7 +83,7 @@ compRepaintBorder (ClientPtr pClient, void * closure) ...@@ -83,7 +83,7 @@ compRepaintBorder (ClientPtr pClient, void * closure)
dixLookupWindow(&pWindow, (XID) (intptr_t) closure, pClient, dixLookupWindow(&pWindow, (XID) (intptr_t) closure, pClient,
DixWriteAccess); DixWriteAccess);
#else #else
pWindow = SecurityLookupWindow((XID) (intptr_t) closure, pClient, SecurityWriteAccess); pWindow = SecurityLookupWindow((XID) (intptr_t) closure, pClient, DixWriteAccess);
int rc = pWindow ? Success : BadWindow; int rc = pWindow ? Success : BadWindow;
#endif #endif
......
...@@ -175,7 +175,7 @@ ProcDamageCreate (ClientPtr client) ...@@ -175,7 +175,7 @@ ProcDamageCreate (ClientPtr client)
REQUEST_SIZE_MATCH(xDamageCreateReq); REQUEST_SIZE_MATCH(xDamageCreateReq);
LEGAL_NEW_RESOURCE(stuff->damage, client); LEGAL_NEW_RESOURCE(stuff->damage, client);
SECURITY_VERIFY_DRAWABLE (pDrawable, stuff->drawable, client, SECURITY_VERIFY_DRAWABLE (pDrawable, stuff->drawable, client,
SecurityReadAccess); DixReadAccess);
switch (stuff->level) { switch (stuff->level) {
case XDamageReportRawRectangles: case XDamageReportRawRectangles:
level = DamageReportRawRegion; level = DamageReportRawRegion;
...@@ -233,7 +233,7 @@ ProcDamageDestroy (ClientPtr client) ...@@ -233,7 +233,7 @@ ProcDamageDestroy (ClientPtr client)
DamageExtPtr pDamageExt; DamageExtPtr pDamageExt;
REQUEST_SIZE_MATCH(xDamageDestroyReq); REQUEST_SIZE_MATCH(xDamageDestroyReq);
VERIFY_DAMAGEEXT(pDamageExt, stuff->damage, client, SecurityWriteAccess); VERIFY_DAMAGEEXT(pDamageExt, stuff->damage, client, DixWriteAccess);
FreeResource (stuff->damage, RT_NONE); FreeResource (stuff->damage, RT_NONE);
return (client->noClientException); return (client->noClientException);
} }
...@@ -247,9 +247,9 @@ ProcDamageSubtract (ClientPtr client) ...@@ -247,9 +247,9 @@ ProcDamageSubtract (ClientPtr client)
RegionPtr pParts; RegionPtr pParts;
REQUEST_SIZE_MATCH(xDamageSubtractReq); REQUEST_SIZE_MATCH(xDamageSubtractReq);
VERIFY_DAMAGEEXT(pDamageExt, stuff->damage, client, SecurityWriteAccess); VERIFY_DAMAGEEXT(pDamageExt, stuff->damage, client, DixWriteAccess);
VERIFY_REGION_OR_NONE(pRepair, stuff->repair, client, SecurityWriteAccess); VERIFY_REGION_OR_NONE(pRepair, stuff->repair, client, DixWriteAccess);
VERIFY_REGION_OR_NONE(pParts, stuff->parts, client, SecurityWriteAccess); VERIFY_REGION_OR_NONE(pParts, stuff->parts, client, DixWriteAccess);
if (pDamageExt->level != DamageReportRawRegion) if (pDamageExt->level != DamageReportRawRegion)
{ {
......
...@@ -420,7 +420,7 @@ ProcDbeAllocateBackBufferName(client) ...@@ -420,7 +420,7 @@ ProcDbeAllocateBackBufferName(client)
/* The window must be valid. */ /* The window must be valid. */
if (!(pWin = SecurityLookupWindow(stuff->window, client, if (!(pWin = SecurityLookupWindow(stuff->window, client,
SecurityWriteAccess))) DixWriteAccess)))
{ {
return(BadWindow); return(BadWindow);
} }
...@@ -648,9 +648,9 @@ ProcDbeDeallocateBackBufferName(client) ...@@ -648,9 +648,9 @@ ProcDbeDeallocateBackBufferName(client)
/* Buffer name must be valid */ /* Buffer name must be valid */
if (!(pDbeWindowPriv = (DbeWindowPrivPtr)SecurityLookupIDByType(client, if (!(pDbeWindowPriv = (DbeWindowPrivPtr)SecurityLookupIDByType(client,
stuff->buffer, dbeWindowPrivResType, SecurityDestroyAccess)) || stuff->buffer, dbeWindowPrivResType, DixDestroyAccess)) ||
!(SecurityLookupIDByType(client, stuff->buffer, dbeDrawableResType, !(SecurityLookupIDByType(client, stuff->buffer, dbeDrawableResType,
SecurityDestroyAccess))) DixDestroyAccess)))
{ {
client->errorValue = stuff->buffer; client->errorValue = stuff->buffer;
return(dbeErrorBase + DbeBadBuffer); return(dbeErrorBase + DbeBadBuffer);
...@@ -751,7 +751,7 @@ ProcDbeSwapBuffers(client) ...@@ -751,7 +751,7 @@ ProcDbeSwapBuffers(client)
/* Each window must be a valid window - BadWindow. */ /* Each window must be a valid window - BadWindow. */
if (!(pWin = SecurityLookupWindow(dbeSwapInfo[i].window, client, if (!(pWin = SecurityLookupWindow(dbeSwapInfo[i].window, client,
SecurityWriteAccess))) DixWriteAccess)))
{ {
free(swapInfo); free(swapInfo);
return(BadWindow); return(BadWindow);
...@@ -916,7 +916,7 @@ ProcDbeGetVisualInfo(client) ...@@ -916,7 +916,7 @@ ProcDbeGetVisualInfo(client)
for (i = 0; i < stuff->n; i++) for (i = 0; i < stuff->n; i++)
{ {
if (!(pDrawables[i] = (DrawablePtr)SecurityLookupDrawable( if (!(pDrawables[i] = (DrawablePtr)SecurityLookupDrawable(
drawables[i], client, SecurityReadAccess))) drawables[i], client, DixReadAccess)))
{ {
free(pDrawables); free(pDrawables);
return(BadDrawable); return(BadDrawable);
...@@ -1072,7 +1072,7 @@ ProcDbeGetBackBufferAttributes(client) ...@@ -1072,7 +1072,7 @@ ProcDbeGetBackBufferAttributes(client)
REQUEST_SIZE_MATCH(xDbeGetBackBufferAttributesReq); REQUEST_SIZE_MATCH(xDbeGetBackBufferAttributesReq);
if (!(pDbeWindowPriv = (DbeWindowPrivPtr)SecurityLookupIDByType(client, if (!(pDbeWindowPriv = (DbeWindowPrivPtr)SecurityLookupIDByType(client,
stuff->buffer, dbeWindowPrivResType, SecurityReadAccess))) stuff->buffer, dbeWindowPrivResType, DixReadAccess)))
{ {
rep.attributes = None; rep.attributes = None;
} }
......
...@@ -892,7 +892,7 @@ AllocColor (ColormapPtr pmap, ...@@ -892,7 +892,7 @@ AllocColor (ColormapPtr pmap,
{ {
ColormapPtr prootmap = (ColormapPtr) ColormapPtr prootmap = (ColormapPtr)
SecurityLookupIDByType (clients[client], pmap->pScreen->defColormap, SecurityLookupIDByType (clients[client], pmap->pScreen->defColormap,
RT_COLORMAP, SecurityReadAccess); RT_COLORMAP, DixReadAccess);
if (pmap->class == prootmap->class) if (pmap->class == prootmap->class)
FindColorInRootCmap (prootmap, prootmap->red, entries, &rgb, FindColorInRootCmap (prootmap, prootmap->red, entries, &rgb,
...@@ -909,7 +909,7 @@ AllocColor (ColormapPtr pmap, ...@@ -909,7 +909,7 @@ AllocColor (ColormapPtr pmap,
{ {
ColormapPtr prootmap = (ColormapPtr) ColormapPtr prootmap = (ColormapPtr)
SecurityLookupIDByType (clients[client], pmap->pScreen->defColormap, SecurityLookupIDByType (clients[client], pmap->pScreen->defColormap,
RT_COLORMAP, SecurityReadAccess); RT_COLORMAP, DixReadAccess);
if (pmap->class == prootmap->class) if (pmap->class == prootmap->class)
{ {
......
...@@ -262,9 +262,9 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, ...@@ -262,9 +262,9 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar,
GlyphSharePtr pShare; GlyphSharePtr pShare;
sourcefont = (FontPtr) SecurityLookupIDByType(client, source, RT_FONT, sourcefont = (FontPtr) SecurityLookupIDByType(client, source, RT_FONT,
SecurityReadAccess); DixReadAccess);
maskfont = (FontPtr) SecurityLookupIDByType(client, mask, RT_FONT, maskfont = (FontPtr) SecurityLookupIDByType(client, mask, RT_FONT,
SecurityReadAccess); DixReadAccess);
if (!sourcefont) if (!sourcefont)
{ {
......
...@@ -1197,7 +1197,7 @@ doPolyText(ClientPtr client, register PTclosurePtr c) ...@@ -1197,7 +1197,7 @@ doPolyText(ClientPtr client, register PTclosurePtr c)
if (c->slept && if (c->slept &&
c->pDraw && c->pDraw &&
c->pDraw != (DrawablePtr)SecurityLookupIDByClass(client, c->did, c->pDraw != (DrawablePtr)SecurityLookupIDByClass(client, c->did,
RC_DRAWABLE, SecurityWriteAccess)) RC_DRAWABLE, DixWriteAccess))
{ {
/* Our drawable has disappeared. Treat like client died... ask /* Our drawable has disappeared. Treat like client died... ask
the FPE code to clean up after client and avoid further the FPE code to clean up after client and avoid further
...@@ -1227,7 +1227,7 @@ doPolyText(ClientPtr client, register PTclosurePtr c) ...@@ -1227,7 +1227,7 @@ doPolyText(ClientPtr client, register PTclosurePtr c)
| ((Font)*(c->pElt+2)) << 16 | ((Font)*(c->pElt+2)) << 16
| ((Font)*(c->pElt+1)) << 24; | ((Font)*(c->pElt+1)) << 24;
pFont = (FontPtr)SecurityLookupIDByType(client, fid, RT_FONT, pFont = (FontPtr)SecurityLookupIDByType(client, fid, RT_FONT,
SecurityReadAccess); DixReadAccess);
if (!pFont) if (!pFont)
{ {
client->errorValue = fid; client->errorValue = fid;
...@@ -1489,7 +1489,7 @@ doImageText(ClientPtr client, register ITclosurePtr c) ...@@ -1489,7 +1489,7 @@ doImageText(ClientPtr client, register ITclosurePtr c)
if (c->slept && if (c->slept &&
c->pDraw && c->pDraw &&
c->pDraw != (DrawablePtr)SecurityLookupIDByClass(client, c->did, c->pDraw != (DrawablePtr)SecurityLookupIDByClass(client, c->did,
RC_DRAWABLE, SecurityWriteAccess)) RC_DRAWABLE, DixWriteAccess))
{ {
/* Our drawable has disappeared. Treat like client died... ask /* Our drawable has disappeared. Treat like client died... ask
the FPE code to clean up after client. */ the FPE code to clean up after client. */
...@@ -2044,7 +2044,7 @@ FontPtr ...@@ -2044,7 +2044,7 @@ FontPtr
find_old_font(XID id) find_old_font(XID id)
{ {
return (FontPtr) SecurityLookupIDByType(NullClient, id, RT_NONE, return (FontPtr) SecurityLookupIDByType(NullClient, id, RT_NONE,
SecurityUnknownAccess); DixUnknownAccess);
} }
Font Font
......
...@@ -260,13 +260,13 @@ SecurityLookupDrawable(XID rid, ClientPtr client, Mask access_mode) ...@@ -260,13 +260,13 @@ SecurityLookupDrawable(XID rid, ClientPtr client, Mask access_mode)
WindowPtr WindowPtr
LookupWindow(XID rid, ClientPtr client) LookupWindow(XID rid, ClientPtr client)
{ {
return SecurityLookupWindow(rid, client, SecurityUnknownAccess); return SecurityLookupWindow(rid, client, DixUnknownAccess);
} }
void * void *
LookupDrawable(XID rid, ClientPtr client) LookupDrawable(XID rid, ClientPtr client)
{ {
return SecurityLookupDrawable(rid, client, SecurityUnknownAccess); return SecurityLookupDrawable(rid, client, DixUnknownAccess);
} }
#else /* not XCSECURITY */ #else /* not XCSECURITY */
...@@ -317,7 +317,7 @@ ClientPtr ...@@ -317,7 +317,7 @@ ClientPtr
LookupClient(XID rid, ClientPtr client) LookupClient(XID rid, ClientPtr client)
{ {
void * pRes = (void *)SecurityLookupIDByClass(client, rid, RC_ANY, void * pRes = (void *)SecurityLookupIDByClass(client, rid, RC_ANY,
SecurityReadAccess); DixReadAccess);
int clientIndex = CLIENT_ID(rid); int clientIndex = CLIENT_ID(rid);
if (clientIndex && pRes && clients[clientIndex] && !(rid & SERVER_BIT)) if (clientIndex && pRes && clients[clientIndex] && !(rid & SERVER_BIT))
......
...@@ -2201,7 +2201,7 @@ XineramaWarpPointer(ClientPtr client) ...@@ -2201,7 +2201,7 @@ XineramaWarpPointer(ClientPtr client)
if (stuff->dstWid != None) if (stuff->dstWid != None)
{ {
dest = SecurityLookupWindow(stuff->dstWid, client, SecurityReadAccess); dest = SecurityLookupWindow(stuff->dstWid, client, DixReadAccess);
if (!dest) if (!dest)
return BadWindow; return BadWindow;
} }
...@@ -2214,7 +2214,7 @@ XineramaWarpPointer(ClientPtr client) ...@@ -2214,7 +2214,7 @@ XineramaWarpPointer(ClientPtr client)
XID winID = stuff->srcWid; XID winID = stuff->srcWid;
WindowPtr source; WindowPtr source;
source = SecurityLookupWindow(winID, client, SecurityReadAccess); source = SecurityLookupWindow(winID, client, DixReadAccess);
if (!source) return BadWindow; if (!source) return BadWindow;
winX = source->drawable.x; winX = source->drawable.x;
...@@ -2281,7 +2281,7 @@ ProcWarpPointer(ClientPtr client) ...@@ -2281,7 +2281,7 @@ ProcWarpPointer(ClientPtr client)
if (stuff->dstWid != None) if (stuff->dstWid != None)
{ {
dest = SecurityLookupWindow(stuff->dstWid, client, SecurityReadAccess); dest = SecurityLookupWindow(stuff->dstWid, client, DixReadAccess);
if (!dest) if (!dest)
return BadWindow; return BadWindow;
} }
...@@ -2294,7 +2294,7 @@ ProcWarpPointer(ClientPtr client) ...@@ -2294,7 +2294,7 @@ ProcWarpPointer(ClientPtr client)
XID winID = stuff->srcWid; XID winID = stuff->srcWid;
WindowPtr source; WindowPtr source;
source = SecurityLookupWindow(winID, client, SecurityReadAccess); source = SecurityLookupWindow(winID, client, DixReadAccess);
if (!source) return BadWindow; if (!source) return BadWindow;
winX = source->drawable.x; winX = source->drawable.x;
...@@ -3469,7 +3469,7 @@ SetInputFocus( ...@@ -3469,7 +3469,7 @@ SetInputFocus(
else if ((focusID == FollowKeyboard) && followOK) else if ((focusID == FollowKeyboard) && followOK)
focusWin = inputInfo.keyboard->focus->win; focusWin = inputInfo.keyboard->focus->win;
else if (!(focusWin = SecurityLookupWindow(focusID, client, else if (!(focusWin = SecurityLookupWindow(focusID, client,
SecurityReadAccess))) DixReadAccess)))
return BadWindow; return BadWindow;
else else
{ {
...@@ -3590,7 +3590,7 @@ ProcGrabPointer(ClientPtr client) ...@@ -3590,7 +3590,7 @@ ProcGrabPointer(ClientPtr client)
client->errorValue = stuff->eventMask; client->errorValue = stuff->eventMask;
return BadValue; return BadValue;
} }
pWin = SecurityLookupWindow(stuff->grabWindow, client, SecurityReadAccess); pWin = SecurityLookupWindow(stuff->grabWindow, client, DixReadAccess);
if (!pWin) if (!pWin)
return BadWindow; return BadWindow;
if (stuff->confineTo == None) if (stuff->confineTo == None)
...@@ -3598,7 +3598,7 @@ ProcGrabPointer(ClientPtr client) ...@@ -3598,7 +3598,7 @@ ProcGrabPointer(ClientPtr client)
else else
{ {
confineTo = SecurityLookupWindow(stuff->confineTo, client, confineTo = SecurityLookupWindow(stuff->confineTo, client,
SecurityReadAccess); DixReadAccess);
if (!confineTo) if (!confineTo)
return BadWindow; return BadWindow;
} }
...@@ -3607,7 +3607,7 @@ ProcGrabPointer(ClientPtr client) ...@@ -3607,7 +3607,7 @@ ProcGrabPointer(ClientPtr client)
else else
{ {
cursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor, cursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor,
RT_CURSOR, SecurityReadAccess); RT_CURSOR, DixReadAccess);
if (!cursor) if (!cursor)
{ {
client->errorValue = stuff->cursor; client->errorValue = stuff->cursor;
...@@ -3682,7 +3682,7 @@ ProcChangeActivePointerGrab(ClientPtr client) ...@@ -3682,7 +3682,7 @@ ProcChangeActivePointerGrab(ClientPtr client)
else else
{ {
newCursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor, newCursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor,
RT_CURSOR, SecurityReadAccess); RT_CURSOR, DixReadAccess);
if (!newCursor) if (!newCursor)
{ {
client->errorValue = stuff->cursor; client->errorValue = stuff->cursor;
...@@ -3752,7 +3752,7 @@ GrabDevice(register ClientPtr client, register DeviceIntPtr dev, ...@@ -3752,7 +3752,7 @@ GrabDevice(register ClientPtr client, register DeviceIntPtr dev,
client->errorValue = ownerEvents; client->errorValue = ownerEvents;
return BadValue; return BadValue;
} }
pWin = SecurityLookupWindow(grabWindow, client, SecurityReadAccess); pWin = SecurityLookupWindow(grabWindow, client, DixReadAccess);
if (!pWin) if (!pWin)
return BadWindow; return BadWindow;
time = ClientTimeToServerTime(ctime); time = ClientTimeToServerTime(ctime);
...@@ -3842,7 +3842,7 @@ ProcQueryPointer(ClientPtr client) ...@@ -3842,7 +3842,7 @@ ProcQueryPointer(ClientPtr client)
DeviceIntPtr mouse = inputInfo.pointer; DeviceIntPtr mouse = inputInfo.pointer;
REQUEST_SIZE_MATCH(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq);
pWin = SecurityLookupWindow(stuff->id, client, SecurityReadAccess); pWin = SecurityLookupWindow(stuff->id, client, DixReadAccess);
if (!pWin) if (!pWin)
return BadWindow; return BadWindow;
if (mouse->valuator->motionHintWindow) if (mouse->valuator->motionHintWindow)
...@@ -4009,7 +4009,7 @@ ProcSendEvent(ClientPtr client) ...@@ -4009,7 +4009,7 @@ ProcSendEvent(ClientPtr client)
} }
else else
pWin = SecurityLookupWindow(stuff->destination, client, pWin = SecurityLookupWindow(stuff->destination, client,
SecurityReadAccess); DixReadAccess);
if (!pWin) if (!pWin)
return BadWindow; return BadWindow;
if ((stuff->propagate != xFalse) && (stuff->propagate != xTrue)) if ((stuff->propagate != xFalse) && (stuff->propagate != xTrue))
...@@ -4048,7 +4048,7 @@ ProcUngrabKey(ClientPtr client) ...@@ -4048,7 +4048,7 @@ ProcUngrabKey(ClientPtr client)
DeviceIntPtr keybd = inputInfo.keyboard; DeviceIntPtr keybd = inputInfo.keyboard;
REQUEST_SIZE_MATCH(xUngrabKeyReq); REQUEST_SIZE_MATCH(xUngrabKeyReq);
pWin = SecurityLookupWindow(stuff->grabWindow, client, SecurityReadAccess); pWin = SecurityLookupWindow(stuff->grabWindow, client, DixReadAccess);
if (!pWin) if (!pWin)
return BadWindow; return BadWindow;
...@@ -4119,7 +4119,7 @@ ProcGrabKey(ClientPtr client) ...@@ -4119,7 +4119,7 @@ ProcGrabKey(ClientPtr client)
client->errorValue = stuff->modifiers; client->errorValue = stuff->modifiers;
return BadValue; return BadValue;
} }
pWin = SecurityLookupWindow(stuff->grabWindow, client, SecurityReadAccess); pWin = SecurityLookupWindow(stuff->grabWindow, client, DixReadAccess);
if (!pWin) if (!pWin)
return BadWindow; return BadWindow;
...@@ -4171,14 +4171,14 @@ ProcGrabButton(ClientPtr client) ...@@ -4171,14 +4171,14 @@ ProcGrabButton(ClientPtr client)
client->errorValue = stuff->eventMask; client->errorValue = stuff->eventMask;
return BadValue; return BadValue;
} }
pWin = SecurityLookupWindow(stuff->grabWindow, client, SecurityReadAccess); pWin = SecurityLookupWindow(stuff->grabWindow, client, DixReadAccess);
if (!pWin) if (!pWin)
return BadWindow; return BadWindow;
if (stuff->confineTo == None) if (stuff->confineTo == None)
confineTo = NullWindow; confineTo = NullWindow;
else { else {
confineTo = SecurityLookupWindow(stuff->confineTo, client, confineTo = SecurityLookupWindow(stuff->confineTo, client,
SecurityReadAccess); DixReadAccess);
if (!confineTo) if (!confineTo)
return BadWindow; return BadWindow;
} }
...@@ -4187,7 +4187,7 @@ ProcGrabButton(ClientPtr client) ...@@ -4187,7 +4187,7 @@ ProcGrabButton(ClientPtr client)
else else
{ {
cursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor, cursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor,
RT_CURSOR, SecurityReadAccess); RT_CURSOR, DixReadAccess);
if (!cursor) if (!cursor)
{ {
client->errorValue = stuff->cursor; client->errorValue = stuff->cursor;
...@@ -4222,7 +4222,7 @@ ProcUngrabButton(ClientPtr client) ...@@ -4222,7 +4222,7 @@ ProcUngrabButton(ClientPtr client)
client->errorValue = stuff->modifiers; client->errorValue = stuff->modifiers;
return BadValue; return BadValue;
} }
pWin = SecurityLookupWindow(stuff->grabWindow, client, SecurityReadAccess); pWin = SecurityLookupWindow(stuff->grabWindow, client, DixReadAccess);
if (!pWin) if (!pWin)
return BadWindow; return BadWindow;
tempGrab.resource = client->clientAsMask; tempGrab.resource = client->clientAsMask;
...@@ -4376,7 +4376,7 @@ ProcRecolorCursor(ClientPtr client) ...@@ -4376,7 +4376,7 @@ ProcRecolorCursor(ClientPtr client)
REQUEST_SIZE_MATCH(xRecolorCursorReq); REQUEST_SIZE_MATCH(xRecolorCursorReq);
pCursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor, pCursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor,
RT_CURSOR, SecurityWriteAccess); RT_CURSOR, DixWriteAccess);
if ( !pCursor) if ( !pCursor)
{ {
client->errorValue = stuff->cursor; client->errorValue = stuff->cursor;
......
...@@ -271,7 +271,7 @@ dixChangeGC(ClientPtr client, register GC *pGC, register BITS32 mask, CARD32 *pC ...@@ -271,7 +271,7 @@ dixChangeGC(ClientPtr client, register GC *pGC, register BITS32 mask, CARD32 *pC
{ {
NEXTVAL(XID, newpix); NEXTVAL(XID, newpix);
pPixmap = (PixmapPtr)SecurityLookupIDByType(client, pPixmap = (PixmapPtr)SecurityLookupIDByType(client,
newpix, RT_PIXMAP, SecurityReadAccess); newpix, RT_PIXMAP, DixReadAccess);
} }
if (pPixmap) if (pPixmap)
{ {
...@@ -307,7 +307,7 @@ dixChangeGC(ClientPtr client, register GC *pGC, register BITS32 mask, CARD32 *pC ...@@ -307,7 +307,7 @@ dixChangeGC(ClientPtr client, register GC *pGC, register BITS32 mask, CARD32 *pC
{ {
NEXTVAL(XID, newstipple) NEXTVAL(XID, newstipple)
pPixmap = (PixmapPtr)SecurityLookupIDByType(client, pPixmap = (PixmapPtr)SecurityLookupIDByType(client,
newstipple, RT_PIXMAP, SecurityReadAccess); newstipple, RT_PIXMAP, DixReadAccess);
} }
if (pPixmap) if (pPixmap)
{ {
...@@ -349,7 +349,7 @@ dixChangeGC(ClientPtr client, register GC *pGC, register BITS32 mask, CARD32 *pC ...@@ -349,7 +349,7 @@ dixChangeGC(ClientPtr client, register GC *pGC, register BITS32 mask, CARD32 *pC
{ {
NEXTVAL(XID, newfont) NEXTVAL(XID, newfont)
pFont = (FontPtr)SecurityLookupIDByType(client, newfont, pFont = (FontPtr)SecurityLookupIDByType(client, newfont,
RT_FONT, SecurityReadAccess); RT_FONT, DixReadAccess);
} }
if (pFont) if (pFont)
{ {
...@@ -416,7 +416,7 @@ dixChangeGC(ClientPtr client, register GC *pGC, register BITS32 mask, CARD32 *pC ...@@ -416,7 +416,7 @@ dixChangeGC(ClientPtr client, register GC *pGC, register BITS32 mask, CARD32 *pC
} }
else else
pPixmap = (PixmapPtr)SecurityLookupIDByType(client, pPixmap = (PixmapPtr)SecurityLookupIDByType(client,
pid, RT_PIXMAP, SecurityReadAccess); pid, RT_PIXMAP, DixReadAccess);
} }
if (pPixmap) if (pPixmap)
......
...@@ -106,7 +106,7 @@ ProcRotateProperties(ClientPtr client) ...@@ -106,7 +106,7 @@ ProcRotateProperties(ClientPtr client)
REQUEST_FIXED_SIZE(xRotatePropertiesReq, stuff->nAtoms << 2); REQUEST_FIXED_SIZE(xRotatePropertiesReq, stuff->nAtoms << 2);
UpdateCurrentTime(); UpdateCurrentTime();
pWin = (WindowPtr) SecurityLookupWindow(stuff->window, client, pWin = (WindowPtr) SecurityLookupWindow(stuff->window, client,
SecurityWriteAccess); DixWriteAccess);
if (!pWin) if (!pWin)
return(BadWindow); return(BadWindow);
if (!stuff->nAtoms) if (!stuff->nAtoms)
...@@ -119,7 +119,7 @@ ProcRotateProperties(ClientPtr client) ...@@ -119,7 +119,7 @@ ProcRotateProperties(ClientPtr client)
{ {
#ifdef XCSECURITY #ifdef XCSECURITY
char action = SecurityCheckPropertyAccess(client, pWin, atoms[i], char action = SecurityCheckPropertyAccess(client, pWin, atoms[i],
SecurityReadAccess|SecurityWriteAccess); DixReadAccess|DixWriteAccess);
#endif #endif
if (!ValidAtom(atoms[i]) if (!ValidAtom(atoms[i])
#ifdef XCSECURITY #ifdef XCSECURITY
...@@ -219,7 +219,7 @@ ProcChangeProperty(ClientPtr client) ...@@ -219,7 +219,7 @@ ProcChangeProperty(ClientPtr client)
REQUEST_FIXED_SIZE(xChangePropertyReq, totalSize); REQUEST_FIXED_SIZE(xChangePropertyReq, totalSize);
pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
SecurityWriteAccess); DixWriteAccess);
if (!pWin) if (!pWin)
return(BadWindow); return(BadWindow);
if (!ValidAtom(stuff->property)) if (!ValidAtom(stuff->property))
...@@ -235,7 +235,7 @@ ProcChangeProperty(ClientPtr client) ...@@ -235,7 +235,7 @@ ProcChangeProperty(ClientPtr client)
#ifdef XCSECURITY #ifdef XCSECURITY
switch (SecurityCheckPropertyAccess(client, pWin, stuff->property, switch (SecurityCheckPropertyAccess(client, pWin, stuff->property,
SecurityWriteAccess)) DixWriteAccess))
{ {
case SecurityErrorOperation: case SecurityErrorOperation:
client->errorValue = stuff->property; client->errorValue = stuff->property;
...@@ -469,7 +469,7 @@ ProcGetProperty(ClientPtr client) ...@@ -469,7 +469,7 @@ ProcGetProperty(ClientPtr client)
if (stuff->delete) if (stuff->delete)
UpdateCurrentTime(); UpdateCurrentTime();
pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
SecurityReadAccess); DixReadAccess);
if (!pWin) if (!pWin)
return BadWindow; return BadWindow;
...@@ -507,10 +507,10 @@ ProcGetProperty(ClientPtr client) ...@@ -507,10 +507,10 @@ ProcGetProperty(ClientPtr client)
#ifdef XCSECURITY #ifdef XCSECURITY
{ {
Mask access_mode = SecurityReadAccess; Mask access_mode = DixReadAccess;
if (stuff->delete) if (stuff->delete)
access_mode |= SecurityDestroyAccess; access_mode |= DixDestroyAccess;
switch(SecurityCheckPropertyAccess(client, pWin, stuff->property, switch(SecurityCheckPropertyAccess(client, pWin, stuff->property,
access_mode)) access_mode))
{ {
...@@ -614,7 +614,7 @@ ProcListProperties(ClientPtr client) ...@@ -614,7 +614,7 @@ ProcListProperties(ClientPtr client)
REQUEST_SIZE_MATCH(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq);
pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client, pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client,
SecurityReadAccess); DixReadAccess);
if (!pWin) if (!pWin)
return(BadWindow); return(BadWindow);
...@@ -659,7 +659,7 @@ ProcDeleteProperty(register ClientPtr client) ...@@ -659,7 +659,7 @@ ProcDeleteProperty(register ClientPtr client)
REQUEST_SIZE_MATCH(xDeletePropertyReq); REQUEST_SIZE_MATCH(xDeletePropertyReq);
UpdateCurrentTime(); UpdateCurrentTime();
pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
SecurityWriteAccess); DixWriteAccess);
if (!pWin) if (!pWin)
return(BadWindow); return(BadWindow);
if (!ValidAtom(stuff->property)) if (!ValidAtom(stuff->property))
...@@ -670,7 +670,7 @@ ProcDeleteProperty(register ClientPtr client) ...@@ -670,7 +670,7 @@ ProcDeleteProperty(register ClientPtr client)
#ifdef XCSECURITY #ifdef XCSECURITY
switch(SecurityCheckPropertyAccess(client, pWin, stuff->property, switch(SecurityCheckPropertyAccess(client, pWin, stuff->property,
SecurityDestroyAccess)) DixDestroyAccess))
{ {
case SecurityErrorOperation: case SecurityErrorOperation:
client->errorValue = stuff->property; client->errorValue = stuff->property;
......
...@@ -878,14 +878,14 @@ void * ...@@ -878,14 +878,14 @@ void *
LookupIDByType(XID id, RESTYPE rtype) LookupIDByType(XID id, RESTYPE rtype)
{ {
return SecurityLookupIDByType(NullClient, id, rtype, return SecurityLookupIDByType(NullClient, id, rtype,
SecurityUnknownAccess); DixUnknownAccess);
} }
void * void *
LookupIDByClass(XID id, RESTYPE classes) LookupIDByClass(XID id, RESTYPE classes)
{ {
return SecurityLookupIDByClass(NullClient, id, classes, return SecurityLookupIDByClass(NullClient, id, classes,
SecurityUnknownAccess); DixUnknownAccess);
} }
#else /* not XCSECURITY */ #else /* not XCSECURITY */
......
...@@ -1028,7 +1028,7 @@ ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPt ...@@ -1028,7 +1028,7 @@ ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPt
else else
{ {
pPixmap = (PixmapPtr)SecurityLookupIDByType(client, pixID, pPixmap = (PixmapPtr)SecurityLookupIDByType(client, pixID,
RT_PIXMAP, SecurityReadAccess); RT_PIXMAP, DixReadAccess);
if (pPixmap != (PixmapPtr) NULL) if (pPixmap != (PixmapPtr) NULL)
{ {
if ((pPixmap->drawable.depth != pWin->drawable.depth) || if ((pPixmap->drawable.depth != pWin->drawable.depth) ||
...@@ -1089,7 +1089,7 @@ ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPt ...@@ -1089,7 +1089,7 @@ ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPt
else else
{ {
pPixmap = (PixmapPtr)SecurityLookupIDByType(client, pixID, pPixmap = (PixmapPtr)SecurityLookupIDByType(client, pixID,
RT_PIXMAP, SecurityReadAccess); RT_PIXMAP, DixReadAccess);
if (pPixmap) if (pPixmap)
{ {
if ((pPixmap->drawable.depth != pWin->drawable.depth) || if ((pPixmap->drawable.depth != pWin->drawable.depth) ||
...@@ -1302,7 +1302,7 @@ ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPt ...@@ -1302,7 +1302,7 @@ ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPt
goto PatchUp; goto PatchUp;
} }
pCmap = (ColormapPtr)SecurityLookupIDByType(client, cmap, pCmap = (ColormapPtr)SecurityLookupIDByType(client, cmap,
RT_COLORMAP, SecurityReadAccess); RT_COLORMAP, DixReadAccess);
if (!pCmap) if (!pCmap)
{ {
error = BadColor; error = BadColor;
...@@ -1378,7 +1378,7 @@ ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPt ...@@ -1378,7 +1378,7 @@ ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPt
else else
{ {
pCursor = (CursorPtr)SecurityLookupIDByType(client, cursorID, pCursor = (CursorPtr)SecurityLookupIDByType(client, cursorID,
RT_CURSOR, SecurityReadAccess); RT_CURSOR, DixReadAccess);
if (!pCursor) if (!pCursor)
{ {
error = BadCursor; error = BadCursor;
...@@ -2252,7 +2252,7 @@ ConfigureWindow(register WindowPtr pWin, register Mask mask, XID *vlist, ClientP ...@@ -2252,7 +2252,7 @@ ConfigureWindow(register WindowPtr pWin, register Mask mask, XID *vlist, ClientP
sibwid = (Window ) *pVlist; sibwid = (Window ) *pVlist;
pVlist++; pVlist++;
pSib = (WindowPtr )SecurityLookupIDByType(client, sibwid, pSib = (WindowPtr )SecurityLookupIDByType(client, sibwid,
RT_WINDOW, SecurityReadAccess); RT_WINDOW, DixReadAccess);
if (!pSib) if (!pSib)
{ {
client->errorValue = sibwid; client->errorValue = sibwid;
......
...@@ -586,7 +586,7 @@ ProcReparentWindow(register ClientPtr client) ...@@ -586,7 +586,7 @@ ProcReparentWindow(register ClientPtr client)
REQUEST_SIZE_MATCH(xReparentWindowReq); REQUEST_SIZE_MATCH(xReparentWindowReq);
pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
SecurityWriteAccess); DixWriteAccess);
if (!pWin) if (!pWin)
return(BadWindow); return(BadWindow);
...@@ -596,7 +596,7 @@ ProcReparentWindow(register ClientPtr client) ...@@ -596,7 +596,7 @@ ProcReparentWindow(register ClientPtr client)
} }
pParent = (WindowPtr)SecurityLookupWindow(stuff->parent, client, pParent = (WindowPtr)SecurityLookupWindow(stuff->parent, client,
SecurityWriteAccess); DixWriteAccess);
if (!pParent) if (!pParent)
return(BadWindow); return(BadWindow);
if (SAME_SCREENS(pWin->drawable, pParent->drawable)) if (SAME_SCREENS(pWin->drawable, pParent->drawable))
...@@ -630,7 +630,7 @@ ProcQueryTree(register ClientPtr client) ...@@ -630,7 +630,7 @@ ProcQueryTree(register ClientPtr client)
REQUEST_SIZE_MATCH(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq);
pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client, pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client,
SecurityReadAccess); DixReadAccess);
if (!pWin) if (!pWin)
return(BadWindow); return(BadWindow);
memset(&reply, 0, sizeof(xQueryTreeReply)); memset(&reply, 0, sizeof(xQueryTreeReply));
...@@ -698,7 +698,7 @@ ProcSetSelectionOwner(register ClientPtr client) ...@@ -698,7 +698,7 @@ ProcSetSelectionOwner(register ClientPtr client)
if (stuff->window != None) if (stuff->window != None)
{ {
pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
SecurityReadAccess); DixReadAccess);
if (!pWin) if (!pWin)
return(BadWindow); return(BadWindow);
} }
...@@ -797,7 +797,7 @@ ProcConvertSelection(register ClientPtr client) ...@@ -797,7 +797,7 @@ ProcConvertSelection(register ClientPtr client)
REQUEST_SIZE_MATCH(xConvertSelectionReq); REQUEST_SIZE_MATCH(xConvertSelectionReq);
pWin = (WindowPtr)SecurityLookupWindow(stuff->requestor, client, pWin = (WindowPtr)SecurityLookupWindow(stuff->requestor, client,
SecurityReadAccess); DixReadAccess);
if (!pWin) if (!pWin)
return(BadWindow); return(BadWindow);
...@@ -837,7 +837,7 @@ ProcConvertSelection(register ClientPtr client) ...@@ -837,7 +837,7 @@ ProcConvertSelection(register ClientPtr client)
#ifdef XCSECURITY #ifdef XCSECURITY
&& (!client->CheckAccess || && (!client->CheckAccess ||
(* client->CheckAccess)(client, CurrentSelections[i].window, (* client->CheckAccess)(client, CurrentSelections[i].window,
RT_WINDOW, SecurityReadAccess, RT_WINDOW, DixReadAccess,
CurrentSelections[i].pWin)) CurrentSelections[i].pWin))
#endif #endif
) )
...@@ -918,7 +918,7 @@ ProcCloseFont(register ClientPtr client) ...@@ -918,7 +918,7 @@ ProcCloseFont(register ClientPtr client)
REQUEST_SIZE_MATCH(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq);
pFont = (FontPtr)SecurityLookupIDByType(client, stuff->id, RT_FONT, pFont = (FontPtr)SecurityLookupIDByType(client, stuff->id, RT_FONT,
SecurityDestroyAccess); DixDestroyAccess);
if (pFont != (FontPtr)NULL) if (pFont != (FontPtr)NULL)
{ {
#ifdef NXAGENT_SERVER #ifdef NXAGENT_SERVER
...@@ -1015,7 +1015,7 @@ ProcFreePixmap(register ClientPtr client) ...@@ -1015,7 +1015,7 @@ ProcFreePixmap(register ClientPtr client)
REQUEST_SIZE_MATCH(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq);
pMap = (PixmapPtr)SecurityLookupIDByType(client, stuff->id, RT_PIXMAP, pMap = (PixmapPtr)SecurityLookupIDByType(client, stuff->id, RT_PIXMAP,
SecurityDestroyAccess); DixDestroyAccess);
if (pMap) if (pMap)
{ {
#ifdef NXAGENT_SERVER #ifdef NXAGENT_SERVER
......
...@@ -583,7 +583,7 @@ ProcSendEvent(ClientPtr client) ...@@ -583,7 +583,7 @@ ProcSendEvent(ClientPtr client)
} }
else else
pWin = SecurityLookupWindow(stuff->destination, client, pWin = SecurityLookupWindow(stuff->destination, client,
SecurityReadAccess); DixReadAccess);
if (!pWin) if (!pWin)
return BadWindow; return BadWindow;
if ((stuff->propagate != xFalse) && (stuff->propagate != xTrue)) if ((stuff->propagate != xFalse) && (stuff->propagate != xTrue))
......
...@@ -131,7 +131,7 @@ ProcChangeProperty(ClientPtr client) ...@@ -131,7 +131,7 @@ ProcChangeProperty(ClientPtr client)
if (pWin == NULL) if (pWin == NULL)
#endif #endif
pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
SecurityWriteAccess); DixWriteAccess);
if (!pWin) if (!pWin)
return(BadWindow); return(BadWindow);
if (!ValidAtom(stuff->property)) if (!ValidAtom(stuff->property))
...@@ -147,7 +147,7 @@ ProcChangeProperty(ClientPtr client) ...@@ -147,7 +147,7 @@ ProcChangeProperty(ClientPtr client)
#ifdef XCSECURITY #ifdef XCSECURITY
switch (SecurityCheckPropertyAccess(client, pWin, stuff->property, switch (SecurityCheckPropertyAccess(client, pWin, stuff->property,
SecurityWriteAccess)) DixWriteAccess))
{ {
case SecurityErrorOperation: case SecurityErrorOperation:
client->errorValue = stuff->property; client->errorValue = stuff->property;
...@@ -348,7 +348,7 @@ ProcGetProperty(ClientPtr client) ...@@ -348,7 +348,7 @@ ProcGetProperty(ClientPtr client)
if (stuff->delete) if (stuff->delete)
UpdateCurrentTime(); UpdateCurrentTime();
pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
SecurityReadAccess); DixReadAccess);
if (!pWin) if (!pWin)
return BadWindow; return BadWindow;
...@@ -439,10 +439,10 @@ ProcGetProperty(ClientPtr client) ...@@ -439,10 +439,10 @@ ProcGetProperty(ClientPtr client)
#ifdef XCSECURITY #ifdef XCSECURITY
{ {
Mask access_mode = SecurityReadAccess; Mask access_mode = DixReadAccess;
if (stuff->delete) if (stuff->delete)
access_mode |= SecurityDestroyAccess; access_mode |= DixDestroyAccess;
switch(SecurityCheckPropertyAccess(client, pWin, stuff->property, switch(SecurityCheckPropertyAccess(client, pWin, stuff->property,
access_mode)) access_mode))
{ {
......
...@@ -385,11 +385,11 @@ ProcRenderCreatePicture (ClientPtr client) ...@@ -385,11 +385,11 @@ ProcRenderCreatePicture (ClientPtr client)
LEGAL_NEW_RESOURCE(stuff->pid, client); LEGAL_NEW_RESOURCE(stuff->pid, client);
SECURITY_VERIFY_DRAWABLE(pDrawable, stuff->drawable, client, SECURITY_VERIFY_DRAWABLE(pDrawable, stuff->drawable, client,
SecurityWriteAccess); DixWriteAccess);
pFormat = (PictFormatPtr) SecurityLookupIDByType (client, pFormat = (PictFormatPtr) SecurityLookupIDByType (client,
stuff->format, stuff->format,
PictFormatType, PictFormatType,
SecurityReadAccess); DixReadAccess);
if (!pFormat) if (!pFormat)
{ {
client->errorValue = stuff->format; client->errorValue = stuff->format;
...@@ -426,7 +426,7 @@ ProcRenderChangePicture (ClientPtr client) ...@@ -426,7 +426,7 @@ ProcRenderChangePicture (ClientPtr client)
int error; int error;
REQUEST_AT_LEAST_SIZE(xRenderChangePictureReq); REQUEST_AT_LEAST_SIZE(xRenderChangePictureReq);
VERIFY_PICTURE (pPicture, stuff->picture, client, SecurityWriteAccess, VERIFY_PICTURE (pPicture, stuff->picture, client, DixWriteAccess,
RenderErrBase + BadPicture); RenderErrBase + BadPicture);
len = client->req_len - (sizeof(xRenderChangePictureReq) >> 2); len = client->req_len - (sizeof(xRenderChangePictureReq) >> 2);
...@@ -450,7 +450,7 @@ ProcRenderSetPictureClipRectangles (ClientPtr client) ...@@ -450,7 +450,7 @@ ProcRenderSetPictureClipRectangles (ClientPtr client)
int result; int result;
REQUEST_AT_LEAST_SIZE(xRenderSetPictureClipRectanglesReq); REQUEST_AT_LEAST_SIZE(xRenderSetPictureClipRectanglesReq);
VERIFY_PICTURE (pPicture, stuff->picture, client, SecurityWriteAccess, VERIFY_PICTURE (pPicture, stuff->picture, client, DixWriteAccess,
RenderErrBase + BadPicture); RenderErrBase + BadPicture);
if (!pPicture->pDrawable) if (!pPicture->pDrawable)
return BadDrawable; return BadDrawable;
...@@ -558,13 +558,13 @@ ProcRenderComposite (ClientPtr client) ...@@ -558,13 +558,13 @@ ProcRenderComposite (ClientPtr client)
client->errorValue = stuff->op; client->errorValue = stuff->op;
return BadValue; return BadValue;
} }
VERIFY_PICTURE (pDst, stuff->dst, client, SecurityWriteAccess, VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess,
RenderErrBase + BadPicture); RenderErrBase + BadPicture);
if (!pDst->pDrawable) if (!pDst->pDrawable)
return BadDrawable; return BadDrawable;
VERIFY_PICTURE (pSrc, stuff->src, client, SecurityReadAccess, VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess,
RenderErrBase + BadPicture); RenderErrBase + BadPicture);
VERIFY_ALPHA (pMask, stuff->mask, client, SecurityReadAccess, VERIFY_ALPHA (pMask, stuff->mask, client, DixReadAccess,
RenderErrBase + BadPicture); RenderErrBase + BadPicture);
if ((pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen) || if ((pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen) ||
...@@ -687,9 +687,9 @@ ProcRenderTrapezoids (ClientPtr client) ...@@ -687,9 +687,9 @@ ProcRenderTrapezoids (ClientPtr client)
client->errorValue = stuff->op; client->errorValue = stuff->op;
return BadValue; return BadValue;
} }
VERIFY_PICTURE (pSrc, stuff->src, client, SecurityReadAccess, VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess,
RenderErrBase + BadPicture); RenderErrBase + BadPicture);
VERIFY_PICTURE (pDst, stuff->dst, client, SecurityWriteAccess, VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess,
RenderErrBase + BadPicture); RenderErrBase + BadPicture);
if (!pDst->pDrawable) if (!pDst->pDrawable)
return BadDrawable; return BadDrawable;
...@@ -700,7 +700,7 @@ ProcRenderTrapezoids (ClientPtr client) ...@@ -700,7 +700,7 @@ ProcRenderTrapezoids (ClientPtr client)
pFormat = (PictFormatPtr) SecurityLookupIDByType (client, pFormat = (PictFormatPtr) SecurityLookupIDByType (client,
stuff->maskFormat, stuff->maskFormat,
PictFormatType, PictFormatType,
SecurityReadAccess); DixReadAccess);
if (!pFormat) if (!pFormat)
{ {
client->errorValue = stuff->maskFormat; client->errorValue = stuff->maskFormat;
...@@ -758,7 +758,7 @@ ProcRenderCreateGlyphSet (ClientPtr client) ...@@ -758,7 +758,7 @@ ProcRenderCreateGlyphSet (ClientPtr client)
format = (PictFormatPtr) SecurityLookupIDByType (client, format = (PictFormatPtr) SecurityLookupIDByType (client,
stuff->format, stuff->format,
PictFormatType, PictFormatType,
SecurityReadAccess); DixReadAccess);
if (!format) if (!format)
{ {
client->errorValue = stuff->format; client->errorValue = stuff->format;
...@@ -809,7 +809,7 @@ ProcRenderReferenceGlyphSet (ClientPtr client) ...@@ -809,7 +809,7 @@ ProcRenderReferenceGlyphSet (ClientPtr client)
glyphSet = (GlyphSetPtr) SecurityLookupIDByType (client, glyphSet = (GlyphSetPtr) SecurityLookupIDByType (client,
stuff->existing, stuff->existing,
GlyphSetType, GlyphSetType,
SecurityWriteAccess); DixWriteAccess);
if (!glyphSet) if (!glyphSet)
{ {
client->errorValue = stuff->existing; client->errorValue = stuff->existing;
...@@ -834,7 +834,7 @@ ProcRenderFreeGlyphSet (ClientPtr client) ...@@ -834,7 +834,7 @@ ProcRenderFreeGlyphSet (ClientPtr client)
glyphSet = (GlyphSetPtr) SecurityLookupIDByType (client, glyphSet = (GlyphSetPtr) SecurityLookupIDByType (client,
stuff->glyphset, stuff->glyphset,
GlyphSetType, GlyphSetType,
SecurityDestroyAccess); DixDestroyAccess);
if (!glyphSet) if (!glyphSet)
{ {
client->errorValue = stuff->glyphset; client->errorValue = stuff->glyphset;
...@@ -860,7 +860,7 @@ ProcRenderFreeGlyphs (ClientPtr client) ...@@ -860,7 +860,7 @@ ProcRenderFreeGlyphs (ClientPtr client)
glyphSet = (GlyphSetPtr) SecurityLookupIDByType (client, glyphSet = (GlyphSetPtr) SecurityLookupIDByType (client,
stuff->glyphset, stuff->glyphset,
GlyphSetType, GlyphSetType,
SecurityWriteAccess); DixWriteAccess);
if (!glyphSet) if (!glyphSet)
{ {
client->errorValue = stuff->glyphset; client->errorValue = stuff->glyphset;
...@@ -928,9 +928,9 @@ ProcRenderCompositeGlyphs (ClientPtr client) ...@@ -928,9 +928,9 @@ ProcRenderCompositeGlyphs (ClientPtr client)
client->errorValue = stuff->op; client->errorValue = stuff->op;
return BadValue; return BadValue;
} }
VERIFY_PICTURE (pSrc, stuff->src, client, SecurityReadAccess, VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess,
RenderErrBase + BadPicture); RenderErrBase + BadPicture);
VERIFY_PICTURE (pDst, stuff->dst, client, SecurityWriteAccess, VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess,
RenderErrBase + BadPicture); RenderErrBase + BadPicture);
if (!pDst->pDrawable) if (!pDst->pDrawable)
return BadDrawable; return BadDrawable;
...@@ -941,7 +941,7 @@ ProcRenderCompositeGlyphs (ClientPtr client) ...@@ -941,7 +941,7 @@ ProcRenderCompositeGlyphs (ClientPtr client)
pFormat = (PictFormatPtr) SecurityLookupIDByType (client, pFormat = (PictFormatPtr) SecurityLookupIDByType (client,
stuff->maskFormat, stuff->maskFormat,
PictFormatType, PictFormatType,
SecurityReadAccess); DixReadAccess);
if (!pFormat) if (!pFormat)
{ {
client->errorValue = stuff->maskFormat; client->errorValue = stuff->maskFormat;
...@@ -954,7 +954,7 @@ ProcRenderCompositeGlyphs (ClientPtr client) ...@@ -954,7 +954,7 @@ ProcRenderCompositeGlyphs (ClientPtr client)
glyphSet = (GlyphSetPtr) SecurityLookupIDByType (client, glyphSet = (GlyphSetPtr) SecurityLookupIDByType (client,
stuff->glyphset, stuff->glyphset,
GlyphSetType, GlyphSetType,
SecurityReadAccess); DixReadAccess);
if (!glyphSet) if (!glyphSet)
{ {
client->errorValue = stuff->glyphset; client->errorValue = stuff->glyphset;
...@@ -1027,7 +1027,7 @@ ProcRenderCompositeGlyphs (ClientPtr client) ...@@ -1027,7 +1027,7 @@ ProcRenderCompositeGlyphs (ClientPtr client)
glyphSet = (GlyphSetPtr) SecurityLookupIDByType (client, glyphSet = (GlyphSetPtr) SecurityLookupIDByType (client,
gs, gs,
GlyphSetType, GlyphSetType,
SecurityReadAccess); DixReadAccess);
if (!glyphSet) if (!glyphSet)
{ {
client->errorValue = gs; client->errorValue = gs;
...@@ -1163,7 +1163,7 @@ ProcRenderFillRectangles (ClientPtr client) ...@@ -1163,7 +1163,7 @@ ProcRenderFillRectangles (ClientPtr client)
client->errorValue = stuff->op; client->errorValue = stuff->op;
return BadValue; return BadValue;
} }
VERIFY_PICTURE (pDst, stuff->dst, client, SecurityWriteAccess, VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess,
RenderErrBase + BadPicture); RenderErrBase + BadPicture);
if (!pDst->pDrawable) if (!pDst->pDrawable)
return BadDrawable; return BadDrawable;
...@@ -1212,7 +1212,7 @@ ProcRenderCreateCursor (ClientPtr client) ...@@ -1212,7 +1212,7 @@ ProcRenderCreateCursor (ClientPtr client)
REQUEST_SIZE_MATCH (xRenderCreateCursorReq); REQUEST_SIZE_MATCH (xRenderCreateCursorReq);
LEGAL_NEW_RESOURCE(stuff->cid, client); LEGAL_NEW_RESOURCE(stuff->cid, client);
VERIFY_PICTURE (pSrc, stuff->src, client, SecurityReadAccess, VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess,
RenderErrBase + BadPicture); RenderErrBase + BadPicture);
if (!pSrc->pDrawable) if (!pSrc->pDrawable)
return BadDrawable; return BadDrawable;
...@@ -1430,7 +1430,7 @@ ProcRenderSetPictureTransform (ClientPtr client) ...@@ -1430,7 +1430,7 @@ ProcRenderSetPictureTransform (ClientPtr client)
int result; int result;
REQUEST_SIZE_MATCH(xRenderSetPictureTransformReq); REQUEST_SIZE_MATCH(xRenderSetPictureTransformReq);
VERIFY_PICTURE (pPicture, stuff->picture, client, SecurityWriteAccess, VERIFY_PICTURE (pPicture, stuff->picture, client, DixWriteAccess,
RenderErrBase + BadPicture); RenderErrBase + BadPicture);
result = SetPictureTransform (pPicture, (PictTransform *) &stuff->transform); result = SetPictureTransform (pPicture, (PictTransform *) &stuff->transform);
...@@ -1453,7 +1453,7 @@ ProcRenderSetPictureFilter (ClientPtr client) ...@@ -1453,7 +1453,7 @@ ProcRenderSetPictureFilter (ClientPtr client)
char *name; char *name;
REQUEST_AT_LEAST_SIZE (xRenderSetPictureFilterReq); REQUEST_AT_LEAST_SIZE (xRenderSetPictureFilterReq);
VERIFY_PICTURE (pPicture, stuff->picture, client, SecurityWriteAccess, VERIFY_PICTURE (pPicture, stuff->picture, client, DixWriteAccess,
RenderErrBase + BadPicture); RenderErrBase + BadPicture);
name = (char *) (stuff + 1); name = (char *) (stuff + 1);
params = (xFixed *) (name + ((stuff->nbytes + 3) & ~3)); params = (xFixed *) (name + ((stuff->nbytes + 3) & ~3));
...@@ -1490,7 +1490,7 @@ ProcRenderCreateAnimCursor (ClientPtr client) ...@@ -1490,7 +1490,7 @@ ProcRenderCreateAnimCursor (ClientPtr client)
for (i = 0; i < ncursor; i++) for (i = 0; i < ncursor; i++)
{ {
cursors[i] = (CursorPtr)SecurityLookupIDByType(client, elt->cursor, cursors[i] = (CursorPtr)SecurityLookupIDByType(client, elt->cursor,
RT_CURSOR, SecurityReadAccess); RT_CURSOR, DixReadAccess);
if (!cursors[i]) if (!cursors[i])
{ {
free (cursors); free (cursors);
......
...@@ -503,7 +503,7 @@ ConfigureWindow(register WindowPtr pWin, register Mask mask, XID *vlist, ClientP ...@@ -503,7 +503,7 @@ ConfigureWindow(register WindowPtr pWin, register Mask mask, XID *vlist, ClientP
sibwid = (Window ) *pVlist; sibwid = (Window ) *pVlist;
pVlist++; pVlist++;
pSib = (WindowPtr )SecurityLookupIDByType(client, sibwid, pSib = (WindowPtr )SecurityLookupIDByType(client, sibwid,
RT_WINDOW, SecurityReadAccess); RT_WINDOW, DixReadAccess);
if (!pSib) if (!pSib)
{ {
client->errorValue = sibwid; client->errorValue = sibwid;
......
...@@ -540,7 +540,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) ...@@ -540,7 +540,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
if ((wmHints.flags & IconPixmapHint) && (wmHints.icon_pixmap != None)) if ((wmHints.flags & IconPixmapHint) && (wmHints.icon_pixmap != None))
{ {
PixmapPtr icon = (PixmapPtr)SecurityLookupIDByType(pClient, wmHints.icon_pixmap, PixmapPtr icon = (PixmapPtr)SecurityLookupIDByType(pClient, wmHints.icon_pixmap,
RT_PIXMAP, SecurityDestroyAccess); RT_PIXMAP, DixDestroyAccess);
if (icon) if (icon)
{ {
...@@ -567,7 +567,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) ...@@ -567,7 +567,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
if ((wmHints.flags & IconWindowHint) && (wmHints.icon_window != None)) if ((wmHints.flags & IconWindowHint) && (wmHints.icon_window != None))
{ {
WindowPtr icon = (WindowPtr)SecurityLookupWindow(wmHints.icon_window, pClient, WindowPtr icon = (WindowPtr)SecurityLookupWindow(wmHints.icon_window, pClient,
SecurityDestroyAccess); DixDestroyAccess);
if (icon) if (icon)
{ {
...@@ -589,7 +589,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) ...@@ -589,7 +589,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
if ((wmHints.flags & IconMaskHint) && (wmHints.icon_mask != None)) if ((wmHints.flags & IconMaskHint) && (wmHints.icon_mask != None))
{ {
PixmapPtr icon = (PixmapPtr)SecurityLookupIDByType(pClient, wmHints.icon_mask, PixmapPtr icon = (PixmapPtr)SecurityLookupIDByType(pClient, wmHints.icon_mask,
RT_PIXMAP, SecurityDestroyAccess); RT_PIXMAP, DixDestroyAccess);
if (icon) if (icon)
{ {
...@@ -611,7 +611,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) ...@@ -611,7 +611,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
if ((wmHints.flags & WindowGroupHint) && (wmHints.window_group != None)) if ((wmHints.flags & WindowGroupHint) && (wmHints.window_group != None))
{ {
WindowPtr window = (WindowPtr)SecurityLookupWindow(wmHints.window_group, pClient, WindowPtr window = (WindowPtr)SecurityLookupWindow(wmHints.window_group, pClient,
SecurityDestroyAccess); DixDestroyAccess);
if (window) if (window)
{ {
...@@ -695,7 +695,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) ...@@ -695,7 +695,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
for (i = 0; i < nUnits; i++) for (i = 0; i < nUnits; i++)
{ {
pWindow = (WindowPtr)SecurityLookupWindow(input[i], pClient, pWindow = (WindowPtr)SecurityLookupWindow(input[i], pClient,
SecurityDestroyAccess); DixDestroyAccess);
if ((input[i] != None) && pWindow) if ((input[i] != None) && pWindow)
{ {
wind[i] = nxagentWindow(pWindow); wind[i] = nxagentWindow(pWindow);
......
...@@ -138,13 +138,13 @@ SOFTWARE. ...@@ -138,13 +138,13 @@ SOFTWARE.
} }
#define VERIFY_DRAWABLE(pDraw, did, client)\ #define VERIFY_DRAWABLE(pDraw, did, client)\
SECURITY_VERIFY_DRAWABLE(pDraw, did, client, SecurityUnknownAccess) SECURITY_VERIFY_DRAWABLE(pDraw, did, client, DixUnknownAccess)
#define VERIFY_GEOMETRABLE(pDraw, did, client)\ #define VERIFY_GEOMETRABLE(pDraw, did, client)\
SECURITY_VERIFY_GEOMETRABLE(pDraw, did, client, SecurityUnknownAccess) SECURITY_VERIFY_GEOMETRABLE(pDraw, did, client, DixUnknownAccess)
#define VERIFY_GC(pGC, rid, client)\ #define VERIFY_GC(pGC, rid, client)\
SECURITY_VERIFY_GC(pGC, rid, client, SecurityUnknownAccess) SECURITY_VERIFY_GC(pGC, rid, client, DixUnknownAccess)
#else /* not XCSECURITY */ #else /* not XCSECURITY */
...@@ -255,8 +255,8 @@ SOFTWARE. ...@@ -255,8 +255,8 @@ SOFTWARE.
if ((stuff->gc == INVALID) || (client->lastGCID != stuff->gc) ||\ if ((stuff->gc == INVALID) || (client->lastGCID != stuff->gc) ||\
(client->lastDrawableID != drawID))\ (client->lastDrawableID != drawID))\
{\ {\
SECURITY_VERIFY_GEOMETRABLE(pDraw, drawID, client, SecurityWriteAccess);\ SECURITY_VERIFY_GEOMETRABLE(pDraw, drawID, client, DixWriteAccess);\
SECURITY_VERIFY_GC(pGC, stuff->gc, client, SecurityReadAccess);\ SECURITY_VERIFY_GC(pGC, stuff->gc, client, DixReadAccess);\
if ((pGC->depth != pDraw->depth) ||\ if ((pGC->depth != pDraw->depth) ||\
(pGC->pScreen != pDraw->pScreen))\ (pGC->pScreen != pDraw->pScreen))\
return (BadMatch);\ return (BadMatch);\
......
...@@ -220,10 +220,10 @@ extern void * LookupClientResourceComplex( ...@@ -220,10 +220,10 @@ extern void * LookupClientResourceComplex(
* simultaneously. * simultaneously.
*/ */
#define SecurityUnknownAccess 0 /* don't know intentions */ #define DixUnknownAccess 0 /* don't know intentions */
#define SecurityReadAccess (1<<0) /* inspecting the object */ #define DixReadAccess (1<<0) /* inspecting the object */
#define SecurityWriteAccess (1<<1) /* changing the object */ #define DixWriteAccess (1<<1) /* changing the object */
#define SecurityDestroyAccess (1<<2) /* destroying the object */ #define DixDestroyAccess (1<<2) /* destroying the object */
#ifdef XCSECURITY #ifdef XCSECURITY
......
...@@ -443,12 +443,8 @@ extern _X_EXPORT RESTYPE RRCrtcType, RRModeType, RROutputType, RRProviderType; ...@@ -443,12 +443,8 @@ extern _X_EXPORT RESTYPE RRCrtcType, RRModeType, RROutputType, RRProviderType;
(SecurityLookupIDByType (client, id, \ (SecurityLookupIDByType (client, id, \
RRProviderType, a))) RRProviderType, a)))
#define DixUnknownAccess SecurityUnknownAccess #define DixSetAttrAccess DixWriteAccess
#define DixReadAccess SecurityReadAccess #define DixUseAccess DixWriteAccess
#define DixWriteAccess SecurityWriteAccess
#define DixSetAttrAccess SecurityWriteAccess
#define DixUseAccess SecurityWriteAccess
#define DixDestroyAccess SecurityDestroyAccess
#endif #endif
......
...@@ -87,7 +87,7 @@ ProcRRSelectInput(ClientPtr client) ...@@ -87,7 +87,7 @@ ProcRRSelectInput(ClientPtr client)
#ifndef NXAGENT_SERVER #ifndef NXAGENT_SERVER
rc = dixLookupWindow(&pWin, stuff->window, client, DixReceiveAccess); rc = dixLookupWindow(&pWin, stuff->window, client, DixReceiveAccess);
#else #else
pWin = SecurityLookupWindow(stuff->window, client, SecurityWriteAccess); pWin = SecurityLookupWindow(stuff->window, client, DixWriteAccess);
rc = pWin ? Success : BadWindow; rc = pWin ? Success : BadWindow;
#endif #endif
if (rc != Success) if (rc != Success)
......
...@@ -357,7 +357,7 @@ ProcRRCreateMode(ClientPtr client) ...@@ -357,7 +357,7 @@ ProcRRCreateMode(ClientPtr client)
#ifndef NXAGENT_SERVER #ifndef NXAGENT_SERVER
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
#else #else
pWin = SecurityLookupWindow(stuff->window, client, SecurityReadAccess); pWin = SecurityLookupWindow(stuff->window, client, DixReadAccess);
rc = pWin ? Success : BadWindow; rc = pWin ? Success : BadWindow;
#endif #endif
if (rc != Success) if (rc != Success)
......
...@@ -636,7 +636,7 @@ ProcRRGetMonitors(ClientPtr client) ...@@ -636,7 +636,7 @@ ProcRRGetMonitors(ClientPtr client)
#ifndef NXAGENT_SERVER #ifndef NXAGENT_SERVER
r = dixLookupWindow(&window, stuff->window, client, DixGetAttrAccess); r = dixLookupWindow(&window, stuff->window, client, DixGetAttrAccess);
#else #else
window = SecurityLookupWindow(stuff->window, client, SecurityReadAccess); window = SecurityLookupWindow(stuff->window, client, DixReadAccess);
r = window ? Success : BadWindow; r = window ? Success : BadWindow;
#endif #endif
...@@ -723,7 +723,7 @@ ProcRRSetMonitor(ClientPtr client) ...@@ -723,7 +723,7 @@ ProcRRSetMonitor(ClientPtr client)
#ifndef NXAGENT_SERVER #ifndef NXAGENT_SERVER
r = dixLookupWindow(&window, stuff->window, client, DixGetAttrAccess); r = dixLookupWindow(&window, stuff->window, client, DixGetAttrAccess);
#else #else
window = SecurityLookupWindow(stuff->window, client, SecurityReadAccess); window = SecurityLookupWindow(stuff->window, client, DixReadAccess);
r = window ? Success : BadWindow; r = window ? Success : BadWindow;
#endif #endif
...@@ -772,7 +772,7 @@ ProcRRDeleteMonitor(ClientPtr client) ...@@ -772,7 +772,7 @@ ProcRRDeleteMonitor(ClientPtr client)
#ifndef NXAGENT_SERVER #ifndef NXAGENT_SERVER
r = dixLookupWindow(&window, stuff->window, client, DixGetAttrAccess); r = dixLookupWindow(&window, stuff->window, client, DixGetAttrAccess);
#else #else
window = SecurityLookupWindow(stuff->window, client, SecurityReadAccess); window = SecurityLookupWindow(stuff->window, client, DixReadAccess);
r = window ? Success : BadWindow; r = window ? Success : BadWindow;
#endif #endif
......
...@@ -583,7 +583,7 @@ ProcRRSetOutputPrimary(ClientPtr client) ...@@ -583,7 +583,7 @@ ProcRRSetOutputPrimary(ClientPtr client)
#ifndef NXAGENT_SERVER #ifndef NXAGENT_SERVER
ret = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); ret = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
#else #else
pWin = SecurityLookupWindow(stuff->window, client, SecurityReadAccess); pWin = SecurityLookupWindow(stuff->window, client, DixReadAccess);
ret = pWin ? Success : BadWindow; ret = pWin ? Success : BadWindow;
#endif #endif
...@@ -641,7 +641,7 @@ ProcRRGetOutputPrimary(ClientPtr client) ...@@ -641,7 +641,7 @@ ProcRRGetOutputPrimary(ClientPtr client)
#ifndef NXAGENT_SERVER #ifndef NXAGENT_SERVER
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
#else #else
pWin = SecurityLookupWindow(stuff->window, client, SecurityReadAccess); pWin = SecurityLookupWindow(stuff->window, client, DixReadAccess);
rc = pWin ? Success : BadWindow; rc = pWin ? Success : BadWindow;
#endif #endif
......
...@@ -69,7 +69,7 @@ ProcRRGetProviders(ClientPtr client) ...@@ -69,7 +69,7 @@ ProcRRGetProviders(ClientPtr client)
#ifndef NXAGENT_SERVER #ifndef NXAGENT_SERVER
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
#else #else
pWin = SecurityLookupWindow(stuff->window, client, SecurityReadAccess); pWin = SecurityLookupWindow(stuff->window, client, DixReadAccess);
rc = pWin ? Success : BadWindow; rc = pWin ? Success : BadWindow;
#endif #endif
......
...@@ -222,7 +222,7 @@ ProcRRGetScreenSizeRange(ClientPtr client) ...@@ -222,7 +222,7 @@ ProcRRGetScreenSizeRange(ClientPtr client)
#ifndef NXAGENT_SERVER #ifndef NXAGENT_SERVER
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
#else #else
pWin = SecurityLookupWindow(stuff->window, client, SecurityReadAccess); pWin = SecurityLookupWindow(stuff->window, client, DixReadAccess);
rc = pWin ? Success : BadWindow; rc = pWin ? Success : BadWindow;
#endif #endif
...@@ -276,7 +276,7 @@ ProcRRSetScreenSize(ClientPtr client) ...@@ -276,7 +276,7 @@ ProcRRSetScreenSize(ClientPtr client)
#ifndef NXAGENT_SERVER #ifndef NXAGENT_SERVER
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
#else #else
pWin = SecurityLookupWindow(stuff->window, client, SecurityReadAccess); pWin = SecurityLookupWindow(stuff->window, client, DixReadAccess);
rc = pWin ? Success : BadWindow; rc = pWin ? Success : BadWindow;
#endif #endif
if (rc != Success) if (rc != Success)
...@@ -532,7 +532,7 @@ rrGetScreenResources(ClientPtr client, Bool query) ...@@ -532,7 +532,7 @@ rrGetScreenResources(ClientPtr client, Bool query)
#ifndef NXAGENT_SERVER #ifndef NXAGENT_SERVER
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
#else #else
pWin = SecurityLookupWindow(stuff->window, client, SecurityReadAccess); pWin = SecurityLookupWindow(stuff->window, client, DixReadAccess);
rc = pWin ? Success : BadWindow; rc = pWin ? Success : BadWindow;
#endif #endif
if (rc != Success) if (rc != Success)
...@@ -806,7 +806,7 @@ ProcRRGetScreenInfo(ClientPtr client) ...@@ -806,7 +806,7 @@ ProcRRGetScreenInfo(ClientPtr client)
#ifndef NXAGENT_SERVER #ifndef NXAGENT_SERVER
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
#else #else
pWin = SecurityLookupWindow(stuff->window, client, SecurityReadAccess); pWin = SecurityLookupWindow(stuff->window, client, DixReadAccess);
rc = pWin ? Success : BadWindow; rc = pWin ? Success : BadWindow;
#endif #endif
...@@ -980,7 +980,7 @@ ProcRRSetScreenConfig(ClientPtr client) ...@@ -980,7 +980,7 @@ ProcRRSetScreenConfig(ClientPtr client)
rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixWriteAccess); rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixWriteAccess);
#else /* !defined(NXAGENT_SERVER) */ #else /* !defined(NXAGENT_SERVER) */
pDraw = pDraw =
SecurityLookupDrawable(stuff->drawable, client, SecurityWriteAccess); SecurityLookupDrawable(stuff->drawable, client, DixWriteAccess);
rc = pDraw ? Success : BadDrawable; rc = pDraw ? Success : BadDrawable;
#endif /* !defined(NXAGENT_SERVER) */ #endif /* !defined(NXAGENT_SERVER) */
......
...@@ -150,7 +150,7 @@ ProcRRXineramaGetState(ClientPtr client) ...@@ -150,7 +150,7 @@ ProcRRXineramaGetState(ClientPtr client)
#ifndef NXAGENT_SERVER #ifndef NXAGENT_SERVER
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
#else #else
pWin = SecurityLookupWindow(stuff->window, client, SecurityReadAccess); pWin = SecurityLookupWindow(stuff->window, client, DixReadAccess);
rc = pWin ? Success : BadWindow; rc = pWin ? Success : BadWindow;
#endif #endif
...@@ -205,7 +205,7 @@ ProcRRXineramaGetScreenCount(ClientPtr client) ...@@ -205,7 +205,7 @@ ProcRRXineramaGetScreenCount(ClientPtr client)
#ifndef NXAGENT_SERVER #ifndef NXAGENT_SERVER
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
#else #else
pWin = SecurityLookupWindow(stuff->window, client, SecurityReadAccess); pWin = SecurityLookupWindow(stuff->window, client, DixReadAccess);
rc = pWin ? Success : BadWindow; rc = pWin ? Success : BadWindow;
#endif #endif
if (rc != Success) if (rc != Success)
...@@ -240,7 +240,7 @@ ProcRRXineramaGetScreenSize(ClientPtr client) ...@@ -240,7 +240,7 @@ ProcRRXineramaGetScreenSize(ClientPtr client)
#ifndef NXAGENT_SERVER #ifndef NXAGENT_SERVER
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
#else #else
pWin = SecurityLookupWindow(stuff->window, client, SecurityReadAccess); pWin = SecurityLookupWindow(stuff->window, client, DixReadAccess);
rc = pWin ? Success : BadWindow; rc = pWin ? Success : BadWindow;
#endif #endif
......
...@@ -1210,7 +1210,7 @@ ChangePicture (PicturePtr pPicture, ...@@ -1210,7 +1210,7 @@ ChangePicture (PicturePtr pPicture,
pAlpha = (PicturePtr) SecurityLookupIDByType(client, pAlpha = (PicturePtr) SecurityLookupIDByType(client,
pid, pid,
PictureType, PictureType,
SecurityWriteAccess|SecurityReadAccess); DixWriteAccess|DixReadAccess);
if (!pAlpha) if (!pAlpha)
{ {
client->errorValue = pid; client->errorValue = pid;
...@@ -1271,7 +1271,7 @@ ChangePicture (PicturePtr pPicture, ...@@ -1271,7 +1271,7 @@ ChangePicture (PicturePtr pPicture,
pPixmap = (PixmapPtr)SecurityLookupIDByType(client, pPixmap = (PixmapPtr)SecurityLookupIDByType(client,
pid, pid,
RT_PIXMAP, RT_PIXMAP,
SecurityReadAccess); DixReadAccess);
if (!pPixmap) if (!pPixmap)
{ {
client->errorValue = pid; client->errorValue = pid;
......
...@@ -193,7 +193,7 @@ ProcXFixesSelectCursorInput (ClientPtr client) ...@@ -193,7 +193,7 @@ ProcXFixesSelectCursorInput (ClientPtr client)
REQUEST_SIZE_MATCH (xXFixesSelectCursorInputReq); REQUEST_SIZE_MATCH (xXFixesSelectCursorInputReq);
pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
SecurityReadAccess); DixReadAccess);
if (!pWin) if (!pWin)
return(BadWindow); return(BadWindow);
if (stuff->eventMask & ~CursorAllEvents) if (stuff->eventMask & ~CursorAllEvents)
...@@ -362,7 +362,7 @@ ProcXFixesSetCursorName (ClientPtr client) ...@@ -362,7 +362,7 @@ ProcXFixesSetCursorName (ClientPtr client)
Atom atom; Atom atom;
REQUEST_AT_LEAST_SIZE(xXFixesSetCursorNameReq); REQUEST_AT_LEAST_SIZE(xXFixesSetCursorNameReq);
VERIFY_CURSOR(pCursor, stuff->cursor, client, SecurityWriteAccess); VERIFY_CURSOR(pCursor, stuff->cursor, client, DixWriteAccess);
tchar = (char *) &stuff[1]; tchar = (char *) &stuff[1];
atom = MakeAtom (tchar, stuff->nbytes, TRUE); atom = MakeAtom (tchar, stuff->nbytes, TRUE);
if (atom == BAD_RESOURCE) if (atom == BAD_RESOURCE)
...@@ -394,7 +394,7 @@ ProcXFixesGetCursorName (ClientPtr client) ...@@ -394,7 +394,7 @@ ProcXFixesGetCursorName (ClientPtr client)
int len; int len;
REQUEST_SIZE_MATCH(xXFixesGetCursorNameReq); REQUEST_SIZE_MATCH(xXFixesGetCursorNameReq);
VERIFY_CURSOR(pCursor, stuff->cursor, client, SecurityReadAccess); VERIFY_CURSOR(pCursor, stuff->cursor, client, DixReadAccess);
if (pCursor->name) if (pCursor->name)
str = NameForAtom (pCursor->name); str = NameForAtom (pCursor->name);
else else
...@@ -619,8 +619,8 @@ ProcXFixesChangeCursor (ClientPtr client) ...@@ -619,8 +619,8 @@ ProcXFixesChangeCursor (ClientPtr client)
REQUEST(xXFixesChangeCursorReq); REQUEST(xXFixesChangeCursorReq);
REQUEST_SIZE_MATCH(xXFixesChangeCursorReq); REQUEST_SIZE_MATCH(xXFixesChangeCursorReq);
VERIFY_CURSOR (pSource, stuff->source, client, SecurityReadAccess); VERIFY_CURSOR (pSource, stuff->source, client, DixReadAccess);
VERIFY_CURSOR (pDestination, stuff->destination, client, SecurityWriteAccess); VERIFY_CURSOR (pDestination, stuff->destination, client, DixWriteAccess);
ReplaceCursor (pSource, TestForCursor, (void *) pDestination); ReplaceCursor (pSource, TestForCursor, (void *) pDestination);
return (client->noClientException); return (client->noClientException);
...@@ -653,7 +653,7 @@ ProcXFixesChangeCursorByName (ClientPtr client) ...@@ -653,7 +653,7 @@ ProcXFixesChangeCursorByName (ClientPtr client)
REQUEST(xXFixesChangeCursorByNameReq); REQUEST(xXFixesChangeCursorByNameReq);
REQUEST_FIXED_SIZE(xXFixesChangeCursorByNameReq, stuff->nbytes); REQUEST_FIXED_SIZE(xXFixesChangeCursorByNameReq, stuff->nbytes);
VERIFY_CURSOR(pSource, stuff->source, client, SecurityReadAccess); VERIFY_CURSOR(pSource, stuff->source, client, DixReadAccess);
tchar = (char *) &stuff[1]; tchar = (char *) &stuff[1];
name = MakeAtom (tchar, stuff->nbytes, FALSE); name = MakeAtom (tchar, stuff->nbytes, FALSE);
if (name) if (name)
......
...@@ -117,7 +117,7 @@ ProcXFixesCreateRegionFromBitmap (ClientPtr client) ...@@ -117,7 +117,7 @@ ProcXFixesCreateRegionFromBitmap (ClientPtr client)
pPixmap = (PixmapPtr) SecurityLookupIDByType (client, stuff->bitmap, pPixmap = (PixmapPtr) SecurityLookupIDByType (client, stuff->bitmap,
RT_PIXMAP, RT_PIXMAP,
SecurityReadAccess); DixReadAccess);
if (!pPixmap) if (!pPixmap)
{ {
client->errorValue = stuff->bitmap; client->errorValue = stuff->bitmap;
...@@ -222,7 +222,7 @@ ProcXFixesCreateRegionFromGC (ClientPtr client) ...@@ -222,7 +222,7 @@ ProcXFixesCreateRegionFromGC (ClientPtr client)
REQUEST_SIZE_MATCH (xXFixesCreateRegionFromGCReq); REQUEST_SIZE_MATCH (xXFixesCreateRegionFromGCReq);
LEGAL_NEW_RESOURCE (stuff->region, client); LEGAL_NEW_RESOURCE (stuff->region, client);
SECURITY_VERIFY_GC(pGC, stuff->gc, client, SecurityReadAccess); SECURITY_VERIFY_GC(pGC, stuff->gc, client, DixReadAccess);
switch (pGC->clientClipType) { switch (pGC->clientClipType) {
case CT_PIXMAP: case CT_PIXMAP:
...@@ -269,7 +269,7 @@ ProcXFixesCreateRegionFromPicture (ClientPtr client) ...@@ -269,7 +269,7 @@ ProcXFixesCreateRegionFromPicture (ClientPtr client)
REQUEST_SIZE_MATCH (xXFixesCreateRegionFromPictureReq); REQUEST_SIZE_MATCH (xXFixesCreateRegionFromPictureReq);
LEGAL_NEW_RESOURCE (stuff->region, client); LEGAL_NEW_RESOURCE (stuff->region, client);
VERIFY_PICTURE(pPicture, stuff->picture, client, SecurityReadAccess, VERIFY_PICTURE(pPicture, stuff->picture, client, DixReadAccess,
RenderErrBase + BadPicture); RenderErrBase + BadPicture);
switch (pPicture->clientClipType) { switch (pPicture->clientClipType) {
...@@ -316,7 +316,7 @@ ProcXFixesDestroyRegion (ClientPtr client) ...@@ -316,7 +316,7 @@ ProcXFixesDestroyRegion (ClientPtr client)
RegionPtr pRegion; RegionPtr pRegion;
REQUEST_SIZE_MATCH(xXFixesDestroyRegionReq); REQUEST_SIZE_MATCH(xXFixesDestroyRegionReq);
VERIFY_REGION(pRegion, stuff->region, client, SecurityWriteAccess); VERIFY_REGION(pRegion, stuff->region, client, DixWriteAccess);
FreeResource (stuff->region, RT_NONE); FreeResource (stuff->region, RT_NONE);
return(client->noClientException); return(client->noClientException);
} }
...@@ -340,7 +340,7 @@ ProcXFixesSetRegion (ClientPtr client) ...@@ -340,7 +340,7 @@ ProcXFixesSetRegion (ClientPtr client)
REQUEST (xXFixesSetRegionReq); REQUEST (xXFixesSetRegionReq);
REQUEST_AT_LEAST_SIZE(xXFixesSetRegionReq); REQUEST_AT_LEAST_SIZE(xXFixesSetRegionReq);
VERIFY_REGION(pRegion, stuff->region, client, SecurityWriteAccess); VERIFY_REGION(pRegion, stuff->region, client, DixWriteAccess);
things = (client->req_len << 2) - sizeof (xXFixesCreateRegionReq); things = (client->req_len << 2) - sizeof (xXFixesCreateRegionReq);
if (things & 4) if (things & 4)
...@@ -377,8 +377,8 @@ ProcXFixesCopyRegion (ClientPtr client) ...@@ -377,8 +377,8 @@ ProcXFixesCopyRegion (ClientPtr client)
RegionPtr pSource, pDestination; RegionPtr pSource, pDestination;
REQUEST (xXFixesCopyRegionReq); REQUEST (xXFixesCopyRegionReq);
VERIFY_REGION(pSource, stuff->source, client, SecurityReadAccess); VERIFY_REGION(pSource, stuff->source, client, DixReadAccess);
VERIFY_REGION(pDestination, stuff->destination, client, SecurityWriteAccess); VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess);
if (!RegionCopy(pDestination, pSource)) if (!RegionCopy(pDestination, pSource))
return BadAlloc; return BadAlloc;
...@@ -406,9 +406,9 @@ ProcXFixesCombineRegion (ClientPtr client) ...@@ -406,9 +406,9 @@ ProcXFixesCombineRegion (ClientPtr client)
REQUEST (xXFixesCombineRegionReq); REQUEST (xXFixesCombineRegionReq);
REQUEST_SIZE_MATCH (xXFixesCombineRegionReq); REQUEST_SIZE_MATCH (xXFixesCombineRegionReq);
VERIFY_REGION(pSource1, stuff->source1, client, SecurityReadAccess); VERIFY_REGION(pSource1, stuff->source1, client, DixReadAccess);
VERIFY_REGION(pSource2, stuff->source2, client, SecurityReadAccess); VERIFY_REGION(pSource2, stuff->source2, client, DixReadAccess);
VERIFY_REGION(pDestination, stuff->destination, client, SecurityWriteAccess); VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess);
switch (stuff->xfixesReqType) { switch (stuff->xfixesReqType) {
case X_XFixesUnionRegion: case X_XFixesUnionRegion:
...@@ -452,8 +452,8 @@ ProcXFixesInvertRegion (ClientPtr client) ...@@ -452,8 +452,8 @@ ProcXFixesInvertRegion (ClientPtr client)
REQUEST(xXFixesInvertRegionReq); REQUEST(xXFixesInvertRegionReq);
REQUEST_SIZE_MATCH(xXFixesInvertRegionReq); REQUEST_SIZE_MATCH(xXFixesInvertRegionReq);
VERIFY_REGION(pSource, stuff->source, client, SecurityReadAccess); VERIFY_REGION(pSource, stuff->source, client, DixReadAccess);
VERIFY_REGION(pDestination, stuff->destination, client, SecurityWriteAccess); VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess);
/* Compute bounds, limit to 16 bits */ /* Compute bounds, limit to 16 bits */
bounds.x1 = stuff->x; bounds.x1 = stuff->x;
...@@ -499,7 +499,7 @@ ProcXFixesTranslateRegion (ClientPtr client) ...@@ -499,7 +499,7 @@ ProcXFixesTranslateRegion (ClientPtr client)
REQUEST(xXFixesTranslateRegionReq); REQUEST(xXFixesTranslateRegionReq);
REQUEST_SIZE_MATCH(xXFixesTranslateRegionReq); REQUEST_SIZE_MATCH(xXFixesTranslateRegionReq);
VERIFY_REGION(pRegion, stuff->region, client, SecurityWriteAccess); VERIFY_REGION(pRegion, stuff->region, client, DixWriteAccess);
RegionTranslate(pRegion, stuff->dx, stuff->dy); RegionTranslate(pRegion, stuff->dx, stuff->dy);
return (client->noClientException); return (client->noClientException);
...@@ -525,8 +525,8 @@ ProcXFixesRegionExtents (ClientPtr client) ...@@ -525,8 +525,8 @@ ProcXFixesRegionExtents (ClientPtr client)
REQUEST(xXFixesRegionExtentsReq); REQUEST(xXFixesRegionExtentsReq);
REQUEST_SIZE_MATCH(xXFixesRegionExtentsReq); REQUEST_SIZE_MATCH(xXFixesRegionExtentsReq);
VERIFY_REGION(pSource, stuff->source, client, SecurityReadAccess); VERIFY_REGION(pSource, stuff->source, client, DixReadAccess);
VERIFY_REGION(pDestination, stuff->destination, client, SecurityWriteAccess); VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess);
RegionReset(pDestination, RegionExtents(pSource)); RegionReset(pDestination, RegionExtents(pSource));
...@@ -557,7 +557,7 @@ ProcXFixesFetchRegion (ClientPtr client) ...@@ -557,7 +557,7 @@ ProcXFixesFetchRegion (ClientPtr client)
REQUEST(xXFixesFetchRegionReq); REQUEST(xXFixesFetchRegionReq);
REQUEST_SIZE_MATCH(xXFixesFetchRegionReq); REQUEST_SIZE_MATCH(xXFixesFetchRegionReq);
VERIFY_REGION(pRegion, stuff->region, client, SecurityReadAccess); VERIFY_REGION(pRegion, stuff->region, client, DixReadAccess);
pExtent = RegionExtents(pRegion); pExtent = RegionExtents(pRegion);
pBox = RegionRects (pRegion); pBox = RegionRects (pRegion);
...@@ -618,8 +618,8 @@ ProcXFixesSetGCClipRegion (ClientPtr client) ...@@ -618,8 +618,8 @@ ProcXFixesSetGCClipRegion (ClientPtr client)
REQUEST(xXFixesSetGCClipRegionReq); REQUEST(xXFixesSetGCClipRegionReq);
REQUEST_SIZE_MATCH(xXFixesSetGCClipRegionReq); REQUEST_SIZE_MATCH(xXFixesSetGCClipRegionReq);
SECURITY_VERIFY_GC(pGC, stuff->gc, client, SecurityWriteAccess); SECURITY_VERIFY_GC(pGC, stuff->gc, client, DixWriteAccess);
VERIFY_REGION_OR_NONE (pRegion, stuff->region, client, SecurityReadAccess); VERIFY_REGION_OR_NONE (pRegion, stuff->region, client, DixReadAccess);
if (pRegion) if (pRegion)
{ {
...@@ -669,7 +669,7 @@ ProcXFixesSetWindowShapeRegion (ClientPtr client) ...@@ -669,7 +669,7 @@ ProcXFixesSetWindowShapeRegion (ClientPtr client)
client->errorValue = stuff->dest; client->errorValue = stuff->dest;
return BadWindow; return BadWindow;
} }
VERIFY_REGION_OR_NONE(pRegion, stuff->region, client, SecurityWriteAccess); VERIFY_REGION_OR_NONE(pRegion, stuff->region, client, DixWriteAccess);
pScreen = pWin->drawable.pScreen; pScreen = pWin->drawable.pScreen;
switch (stuff->destKind) { switch (stuff->destKind) {
case ShapeBounding: case ShapeBounding:
...@@ -756,9 +756,9 @@ ProcXFixesSetPictureClipRegion (ClientPtr client) ...@@ -756,9 +756,9 @@ ProcXFixesSetPictureClipRegion (ClientPtr client)
REQUEST(xXFixesSetPictureClipRegionReq); REQUEST(xXFixesSetPictureClipRegionReq);
REQUEST_SIZE_MATCH (xXFixesSetPictureClipRegionReq); REQUEST_SIZE_MATCH (xXFixesSetPictureClipRegionReq);
VERIFY_PICTURE(pPicture, stuff->picture, client, SecurityWriteAccess, VERIFY_PICTURE(pPicture, stuff->picture, client, DixWriteAccess,
RenderErrBase + BadPicture); RenderErrBase + BadPicture);
VERIFY_REGION_OR_NONE(pRegion, stuff->region, client, SecurityReadAccess); VERIFY_REGION_OR_NONE(pRegion, stuff->region, client, DixReadAccess);
return SetPictureClipRegion (pPicture, stuff->xOrigin, stuff->yOrigin, return SetPictureClipRegion (pPicture, stuff->xOrigin, stuff->yOrigin,
pRegion); pRegion);
...@@ -793,8 +793,8 @@ ProcXFixesExpandRegion (ClientPtr client) ...@@ -793,8 +793,8 @@ ProcXFixesExpandRegion (ClientPtr client)
int i; int i;
REQUEST_SIZE_MATCH (xXFixesExpandRegionReq); REQUEST_SIZE_MATCH (xXFixesExpandRegionReq);
VERIFY_REGION(pSource, stuff->source, client, SecurityReadAccess); VERIFY_REGION(pSource, stuff->source, client, DixReadAccess);
VERIFY_REGION(pDestination, stuff->destination, client, SecurityWriteAccess); VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess);
nBoxes = RegionNumRects(pSource); nBoxes = RegionNumRects(pSource);
pSrc = RegionRects(pSource); pSrc = RegionRects(pSource);
......
...@@ -38,7 +38,7 @@ ProcXFixesChangeSaveSet(ClientPtr client) ...@@ -38,7 +38,7 @@ ProcXFixesChangeSaveSet(ClientPtr client)
REQUEST_SIZE_MATCH(xXFixesChangeSaveSetReq); REQUEST_SIZE_MATCH(xXFixesChangeSaveSetReq);
pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
SecurityReadAccess); DixReadAccess);
if (!pWin) if (!pWin)
return(BadWindow); return(BadWindow);
if (client->clientAsMask == (CLIENT_BITS(pWin->drawable.id))) if (client->clientAsMask == (CLIENT_BITS(pWin->drawable.id)))
......
...@@ -198,7 +198,7 @@ ProcXFixesSelectSelectionInput (ClientPtr client) ...@@ -198,7 +198,7 @@ ProcXFixesSelectSelectionInput (ClientPtr client)
REQUEST_SIZE_MATCH (xXFixesSelectSelectionInputReq); REQUEST_SIZE_MATCH (xXFixesSelectSelectionInputReq);
pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
SecurityReadAccess); DixReadAccess);
if (!pWin) if (!pWin)
return(BadWindow); return(BadWindow);
if (stuff->eventMask & ~SelectionAllEvents) if (stuff->eventMask & ~SelectionAllEvents)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment