diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2018-01-22 22:44:54 +0100 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2018-02-26 06:16:18 +0100 |
commit | f1f2a360fc2e2b57c7e090ef5536438d66c2e334 (patch) | |
tree | 11b6aef0dda91b34286db96d916c9595ede82006 /nx-X11/programs/Xserver/dbe/dbe.c | |
parent | d364ea933659c779124d7f3b6833f21968599de6 (diff) | |
download | nx-libs-f1f2a360fc2e2b57c7e090ef5536438d66c2e334.tar.gz nx-libs-f1f2a360fc2e2b57c7e090ef5536438d66c2e334.tar.bz2 nx-libs-f1f2a360fc2e2b57c7e090ef5536438d66c2e334.zip |
dbe: add NXAGENT_SERVER guard for DixLookup
Diffstat (limited to 'nx-X11/programs/Xserver/dbe/dbe.c')
-rw-r--r-- | nx-X11/programs/Xserver/dbe/dbe.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/dbe/dbe.c b/nx-X11/programs/Xserver/dbe/dbe.c index 702af85fd..588dd0582 100644 --- a/nx-X11/programs/Xserver/dbe/dbe.c +++ b/nx-X11/programs/Xserver/dbe/dbe.c @@ -375,11 +375,17 @@ ProcDbeAllocateBackBufferName(ClientPtr client) REQUEST_SIZE_MATCH(xDbeAllocateBackBufferNameReq); /* The window must be valid. */ +#ifndef NXAGENT_SERVER + status = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + if (status != Success) + return status; +#else if (!(pWin = SecurityLookupWindow(stuff->window, client, DixWriteAccess))) { return(BadWindow); } +#endif /* The window must be InputOutput. */ if (pWin->drawable.class != InputOutput) @@ -704,12 +710,21 @@ ProcDbeSwapBuffers(ClientPtr client) /* Check all windows to swap. */ /* Each window must be a valid window - BadWindow. */ +#ifndef NXAGENT_SERVER + error = dixLookupWindow(&pWin, dbeSwapInfo[i].window, client, + DixWriteAccess); + if (error != Success) { + free(swapInfo); + return error; + } +#else if (!(pWin = SecurityLookupWindow(dbeSwapInfo[i].window, client, DixWriteAccess))) { free(swapInfo); return(BadWindow); } +#endif /* Each window must be double-buffered - BadMatch. */ if (DBE_WINDOW_PRIV(pWin) == NULL) @@ -867,12 +882,21 @@ ProcDbeGetVisualInfo(ClientPtr client) for (i = 0; i < stuff->n; i++) { +#ifndef NXAGENT_SERVER + register int rc = dixLookupDrawable(pDrawables+i, drawables[i], client, 0, + DixReadAccess); + if (rc != Success) { + free(pDrawables); + return rc; + } +#else if (!(pDrawables[i] = (DrawablePtr)SecurityLookupDrawable( drawables[i], client, DixReadAccess))) { free(pDrawables); return(BadDrawable); } +#endif } } |