From 104a3e9e2dbafd31e7b1def3686d052a356fc74a Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Wed, 15 Feb 2017 09:59:00 +0100 Subject: Naming change: Security*Access -> Dix*Access Backported from X.org: commit 6c46645cfc1afda8aeabfe0ed4d9342673b702f1 Author: Eamon Walsh Date: Thu Dec 14 14:45:42 2006 -0500 Naming change: Security*Access -> Dix*Access Backported-to-NX-by: Mike Gabriel --- nx-X11/programs/Xserver/dix/colormap.c | 4 +- nx-X11/programs/Xserver/dix/cursor.c | 4 +- nx-X11/programs/Xserver/dix/dispatch.c | 116 ++++++++++++++++----------------- nx-X11/programs/Xserver/dix/dixfonts.c | 8 +-- nx-X11/programs/Xserver/dix/dixutils.c | 6 +- nx-X11/programs/Xserver/dix/events.c | 38 +++++------ nx-X11/programs/Xserver/dix/gc.c | 8 +-- nx-X11/programs/Xserver/dix/property.c | 20 +++--- nx-X11/programs/Xserver/dix/resource.c | 4 +- nx-X11/programs/Xserver/dix/window.c | 10 +-- 10 files changed, 109 insertions(+), 109 deletions(-) (limited to 'nx-X11/programs/Xserver/dix') diff --git a/nx-X11/programs/Xserver/dix/colormap.c b/nx-X11/programs/Xserver/dix/colormap.c index b8361a9cf..8b0e1e421 100644 --- a/nx-X11/programs/Xserver/dix/colormap.c +++ b/nx-X11/programs/Xserver/dix/colormap.c @@ -892,7 +892,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, @@ -909,7 +909,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/nx-X11/programs/Xserver/dix/cursor.c b/nx-X11/programs/Xserver/dix/cursor.c index 093464298..a1bf6a7ed 100644 --- a/nx-X11/programs/Xserver/dix/cursor.c +++ b/nx-X11/programs/Xserver/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/nx-X11/programs/Xserver/dix/dispatch.c b/nx-X11/programs/Xserver/dix/dispatch.c index 2c7550371..02d5170fb 100644 --- a/nx-X11/programs/Xserver/dix/dispatch.c +++ b/nx-X11/programs/Xserver/dix/dispatch.c @@ -491,7 +491,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) @@ -532,7 +532,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); @@ -557,7 +557,7 @@ ProcGetWindowAttributes(register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client, - SecurityReadAccess); + DixReadAccess); if (!pWin) return(BadWindow); memset(&wa, 0, sizeof(xGetWindowAttributesReply)); @@ -574,7 +574,7 @@ ProcDestroyWindow(register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client, - SecurityDestroyAccess); + DixDestroyAccess); if (!pWin) return(BadWindow); if (pWin->parent) @@ -590,7 +590,7 @@ ProcDestroySubwindows(register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client, - SecurityDestroyAccess); + DixDestroyAccess); if (!pWin) return(BadWindow); DestroySubwindows(pWin, client); @@ -606,7 +606,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))) @@ -636,11 +636,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)) @@ -671,7 +671,7 @@ ProcMapWindow(register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client, - SecurityReadAccess); + DixReadAccess); if (!pWin) return(BadWindow); MapWindow(pWin, client); @@ -687,7 +687,7 @@ ProcMapSubwindows(register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pWin = (WindowPtr)SecurityLookupWindow( stuff->id, client, - SecurityReadAccess); + DixReadAccess); if (!pWin) return(BadWindow); MapSubwindows(pWin, client); @@ -703,7 +703,7 @@ ProcUnmapWindow(register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pWin = (WindowPtr)SecurityLookupWindow( stuff->id, client, - SecurityReadAccess); + DixReadAccess); if (!pWin) return(BadWindow); UnmapWindow(pWin, FALSE); @@ -719,7 +719,7 @@ ProcUnmapSubwindows(register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pWin = (WindowPtr)SecurityLookupWindow( stuff->id, client, - SecurityReadAccess); + DixReadAccess); if (!pWin) return(BadWindow); UnmapSubwindows(pWin); @@ -736,7 +736,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); @@ -764,7 +764,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); @@ -778,7 +778,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); memset(rep, 0, sizeof(xGetGeometryReply)); rep->type = X_Reply; rep->length = 0; @@ -839,7 +839,7 @@ ProcQueryTree(register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client, - SecurityReadAccess); + DixReadAccess); if (!pWin) return(BadWindow); memset(&reply, 0, sizeof(xQueryTreeReply)); @@ -957,7 +957,7 @@ ProcSetSelectionOwner(register ClientPtr client) if (stuff->window != None) { pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, - SecurityReadAccess); + DixReadAccess); if (!pWin) return(BadWindow); } @@ -1079,7 +1079,7 @@ ProcConvertSelection(register ClientPtr client) REQUEST_SIZE_MATCH(xConvertSelectionReq); pWin = (WindowPtr)SecurityLookupWindow(stuff->requestor, client, - SecurityReadAccess); + DixReadAccess); if (!pWin) return(BadWindow); @@ -1098,7 +1098,7 @@ ProcConvertSelection(register ClientPtr client) #ifdef XCSECURITY && (!client->CheckAccess || (* client->CheckAccess)(client, CurrentSelections[i].window, - RT_WINDOW, SecurityReadAccess, + RT_WINDOW, DixReadAccess, CurrentSelections[i].pWin)) #endif ) @@ -1208,11 +1208,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); memset(&rep, 0, sizeof(xTranslateCoordsReply)); @@ -1305,7 +1305,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); @@ -1331,12 +1331,12 @@ ProcQueryFont(register ClientPtr client) 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; @@ -1394,11 +1394,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; @@ -1479,7 +1479,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; @@ -1535,7 +1535,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); @@ -1562,7 +1562,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; @@ -1584,7 +1584,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; @@ -1608,8 +1608,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); @@ -1636,7 +1636,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]); @@ -1664,7 +1664,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) @@ -1685,7 +1685,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); } @@ -1698,7 +1698,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) @@ -1732,7 +1732,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; @@ -1772,7 +1772,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; @@ -2115,7 +2115,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); memset(&xgi, 0, sizeof(xGetImageReply)); if(pDraw->type == DRAWABLE_WINDOW) @@ -2447,7 +2447,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); @@ -2477,7 +2477,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 */ @@ -2505,7 +2505,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) @@ -2528,7 +2528,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); @@ -2549,7 +2549,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) @@ -2573,7 +2573,7 @@ ProcListInstalledColormaps(register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client, - SecurityReadAccess); + DixReadAccess); if (!pWin) return(BadWindow); @@ -2608,7 +2608,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; @@ -2648,7 +2648,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; @@ -2700,7 +2700,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; @@ -2766,7 +2766,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; @@ -2830,7 +2830,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; @@ -2865,7 +2865,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; @@ -2899,7 +2899,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; @@ -2933,7 +2933,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; @@ -2987,7 +2987,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; @@ -3037,9 +3037,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; @@ -3139,7 +3139,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); @@ -3169,7 +3169,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; diff --git a/nx-X11/programs/Xserver/dix/dixfonts.c b/nx-X11/programs/Xserver/dix/dixfonts.c index aa90b8769..f7d047c2d 100644 --- a/nx-X11/programs/Xserver/dix/dixfonts.c +++ b/nx-X11/programs/Xserver/dix/dixfonts.c @@ -1197,7 +1197,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 @@ -1227,7 +1227,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; @@ -1489,7 +1489,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. */ @@ -2044,7 +2044,7 @@ FontPtr find_old_font(XID id) { return (FontPtr) SecurityLookupIDByType(NullClient, id, RT_NONE, - SecurityUnknownAccess); + DixUnknownAccess); } Font diff --git a/nx-X11/programs/Xserver/dix/dixutils.c b/nx-X11/programs/Xserver/dix/dixutils.c index bd7439d89..bf925f748 100644 --- a/nx-X11/programs/Xserver/dix/dixutils.c +++ b/nx-X11/programs/Xserver/dix/dixutils.c @@ -260,13 +260,13 @@ SecurityLookupDrawable(XID rid, ClientPtr client, Mask access_mode) WindowPtr LookupWindow(XID rid, ClientPtr client) { - return SecurityLookupWindow(rid, client, SecurityUnknownAccess); + return SecurityLookupWindow(rid, client, DixUnknownAccess); } void * LookupDrawable(XID rid, ClientPtr client) { - return SecurityLookupDrawable(rid, client, SecurityUnknownAccess); + return SecurityLookupDrawable(rid, client, DixUnknownAccess); } #else /* not XCSECURITY */ @@ -317,7 +317,7 @@ ClientPtr LookupClient(XID rid, ClientPtr client) { void * pRes = (void *)SecurityLookupIDByClass(client, rid, RC_ANY, - SecurityReadAccess); + DixReadAccess); int clientIndex = CLIENT_ID(rid); if (clientIndex && pRes && clients[clientIndex] && !(rid & SERVER_BIT)) diff --git a/nx-X11/programs/Xserver/dix/events.c b/nx-X11/programs/Xserver/dix/events.c index fa8bfc92d..fde3e91dd 100644 --- a/nx-X11/programs/Xserver/dix/events.c +++ b/nx-X11/programs/Xserver/dix/events.c @@ -2201,7 +2201,7 @@ XineramaWarpPointer(ClientPtr client) if (stuff->dstWid != None) { - dest = SecurityLookupWindow(stuff->dstWid, client, SecurityReadAccess); + dest = SecurityLookupWindow(stuff->dstWid, client, DixReadAccess); if (!dest) return BadWindow; } @@ -2214,7 +2214,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; @@ -2281,7 +2281,7 @@ ProcWarpPointer(ClientPtr client) if (stuff->dstWid != None) { - dest = SecurityLookupWindow(stuff->dstWid, client, SecurityReadAccess); + dest = SecurityLookupWindow(stuff->dstWid, client, DixReadAccess); if (!dest) return BadWindow; } @@ -2294,7 +2294,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; @@ -3469,7 +3469,7 @@ SetInputFocus( else if ((focusID == FollowKeyboard) && followOK) focusWin = inputInfo.keyboard->focus->win; else if (!(focusWin = SecurityLookupWindow(focusID, client, - SecurityReadAccess))) + DixReadAccess))) return BadWindow; else { @@ -3590,7 +3590,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) @@ -3598,7 +3598,7 @@ ProcGrabPointer(ClientPtr client) else { confineTo = SecurityLookupWindow(stuff->confineTo, client, - SecurityReadAccess); + DixReadAccess); if (!confineTo) return BadWindow; } @@ -3607,7 +3607,7 @@ ProcGrabPointer(ClientPtr client) else { cursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor, - RT_CURSOR, SecurityReadAccess); + RT_CURSOR, DixReadAccess); if (!cursor) { client->errorValue = stuff->cursor; @@ -3682,7 +3682,7 @@ ProcChangeActivePointerGrab(ClientPtr client) else { newCursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor, - RT_CURSOR, SecurityReadAccess); + RT_CURSOR, DixReadAccess); if (!newCursor) { client->errorValue = stuff->cursor; @@ -3752,7 +3752,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); @@ -3842,7 +3842,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) @@ -4009,7 +4009,7 @@ ProcSendEvent(ClientPtr client) } else pWin = SecurityLookupWindow(stuff->destination, client, - SecurityReadAccess); + DixReadAccess); if (!pWin) return BadWindow; if ((stuff->propagate != xFalse) && (stuff->propagate != xTrue)) @@ -4048,7 +4048,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; @@ -4119,7 +4119,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; @@ -4171,14 +4171,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; } @@ -4187,7 +4187,7 @@ ProcGrabButton(ClientPtr client) else { cursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor, - RT_CURSOR, SecurityReadAccess); + RT_CURSOR, DixReadAccess); if (!cursor) { client->errorValue = stuff->cursor; @@ -4222,7 +4222,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; @@ -4376,7 +4376,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; diff --git a/nx-X11/programs/Xserver/dix/gc.c b/nx-X11/programs/Xserver/dix/gc.c index 29f14de43..b3a4edf4d 100644 --- a/nx-X11/programs/Xserver/dix/gc.c +++ b/nx-X11/programs/Xserver/dix/gc.c @@ -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/nx-X11/programs/Xserver/dix/property.c b/nx-X11/programs/Xserver/dix/property.c index 2e5569367..f5713cf5e 100644 --- a/nx-X11/programs/Xserver/dix/property.c +++ b/nx-X11/programs/Xserver/dix/property.c @@ -106,7 +106,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) @@ -119,7 +119,7 @@ ProcRotateProperties(ClientPtr client) { #ifdef XCSECURITY char action = SecurityCheckPropertyAccess(client, pWin, atoms[i], - SecurityReadAccess|SecurityWriteAccess); + DixReadAccess|DixWriteAccess); #endif if (!ValidAtom(atoms[i]) #ifdef XCSECURITY @@ -219,7 +219,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)) @@ -235,7 +235,7 @@ ProcChangeProperty(ClientPtr client) #ifdef XCSECURITY switch (SecurityCheckPropertyAccess(client, pWin, stuff->property, - SecurityWriteAccess)) + DixWriteAccess)) { case SecurityErrorOperation: client->errorValue = stuff->property; @@ -469,7 +469,7 @@ ProcGetProperty(ClientPtr client) if (stuff->delete) UpdateCurrentTime(); pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, - SecurityReadAccess); + DixReadAccess); if (!pWin) return BadWindow; @@ -507,10 +507,10 @@ ProcGetProperty(ClientPtr client) #ifdef XCSECURITY { - Mask access_mode = SecurityReadAccess; + Mask access_mode = DixReadAccess; if (stuff->delete) - access_mode |= SecurityDestroyAccess; + access_mode |= DixDestroyAccess; switch(SecurityCheckPropertyAccess(client, pWin, stuff->property, access_mode)) { @@ -614,7 +614,7 @@ ProcListProperties(ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client, - SecurityReadAccess); + DixReadAccess); if (!pWin) return(BadWindow); @@ -659,7 +659,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)) @@ -670,7 +670,7 @@ ProcDeleteProperty(register ClientPtr client) #ifdef XCSECURITY switch(SecurityCheckPropertyAccess(client, pWin, stuff->property, - SecurityDestroyAccess)) + DixDestroyAccess)) { case SecurityErrorOperation: client->errorValue = stuff->property; diff --git a/nx-X11/programs/Xserver/dix/resource.c b/nx-X11/programs/Xserver/dix/resource.c index ca7da1601..d22b0cdd0 100644 --- a/nx-X11/programs/Xserver/dix/resource.c +++ b/nx-X11/programs/Xserver/dix/resource.c @@ -878,14 +878,14 @@ void * LookupIDByType(XID id, RESTYPE rtype) { return SecurityLookupIDByType(NullClient, id, rtype, - SecurityUnknownAccess); + DixUnknownAccess); } void * LookupIDByClass(XID id, RESTYPE classes) { return SecurityLookupIDByClass(NullClient, id, classes, - SecurityUnknownAccess); + DixUnknownAccess); } #else /* not XCSECURITY */ diff --git a/nx-X11/programs/Xserver/dix/window.c b/nx-X11/programs/Xserver/dix/window.c index 1239ab9f7..a7346e778 100644 --- a/nx-X11/programs/Xserver/dix/window.c +++ b/nx-X11/programs/Xserver/dix/window.c @@ -1028,7 +1028,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) || @@ -1089,7 +1089,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) || @@ -1302,7 +1302,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; @@ -1378,7 +1378,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; @@ -2252,7 +2252,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; -- cgit v1.2.3