Fix most remaining deprecated resource lookups.

Callsites updated to use dixLookupResourceBy{Type,Class}.
TODO: Audit access modes to make sure they reflect the usage.
This commit is contained in:
Eamon Walsh 2009-04-29 01:04:37 -04:00
commit 57aff88c7d
50 changed files with 1017 additions and 1037 deletions

View file

@ -94,12 +94,10 @@ int ProcXChangeDeviceCursor(ClientPtr client)
}
else
{
pCursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor,
RT_CURSOR, DixReadAccess);
if (!pCursor)
{
return BadCursor;
}
rc = dixLookupResourceByType((pointer *)&pCursor, stuff->cursor,
RT_CURSOR, client, DixReadAccess);
if (rc != Success)
return (rc == BadValue) ? BadCursor : rc;
}
ChangeWindowDeviceCursor(pWin, pDev, pCursor);

View file

@ -88,7 +88,7 @@ ProcXExtendedGrabDevice(ClientPtr client)
{
xExtendedGrabDeviceReply rep;
DeviceIntPtr dev;
int rc = Success,
int rc,
errval = 0,
i;
WindowPtr grab_window,
@ -145,14 +145,12 @@ ProcXExtendedGrabDevice(ClientPtr client)
if (stuff->cursor)
{
cursor = (CursorPtr)SecurityLookupIDByType(client,
stuff->cursor,
RT_CURSOR,
DixReadAccess);
if (!cursor)
{
rc = dixLookupResourceByType((pointer *)&cursor, stuff->cursor,
RT_CURSOR, client, DixReadAccess);
if (rc != Success)
{
errval = stuff->cursor;
rc = BadCursor;
rc = (rc == BadValue) ? BadCursor : rc;
goto cleanup;
}
}