diff options
Diffstat (limited to 'dix')
-rw-r--r-- | dix/colormap.c | 4 | ||||
-rw-r--r-- | dix/cursor.c | 4 | ||||
-rw-r--r-- | dix/dispatch.c | 118 | ||||
-rw-r--r-- | dix/dixfonts.c | 8 | ||||
-rw-r--r-- | dix/dixutils.c | 6 | ||||
-rw-r--r-- | dix/events.c | 38 | ||||
-rw-r--r-- | dix/gc.c | 8 | ||||
-rw-r--r-- | dix/property.c | 20 | ||||
-rw-r--r-- | dix/resource.c | 4 | ||||
-rw-r--r-- | dix/window.c | 10 |
10 files changed, 110 insertions, 110 deletions
diff --git a/dix/colormap.c b/dix/colormap.c index b8f2f4af6..a74cb390c 100644 --- a/dix/colormap.c +++ b/dix/colormap.c @@ -903,7 +903,7 @@ AllocColor (ColormapPtr pmap, { ColormapPtr prootmap = (ColormapPtr) SecurityLookupIDByType (clients[client], pmap->pScreen->defColormap, - RT_COLORMAP, SecurityReadAccess); + RT_COLORMAP, DixReadAccess); if (pmap->class == prootmap->class) FindColorInRootCmap (prootmap, prootmap->red, entries, &rgb, @@ -920,7 +920,7 @@ AllocColor (ColormapPtr pmap, { ColormapPtr prootmap = (ColormapPtr) SecurityLookupIDByType (clients[client], pmap->pScreen->defColormap, - RT_COLORMAP, SecurityReadAccess); + RT_COLORMAP, DixReadAccess); if (pmap->class == prootmap->class) { diff --git a/dix/cursor.c b/dix/cursor.c index b9ede1f76..7071d8345 100644 --- a/dix/cursor.c +++ b/dix/cursor.c @@ -262,9 +262,9 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, GlyphSharePtr pShare; sourcefont = (FontPtr) SecurityLookupIDByType(client, source, RT_FONT, - SecurityReadAccess); + DixReadAccess); maskfont = (FontPtr) SecurityLookupIDByType(client, mask, RT_FONT, - SecurityReadAccess); + DixReadAccess); if (!sourcefont) { diff --git a/dix/dispatch.c b/dix/dispatch.c index 0a761eb6c..a3de07fed 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -563,7 +563,7 @@ ProcCreateWindow(ClientPtr client) LEGAL_NEW_RESOURCE(stuff->wid, client); if (!(pParent = (WindowPtr)SecurityLookupWindow(stuff->parent, client, - SecurityWriteAccess))) + DixWriteAccess))) return BadWindow; len = client->req_len - (sizeof(xCreateWindowReq) >> 2); if (Ones(stuff->mask) != len) @@ -604,7 +604,7 @@ ProcChangeWindowAttributes(register ClientPtr client) REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq); pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, - SecurityWriteAccess); + DixWriteAccess); if (!pWin) return(BadWindow); len = client->req_len - (sizeof(xChangeWindowAttributesReq) >> 2); @@ -629,7 +629,7 @@ ProcGetWindowAttributes(register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client, - SecurityReadAccess); + DixReadAccess); if (!pWin) return(BadWindow); GetWindowAttributes(pWin, client, &wa); @@ -645,7 +645,7 @@ ProcDestroyWindow(register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client, - SecurityDestroyAccess); + DixDestroyAccess); if (!pWin) return(BadWindow); if (pWin->parent) @@ -661,7 +661,7 @@ ProcDestroySubwindows(register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client, - SecurityDestroyAccess); + DixDestroyAccess); if (!pWin) return(BadWindow); DestroySubwindows(pWin, client); @@ -677,7 +677,7 @@ ProcChangeSaveSet(register ClientPtr client) REQUEST_SIZE_MATCH(xChangeSaveSetReq); pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, - SecurityReadAccess); + DixReadAccess); if (!pWin) return(BadWindow); if (client->clientAsMask == (CLIENT_BITS(pWin->drawable.id))) @@ -706,11 +706,11 @@ ProcReparentWindow(register ClientPtr client) REQUEST_SIZE_MATCH(xReparentWindowReq); pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, - SecurityWriteAccess); + DixWriteAccess); if (!pWin) return(BadWindow); pParent = (WindowPtr)SecurityLookupWindow(stuff->parent, client, - SecurityWriteAccess); + DixWriteAccess); if (!pParent) return(BadWindow); if (SAME_SCREENS(pWin->drawable, pParent->drawable)) @@ -740,7 +740,7 @@ ProcMapWindow(register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client, - SecurityReadAccess); + DixReadAccess); if (!pWin) return(BadWindow); MapWindow(pWin, client); @@ -756,7 +756,7 @@ ProcMapSubwindows(register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pWin = (WindowPtr)SecurityLookupWindow( stuff->id, client, - SecurityReadAccess); + DixReadAccess); if (!pWin) return(BadWindow); MapSubwindows(pWin, client); @@ -772,7 +772,7 @@ ProcUnmapWindow(register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pWin = (WindowPtr)SecurityLookupWindow( stuff->id, client, - SecurityReadAccess); + DixReadAccess); if (!pWin) return(BadWindow); UnmapWindow(pWin, FALSE); @@ -788,7 +788,7 @@ ProcUnmapSubwindows(register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pWin = (WindowPtr)SecurityLookupWindow( stuff->id, client, - SecurityReadAccess); + DixReadAccess); if (!pWin) return(BadWindow); UnmapSubwindows(pWin); @@ -805,7 +805,7 @@ ProcConfigureWindow(register ClientPtr client) REQUEST_AT_LEAST_SIZE(xConfigureWindowReq); pWin = (WindowPtr)SecurityLookupWindow( stuff->window, client, - SecurityWriteAccess); + DixWriteAccess); if (!pWin) return(BadWindow); len = client->req_len - (sizeof(xConfigureWindowReq) >> 2); @@ -833,7 +833,7 @@ ProcCirculateWindow(register ClientPtr client) return BadValue; } pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, - SecurityWriteAccess); + DixWriteAccess); if (!pWin) return(BadWindow); CirculateWindow(pWin, (int)stuff->direction, client); @@ -847,7 +847,7 @@ GetGeometry(register ClientPtr client, xGetGeometryReply *rep) REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); - SECURITY_VERIFY_GEOMETRABLE (pDraw, stuff->id, client, SecurityReadAccess); + SECURITY_VERIFY_GEOMETRABLE (pDraw, stuff->id, client, DixReadAccess); rep->type = X_Reply; rep->length = 0; rep->sequenceNumber = client->sequence; @@ -906,7 +906,7 @@ ProcQueryTree(register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client, - SecurityReadAccess); + DixReadAccess); if (!pWin) return(BadWindow); reply.type = X_Reply; @@ -1022,7 +1022,7 @@ ProcSetSelectionOwner(register ClientPtr client) if (stuff->window != None) { pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, - SecurityReadAccess); + DixReadAccess); if (!pWin) return(BadWindow); } @@ -1141,7 +1141,7 @@ ProcConvertSelection(register ClientPtr client) REQUEST_SIZE_MATCH(xConvertSelectionReq); pWin = (WindowPtr)SecurityLookupWindow(stuff->requestor, client, - SecurityReadAccess); + DixReadAccess); if (!pWin) return(BadWindow); @@ -1159,7 +1159,7 @@ ProcConvertSelection(register ClientPtr client) (CurrentSelections[i].window != None) && XaceHook(XACE_RESOURCE_ACCESS, client, CurrentSelections[i].window, RT_WINDOW, - SecurityReadAccess, CurrentSelections[i].pWin)) + DixReadAccess, CurrentSelections[i].pWin)) { event.u.u.type = SelectionRequest; event.u.selectionRequest.time = stuff->time; @@ -1263,11 +1263,11 @@ ProcTranslateCoords(register ClientPtr client) REQUEST_SIZE_MATCH(xTranslateCoordsReq); pWin = (WindowPtr)SecurityLookupWindow(stuff->srcWid, client, - SecurityReadAccess); + DixReadAccess); if (!pWin) return(BadWindow); pDst = (WindowPtr)SecurityLookupWindow(stuff->dstWid, client, - SecurityReadAccess); + DixReadAccess); if (!pDst) return(BadWindow); rep.type = X_Reply; @@ -1358,7 +1358,7 @@ ProcCloseFont(register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pFont = (FontPtr)SecurityLookupIDByType(client, stuff->id, RT_FONT, - SecurityDestroyAccess); + DixDestroyAccess); if ( pFont != (FontPtr)NULL) /* id was valid */ { FreeResource(stuff->id, RT_NONE); @@ -1382,12 +1382,12 @@ ProcQueryFont(register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); client->errorValue = stuff->id; /* EITHER font or gc */ pFont = (FontPtr)SecurityLookupIDByType(client, stuff->id, RT_FONT, - SecurityReadAccess); + DixReadAccess); if (!pFont) { /* can't use VERIFY_GC because it might return BadGC */ pGC = (GC *) SecurityLookupIDByType(client, stuff->id, RT_GC, - SecurityReadAccess); + DixReadAccess); if (!pGC) { client->errorValue = stuff->id; @@ -1443,11 +1443,11 @@ ProcQueryTextExtents(register ClientPtr client) REQUEST_AT_LEAST_SIZE(xQueryTextExtentsReq); pFont = (FontPtr)SecurityLookupIDByType(client, stuff->fid, RT_FONT, - SecurityReadAccess); + DixReadAccess); if (!pFont) { pGC = (GC *)SecurityLookupIDByType(client, stuff->fid, RT_GC, - SecurityReadAccess); + DixReadAccess); if (!pGC) { client->errorValue = stuff->fid; @@ -1526,7 +1526,7 @@ ProcCreatePixmap(register ClientPtr client) client->errorValue = stuff->pid; LEGAL_NEW_RESOURCE(stuff->pid, client); SECURITY_VERIFY_GEOMETRABLE (pDraw, stuff->drawable, client, - SecurityReadAccess); + DixReadAccess); if (!stuff->width || !stuff->height) { client->errorValue = 0; @@ -1581,7 +1581,7 @@ ProcFreePixmap(register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pMap = (PixmapPtr)SecurityLookupIDByType(client, stuff->id, RT_PIXMAP, - SecurityDestroyAccess); + DixDestroyAccess); if (pMap) { FreeResource(stuff->id, RT_NONE); @@ -1607,7 +1607,7 @@ ProcCreateGC(register ClientPtr client) client->errorValue = stuff->gc; LEGAL_NEW_RESOURCE(stuff->gc, client); SECURITY_VERIFY_DRAWABLE (pDraw, stuff->drawable, client, - SecurityReadAccess); + DixReadAccess); len = client->req_len - (sizeof(xCreateGCReq) >> 2); if (len != Ones(stuff->mask)) return BadLength; @@ -1629,7 +1629,7 @@ ProcChangeGC(register ClientPtr client) unsigned len; REQUEST_AT_LEAST_SIZE(xChangeGCReq); - SECURITY_VERIFY_GC(pGC, stuff->gc, client, SecurityWriteAccess); + SECURITY_VERIFY_GC(pGC, stuff->gc, client, DixWriteAccess); len = client->req_len - (sizeof(xChangeGCReq) >> 2); if (len != Ones(stuff->mask)) return BadLength; @@ -1653,8 +1653,8 @@ ProcCopyGC(register ClientPtr client) REQUEST(xCopyGCReq); REQUEST_SIZE_MATCH(xCopyGCReq); - SECURITY_VERIFY_GC( pGC, stuff->srcGC, client, SecurityReadAccess); - SECURITY_VERIFY_GC( dstGC, stuff->dstGC, client, SecurityWriteAccess); + SECURITY_VERIFY_GC( pGC, stuff->srcGC, client, DixReadAccess); + SECURITY_VERIFY_GC( dstGC, stuff->dstGC, client, DixWriteAccess); if ((dstGC->pScreen != pGC->pScreen) || (dstGC->depth != pGC->depth)) return (BadMatch); result = CopyGC(pGC, dstGC, stuff->mask); @@ -1681,7 +1681,7 @@ ProcSetDashes(register ClientPtr client) return BadValue; } - SECURITY_VERIFY_GC(pGC,stuff->gc, client, SecurityWriteAccess); + SECURITY_VERIFY_GC(pGC,stuff->gc, client, DixWriteAccess); result = SetDashes(pGC, stuff->dashOffset, stuff->nDashes, (unsigned char *)&stuff[1]); @@ -1709,7 +1709,7 @@ ProcSetClipRectangles(register ClientPtr client) client->errorValue = stuff->ordering; return BadValue; } - SECURITY_VERIFY_GC(pGC,stuff->gc, client, SecurityWriteAccess); + SECURITY_VERIFY_GC(pGC,stuff->gc, client, DixWriteAccess); nr = (client->req_len << 2) - sizeof(xSetClipRectanglesReq); if (nr & 4) @@ -1730,7 +1730,7 @@ ProcFreeGC(register ClientPtr client) REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); - SECURITY_VERIFY_GC(pGC, stuff->id, client, SecurityDestroyAccess); + SECURITY_VERIFY_GC(pGC, stuff->id, client, DixDestroyAccess); FreeResource(stuff->id, RT_NONE); return(client->noClientException); } @@ -1743,7 +1743,7 @@ ProcClearToBackground(register ClientPtr client) REQUEST_SIZE_MATCH(xClearAreaReq); pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, - SecurityWriteAccess); + DixWriteAccess); if (!pWin) return(BadWindow); if (pWin->drawable.class == InputOnly) @@ -1777,7 +1777,7 @@ ProcCopyArea(register ClientPtr client) if (stuff->dstDrawable != stuff->srcDrawable) { SECURITY_VERIFY_DRAWABLE(pSrc, stuff->srcDrawable, client, - SecurityReadAccess); + DixReadAccess); if ((pDst->pScreen != pSrc->pScreen) || (pDst->depth != pSrc->depth)) { client->errorValue = stuff->dstDrawable; @@ -1817,7 +1817,7 @@ ProcCopyPlane(register ClientPtr client) if (stuff->dstDrawable != stuff->srcDrawable) { SECURITY_VERIFY_DRAWABLE(psrcDraw, stuff->srcDrawable, client, - SecurityReadAccess); + DixReadAccess); if (pdstDraw->pScreen != psrcDraw->pScreen) { client->errorValue = stuff->dstDrawable; @@ -2156,7 +2156,7 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable, client->errorValue = format; return(BadValue); } - SECURITY_VERIFY_DRAWABLE(pDraw, drawable, client, SecurityReadAccess); + SECURITY_VERIFY_DRAWABLE(pDraw, drawable, client, DixReadAccess); if(pDraw->type == DRAWABLE_WINDOW) { if( /* check for being viewable */ @@ -2478,7 +2478,7 @@ ProcCreateColormap(register ClientPtr client) mid = stuff->mid; LEGAL_NEW_RESOURCE(mid, client); pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, - SecurityReadAccess); + DixReadAccess); if (!pWin) return(BadWindow); @@ -2508,7 +2508,7 @@ ProcFreeColormap(register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pmap = (ColormapPtr )SecurityLookupIDByType(client, stuff->id, RT_COLORMAP, - SecurityDestroyAccess); + DixDestroyAccess); if (pmap) { /* Freeing a default colormap is a no-op */ @@ -2536,7 +2536,7 @@ ProcCopyColormapAndFree(register ClientPtr client) mid = stuff->mid; LEGAL_NEW_RESOURCE(mid, client); if( (pSrcMap = (ColormapPtr )SecurityLookupIDByType(client, stuff->srcCmap, - RT_COLORMAP, SecurityReadAccess|SecurityWriteAccess)) ) + RT_COLORMAP, DixReadAccess|DixWriteAccess)) ) { result = CopyColormapAndFree(mid, pSrcMap, client->index); if (client->noClientException != Success) @@ -2559,7 +2559,7 @@ ProcInstallColormap(register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->id, - RT_COLORMAP, SecurityReadAccess); + RT_COLORMAP, DixReadAccess); if (pcmp) { (*(pcmp->pScreen->InstallColormap)) (pcmp); @@ -2580,7 +2580,7 @@ ProcUninstallColormap(register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->id, - RT_COLORMAP, SecurityReadAccess); + RT_COLORMAP, DixReadAccess); if (pcmp) { if(pcmp->mid != pcmp->pScreen->defColormap) @@ -2604,7 +2604,7 @@ ProcListInstalledColormaps(register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client, - SecurityReadAccess); + DixReadAccess); if (!pWin) return(BadWindow); @@ -2639,7 +2639,7 @@ ProcAllocColor (register ClientPtr client) REQUEST_SIZE_MATCH(xAllocColorReq); pmap = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, - RT_COLORMAP, SecurityWriteAccess); + RT_COLORMAP, DixWriteAccess); if (pmap) { acr.type = X_Reply; @@ -2679,7 +2679,7 @@ ProcAllocNamedColor (register ClientPtr client) REQUEST_FIXED_SIZE(xAllocNamedColorReq, stuff->nbytes); pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, - RT_COLORMAP, SecurityWriteAccess); + RT_COLORMAP, DixWriteAccess); if (pcmp) { int retval; @@ -2731,7 +2731,7 @@ ProcAllocColorCells (register ClientPtr client) REQUEST_SIZE_MATCH(xAllocColorCellsReq); pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, - RT_COLORMAP, SecurityWriteAccess); + RT_COLORMAP, DixWriteAccess); if (pcmp) { xAllocColorCellsReply accr; @@ -2797,7 +2797,7 @@ ProcAllocColorPlanes(register ClientPtr client) REQUEST_SIZE_MATCH(xAllocColorPlanesReq); pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, - RT_COLORMAP, SecurityWriteAccess); + RT_COLORMAP, DixWriteAccess); if (pcmp) { xAllocColorPlanesReply acpr; @@ -2861,7 +2861,7 @@ ProcFreeColors(register ClientPtr client) REQUEST_AT_LEAST_SIZE(xFreeColorsReq); pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, - RT_COLORMAP, SecurityWriteAccess); + RT_COLORMAP, DixWriteAccess); if (pcmp) { int count; @@ -2896,7 +2896,7 @@ ProcStoreColors (ClientPtr client) REQUEST_AT_LEAST_SIZE(xStoreColorsReq); pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, - RT_COLORMAP, SecurityWriteAccess); + RT_COLORMAP, DixWriteAccess); if (pcmp) { int count; @@ -2930,7 +2930,7 @@ ProcStoreNamedColor (register ClientPtr client) REQUEST_FIXED_SIZE(xStoreNamedColorReq, stuff->nbytes); pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, - RT_COLORMAP, SecurityWriteAccess); + RT_COLORMAP, DixWriteAccess); if (pcmp) { xColorItem def; @@ -2964,7 +2964,7 @@ ProcQueryColors(register ClientPtr client) REQUEST_AT_LEAST_SIZE(xQueryColorsReq); pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, - RT_COLORMAP, SecurityReadAccess); + RT_COLORMAP, DixReadAccess); if (pcmp) { int count, retval; @@ -3015,7 +3015,7 @@ ProcLookupColor(register ClientPtr client) REQUEST_FIXED_SIZE(xLookupColorReq, stuff->nbytes); pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, - RT_COLORMAP, SecurityReadAccess); + RT_COLORMAP, DixReadAccess); if (pcmp) { xLookupColorReply lcr; @@ -3065,9 +3065,9 @@ ProcCreateCursor (register ClientPtr client) LEGAL_NEW_RESOURCE(stuff->cid, client); src = (PixmapPtr)SecurityLookupIDByType(client, stuff->source, - RT_PIXMAP, SecurityReadAccess); + RT_PIXMAP, DixReadAccess); msk = (PixmapPtr)SecurityLookupIDByType(client, stuff->mask, - RT_PIXMAP, SecurityReadAccess); + RT_PIXMAP, DixReadAccess); if ( src == (PixmapPtr)NULL) { client->errorValue = stuff->source; @@ -3167,7 +3167,7 @@ ProcFreeCursor (register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pCursor = (CursorPtr)SecurityLookupIDByType(client, stuff->id, - RT_CURSOR, SecurityDestroyAccess); + RT_CURSOR, DixDestroyAccess); if (pCursor) { FreeResource(stuff->id, RT_NONE); @@ -3197,7 +3197,7 @@ ProcQueryBestSize (register ClientPtr client) return(BadValue); } SECURITY_VERIFY_GEOMETRABLE (pDraw, stuff->drawable, client, - SecurityReadAccess); + DixReadAccess); if (stuff->class != CursorShape && pDraw->type == UNDRAWABLE_WINDOW) return (BadMatch); pScreen = pDraw->pScreen; @@ -3321,7 +3321,7 @@ ProcListHosts(register ClientPtr client) REQUEST_SIZE_MATCH(xListHostsReq); /* untrusted clients can't list hosts */ - if (!XaceHook(XACE_HOSTLIST_ACCESS, client, SecurityReadAccess)) + if (!XaceHook(XACE_HOSTLIST_ACCESS, client, DixReadAccess)) return BadAccess; result = GetHosts(&pdata, &nHosts, &len, &reply.enabled); diff --git a/dix/dixfonts.c b/dix/dixfonts.c index 7e2ed5058..d5b42dcf6 100644 --- a/dix/dixfonts.c +++ b/dix/dixfonts.c @@ -1178,7 +1178,7 @@ doPolyText(ClientPtr client, register PTclosurePtr c) if (c->slept && c->pDraw && c->pDraw != (DrawablePtr)SecurityLookupIDByClass(client, c->did, - RC_DRAWABLE, SecurityWriteAccess)) + RC_DRAWABLE, DixWriteAccess)) { /* Our drawable has disappeared. Treat like client died... ask the FPE code to clean up after client and avoid further @@ -1208,7 +1208,7 @@ doPolyText(ClientPtr client, register PTclosurePtr c) | ((Font)*(c->pElt+2)) << 16 | ((Font)*(c->pElt+1)) << 24; pFont = (FontPtr)SecurityLookupIDByType(client, fid, RT_FONT, - SecurityReadAccess); + DixReadAccess); if (!pFont) { client->errorValue = fid; @@ -1463,7 +1463,7 @@ doImageText(ClientPtr client, register ITclosurePtr c) if (c->slept && c->pDraw && c->pDraw != (DrawablePtr)SecurityLookupIDByClass(client, c->did, - RC_DRAWABLE, SecurityWriteAccess)) + RC_DRAWABLE, DixWriteAccess)) { /* Our drawable has disappeared. Treat like client died... ask the FPE code to clean up after client. */ @@ -2016,7 +2016,7 @@ FontPtr find_old_font(XID id) { return (FontPtr) SecurityLookupIDByType(NullClient, id, RT_NONE, - SecurityUnknownAccess); + DixUnknownAccess); } Font diff --git a/dix/dixutils.c b/dix/dixutils.c index af7e1c8f1..fca55d99f 100644 --- a/dix/dixutils.c +++ b/dix/dixutils.c @@ -236,13 +236,13 @@ SecurityLookupDrawable(XID rid, ClientPtr client, Mask access_mode) _X_EXPORT WindowPtr LookupWindow(XID rid, ClientPtr client) { - return SecurityLookupWindow(rid, client, SecurityUnknownAccess); + return SecurityLookupWindow(rid, client, DixUnknownAccess); } _X_EXPORT pointer LookupDrawable(XID rid, ClientPtr client) { - return SecurityLookupDrawable(rid, client, SecurityUnknownAccess); + return SecurityLookupDrawable(rid, client, DixUnknownAccess); } #else /* not XACE */ @@ -293,7 +293,7 @@ _X_EXPORT ClientPtr LookupClient(XID rid, ClientPtr client) { pointer pRes = (pointer)SecurityLookupIDByClass(client, rid, RC_ANY, - SecurityReadAccess); + DixReadAccess); int clientIndex = CLIENT_ID(rid); if (clientIndex && pRes && clients[clientIndex] && !(rid & SERVER_BIT)) diff --git a/dix/events.c b/dix/events.c index 0a39dcd9e..c7cf73e46 100644 --- a/dix/events.c +++ b/dix/events.c @@ -2235,7 +2235,7 @@ XineramaWarpPointer(ClientPtr client) if (stuff->dstWid != None) { - dest = SecurityLookupWindow(stuff->dstWid, client, SecurityReadAccess); + dest = SecurityLookupWindow(stuff->dstWid, client, DixReadAccess); if (!dest) return BadWindow; } @@ -2248,7 +2248,7 @@ XineramaWarpPointer(ClientPtr client) XID winID = stuff->srcWid; WindowPtr source; - source = SecurityLookupWindow(winID, client, SecurityReadAccess); + source = SecurityLookupWindow(winID, client, DixReadAccess); if (!source) return BadWindow; winX = source->drawable.x; @@ -2315,7 +2315,7 @@ ProcWarpPointer(ClientPtr client) if (stuff->dstWid != None) { - dest = SecurityLookupWindow(stuff->dstWid, client, SecurityReadAccess); + dest = SecurityLookupWindow(stuff->dstWid, client, DixReadAccess); if (!dest) return BadWindow; } @@ -2328,7 +2328,7 @@ ProcWarpPointer(ClientPtr client) XID winID = stuff->srcWid; WindowPtr source; - source = SecurityLookupWindow(winID, client, SecurityReadAccess); + source = SecurityLookupWindow(winID, client, DixReadAccess); if (!source) return BadWindow; winX = source->drawable.x; @@ -3551,7 +3551,7 @@ SetInputFocus( else if ((focusID == FollowKeyboard) && followOK) focusWin = inputInfo.keyboard->focus->win; else if (!(focusWin = SecurityLookupWindow(focusID, client, - SecurityReadAccess))) + DixReadAccess))) return BadWindow; else { @@ -3671,7 +3671,7 @@ ProcGrabPointer(ClientPtr client) client->errorValue = stuff->eventMask; return BadValue; } - pWin = SecurityLookupWindow(stuff->grabWindow, client, SecurityReadAccess); + pWin = SecurityLookupWindow(stuff->grabWindow, client, DixReadAccess); if (!pWin) return BadWindow; if (stuff->confineTo == None) @@ -3679,7 +3679,7 @@ ProcGrabPointer(ClientPtr client) else { confineTo = SecurityLookupWindow(stuff->confineTo, client, - SecurityReadAccess); + DixReadAccess); if (!confineTo) return BadWindow; } @@ -3688,7 +3688,7 @@ ProcGrabPointer(ClientPtr client) else { cursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor, - RT_CURSOR, SecurityReadAccess); + RT_CURSOR, DixReadAccess); if (!cursor) { client->errorValue = stuff->cursor; @@ -3762,7 +3762,7 @@ ProcChangeActivePointerGrab(ClientPtr client) else { newCursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor, - RT_CURSOR, SecurityReadAccess); + RT_CURSOR, DixReadAccess); if (!newCursor) { client->errorValue = stuff->cursor; @@ -3832,7 +3832,7 @@ GrabDevice(register ClientPtr client, register DeviceIntPtr dev, client->errorValue = ownerEvents; return BadValue; } - pWin = SecurityLookupWindow(grabWindow, client, SecurityReadAccess); + pWin = SecurityLookupWindow(grabWindow, client, DixReadAccess); if (!pWin) return BadWindow; time = ClientTimeToServerTime(ctime); @@ -3920,7 +3920,7 @@ ProcQueryPointer(ClientPtr client) DeviceIntPtr mouse = inputInfo.pointer; REQUEST_SIZE_MATCH(xResourceReq); - pWin = SecurityLookupWindow(stuff->id, client, SecurityReadAccess); + pWin = SecurityLookupWindow(stuff->id, client, DixReadAccess); if (!pWin) return BadWindow; if (mouse->valuator->motionHintWindow) @@ -4087,7 +4087,7 @@ ProcSendEvent(ClientPtr client) } else pWin = SecurityLookupWindow(stuff->destination, client, - SecurityReadAccess); + DixReadAccess); if (!pWin) return BadWindow; if ((stuff->propagate != xFalse) && (stuff->propagate != xTrue)) @@ -4125,7 +4125,7 @@ ProcUngrabKey(ClientPtr client) DeviceIntPtr keybd = inputInfo.keyboard; REQUEST_SIZE_MATCH(xUngrabKeyReq); - pWin = SecurityLookupWindow(stuff->grabWindow, client, SecurityReadAccess); + pWin = SecurityLookupWindow(stuff->grabWindow, client, DixReadAccess); if (!pWin) return BadWindow; @@ -4196,7 +4196,7 @@ ProcGrabKey(ClientPtr client) client->errorValue = stuff->modifiers; return BadValue; } - pWin = SecurityLookupWindow(stuff->grabWindow, client, SecurityReadAccess); + pWin = SecurityLookupWindow(stuff->grabWindow, client, DixReadAccess); if (!pWin) return BadWindow; @@ -4248,14 +4248,14 @@ ProcGrabButton(ClientPtr client) client->errorValue = stuff->eventMask; return BadValue; } - pWin = SecurityLookupWindow(stuff->grabWindow, client, SecurityReadAccess); + pWin = SecurityLookupWindow(stuff->grabWindow, client, DixReadAccess); if (!pWin) return BadWindow; if (stuff->confineTo == None) confineTo = NullWindow; else { confineTo = SecurityLookupWindow(stuff->confineTo, client, - SecurityReadAccess); + DixReadAccess); if (!confineTo) return BadWindow; } @@ -4264,7 +4264,7 @@ ProcGrabButton(ClientPtr client) else { cursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor, - RT_CURSOR, SecurityReadAccess); + RT_CURSOR, DixReadAccess); if (!cursor) { client->errorValue = stuff->cursor; @@ -4297,7 +4297,7 @@ ProcUngrabButton(ClientPtr client) client->errorValue = stuff->modifiers; return BadValue; } - pWin = SecurityLookupWindow(stuff->grabWindow, client, SecurityReadAccess); + pWin = SecurityLookupWindow(stuff->grabWindow, client, DixReadAccess); if (!pWin) return BadWindow; tempGrab.resource = client->clientAsMask; @@ -4451,7 +4451,7 @@ ProcRecolorCursor(ClientPtr client) REQUEST_SIZE_MATCH(xRecolorCursorReq); pCursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor, - RT_CURSOR, SecurityWriteAccess); + RT_CURSOR, DixWriteAccess); if ( !pCursor) { client->errorValue = stuff->cursor; @@ -271,7 +271,7 @@ dixChangeGC(ClientPtr client, register GC *pGC, register BITS32 mask, CARD32 *pC { NEXTVAL(XID, newpix); pPixmap = (PixmapPtr)SecurityLookupIDByType(client, - newpix, RT_PIXMAP, SecurityReadAccess); + newpix, RT_PIXMAP, DixReadAccess); } if (pPixmap) { @@ -307,7 +307,7 @@ dixChangeGC(ClientPtr client, register GC *pGC, register BITS32 mask, CARD32 *pC { NEXTVAL(XID, newstipple) pPixmap = (PixmapPtr)SecurityLookupIDByType(client, - newstipple, RT_PIXMAP, SecurityReadAccess); + newstipple, RT_PIXMAP, DixReadAccess); } if (pPixmap) { @@ -349,7 +349,7 @@ dixChangeGC(ClientPtr client, register GC *pGC, register BITS32 mask, CARD32 *pC { NEXTVAL(XID, newfont) pFont = (FontPtr)SecurityLookupIDByType(client, newfont, - RT_FONT, SecurityReadAccess); + RT_FONT, DixReadAccess); } if (pFont) { @@ -416,7 +416,7 @@ dixChangeGC(ClientPtr client, register GC *pGC, register BITS32 mask, CARD32 *pC } else pPixmap = (PixmapPtr)SecurityLookupIDByType(client, - pid, RT_PIXMAP, SecurityReadAccess); + pid, RT_PIXMAP, DixReadAccess); } if (pPixmap) diff --git a/dix/property.c b/dix/property.c index 00d485655..5c1e957a5 100644 --- a/dix/property.c +++ b/dix/property.c @@ -105,7 +105,7 @@ ProcRotateProperties(ClientPtr client) REQUEST_FIXED_SIZE(xRotatePropertiesReq, stuff->nAtoms << 2); UpdateCurrentTime(); pWin = (WindowPtr) SecurityLookupWindow(stuff->window, client, - SecurityWriteAccess); + DixWriteAccess); if (!pWin) return(BadWindow); if (!stuff->nAtoms) @@ -117,7 +117,7 @@ ProcRotateProperties(ClientPtr client) for (i = 0; i < stuff->nAtoms; i++) { char action = XaceHook(XACE_PROPERTY_ACCESS, client, pWin, atoms[i], - SecurityReadAccess|SecurityWriteAccess); + DixReadAccess|DixWriteAccess); if (!ValidAtom(atoms[i]) || (XaceErrorOperation == action)) { DEALLOCATE_LOCAL(props); @@ -209,7 +209,7 @@ ProcChangeProperty(ClientPtr client) REQUEST_FIXED_SIZE(xChangePropertyReq, totalSize); pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, - SecurityWriteAccess); + DixWriteAccess); if (!pWin) return(BadWindow); if (!ValidAtom(stuff->property)) @@ -224,7 +224,7 @@ ProcChangeProperty(ClientPtr client) } switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, stuff->property, - SecurityWriteAccess)) + DixWriteAccess)) { case XaceErrorOperation: client->errorValue = stuff->property; @@ -448,14 +448,14 @@ ProcGetProperty(ClientPtr client) unsigned long n, len, ind; WindowPtr pWin; xGetPropertyReply reply; - Mask access_mode = SecurityReadAccess; + Mask access_mode = DixReadAccess; REQUEST(xGetPropertyReq); REQUEST_SIZE_MATCH(xGetPropertyReq); if (stuff->delete) UpdateCurrentTime(); pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, - SecurityReadAccess); + DixReadAccess); if (!pWin) return BadWindow; @@ -491,7 +491,7 @@ ProcGetProperty(ClientPtr client) return NullPropertyReply(client, None, 0, &reply); if (stuff->delete) - access_mode |= SecurityDestroyAccess; + access_mode |= DixDestroyAccess; switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, stuff->property, access_mode)) { @@ -592,7 +592,7 @@ ProcListProperties(ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client, - SecurityReadAccess); + DixReadAccess); if (!pWin) return(BadWindow); @@ -637,7 +637,7 @@ ProcDeleteProperty(register ClientPtr client) REQUEST_SIZE_MATCH(xDeletePropertyReq); UpdateCurrentTime(); pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, - SecurityWriteAccess); + DixWriteAccess); if (!pWin) return(BadWindow); if (!ValidAtom(stuff->property)) @@ -647,7 +647,7 @@ ProcDeleteProperty(register ClientPtr client) } switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, stuff->property, - SecurityDestroyAccess)) + DixDestroyAccess)) { case XaceErrorOperation: client->errorValue = stuff->property; diff --git a/dix/resource.c b/dix/resource.c index c2044601f..4468f4575 100644 --- a/dix/resource.c +++ b/dix/resource.c @@ -944,12 +944,12 @@ _X_EXPORT pointer LookupIDByType(XID id, RESTYPE rtype) { return SecurityLookupIDByType(NullClient, id, rtype, - SecurityUnknownAccess); + DixUnknownAccess); } _X_EXPORT pointer LookupIDByClass(XID id, RESTYPE classes) { return SecurityLookupIDByClass(NullClient, id, classes, - SecurityUnknownAccess); + DixUnknownAccess); } diff --git a/dix/window.c b/dix/window.c index fa6906f2a..e33140dd4 100644 --- a/dix/window.c +++ b/dix/window.c @@ -1062,7 +1062,7 @@ ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPt else { pPixmap = (PixmapPtr)SecurityLookupIDByType(client, pixID, - RT_PIXMAP, SecurityReadAccess); + RT_PIXMAP, DixReadAccess); if (pPixmap != (PixmapPtr) NULL) { if ((pPixmap->drawable.depth != pWin->drawable.depth) || @@ -1123,7 +1123,7 @@ ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPt else { pPixmap = (PixmapPtr)SecurityLookupIDByType(client, pixID, - RT_PIXMAP, SecurityReadAccess); + RT_PIXMAP, DixReadAccess); if (pPixmap) { if ((pPixmap->drawable.depth != pWin->drawable.depth) || @@ -1333,7 +1333,7 @@ ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPt goto PatchUp; } pCmap = (ColormapPtr)SecurityLookupIDByType(client, cmap, - RT_COLORMAP, SecurityReadAccess); + RT_COLORMAP, DixReadAccess); if (!pCmap) { error = BadColor; @@ -1409,7 +1409,7 @@ ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPt else { pCursor = (CursorPtr)SecurityLookupIDByType(client, cursorID, - RT_CURSOR, SecurityReadAccess); + RT_CURSOR, DixReadAccess); if (!pCursor) { error = BadCursor; @@ -2299,7 +2299,7 @@ ConfigureWindow(register WindowPtr pWin, register Mask mask, XID *vlist, ClientP sibwid = (Window ) *pVlist; pVlist++; pSib = (WindowPtr )SecurityLookupIDByType(client, sibwid, - RT_WINDOW, SecurityReadAccess); + RT_WINDOW, DixReadAccess); if (!pSib) { client->errorValue = sibwid; |