Skip to content

Commit

Permalink
Replace SecurityLookupIDByType() with dixLookupResourceByType(), take 2.
Browse files Browse the repository at this point in the history
These occurrences are a bit harder to catch through a semantic patch,
so process them “manually”.

Reviewed-by: Jamey Sharp <[email protected]>
Signed-off-by: Cyril Brulebois <[email protected]>
  • Loading branch information
Cyril Brulebois committed Dec 7, 2010
1 parent ac04c13 commit 6e8b34b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
10 changes: 6 additions & 4 deletions hw/dmx/dmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,9 @@ static int ProcDMXForceWindowCreation(ClientPtr client)
PanoramiXRes *win;
int i;

if (!(win = SecurityLookupIDByType(client, stuff->window, XRT_WINDOW,
DixReadAccess)))
if (Success != dixLookupResourceByType((pointer*) &win,
stuff->window, XRT_WINDOW,
client, DixReadAccess))
return -1; /* BadWindow */

FOR_NSCREENS(i) {
Expand Down Expand Up @@ -506,8 +507,9 @@ static int dmxPopulatePanoramiX(ClientPtr client, Window window,
int count = 0;
DMXWindowAttributesRec attr;

if (!(win = SecurityLookupIDByType(client, window, XRT_WINDOW,
DixReadAccess)))
if (Success != dixLookupResourceByType((pointer*) &win,
window, XRT_WINDOW,
client, DixReadAccess))
return -1; /* BadWindow */

FOR_NSCREENS(i) {
Expand Down
5 changes: 4 additions & 1 deletion hw/dmx/glxProxy/glxcmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -3074,7 +3074,10 @@ int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc)
int nReplyBytes;

req = (xGLXQueryContextInfoEXTReq *)pc;
ctx = (__GLXcontext *) SecurityLookupIDByType(client, req->context, __glXContextRes, DixReadAccess);
dixLookupResourceByType((pointer*) &ctx,
req->context, __glXContextRes,
client, DixReadAccess);

if (!ctx) {
client->errorValue = req->context;
return __glXBadContext;
Expand Down

0 comments on commit 6e8b34b

Please sign in to comment.