static int ProcXagQuery( register ClientPtr client) { ClientPtr pClient; AppGroupPtr pAppGrp; REQUEST (xXagQueryReq); int n, rc; REQUEST_SIZE_MATCH (xXagQueryReq); rc = dixLookupClient(&pClient, stuff->resource, client, DixUnknownAccess); if (rc != Success) return rc; for (pAppGrp = appGrpList; pAppGrp != NULL; pAppGrp = pAppGrp->next) for (n = 0; n < pAppGrp->nclients; n++) if (pAppGrp->clients[n] == pClient) { xXagQueryReply rep; rep.type = X_Reply; rep.length = 0; rep.sequence_number = client->sequence; rep.app_group = pAppGrp->appgroupId; if (client->swapped) { swaps (&rep.sequence_number, n); swapl (&rep.length, n); swapl (&rep.app_group, n); } WriteToClient (client, sizeof (xXagQueryReply), (char *)&rep); return client->noClientException; } return BadMatch; }
/* replaced by dixLookupClient */ ClientPtr LookupClient(XID id, ClientPtr client) { ClientPtr pClient; int i = dixLookupClient(&pClient, id, client, DixUnknownAccess); static int warn = 1; if (warn > 0 && --warn) ErrorF("Warning: LookupClient() is deprecated. Please convert your " "driver/module to use dixLookupClient().\n"); return (i == Success) ? pClient : NULL; }
static int ProcSELinuxGetClientContext(ClientPtr client) { ClientPtr target; SELinuxSubjectRec *subj; int rc; REQUEST(SELinuxGetContextReq); REQUEST_SIZE_MATCH(SELinuxGetContextReq); rc = dixLookupClient(&target, stuff->id, client, DixGetAttrAccess); if (rc != Success) return rc; subj = dixLookupPrivate(&target->devPrivates, subjectKey); return SELinuxSendContextReply(client, subj->sid); }