Lines Matching refs:pAuth
174 SecurityAuthorizationPtr pAuth = (SecurityAuthorizationPtr)value;
183 status = AuthorizationFromID(pAuth->id, &name_len, &name,
192 if (pAuth->timer) TimerFree(pAuth->timer);
196 while ((pEventClient = pAuth->eventClients))
201 are.authId = pAuth->id;
212 if (state->haveState && state->authId == pAuth->id)
216 SecurityAudit("revoked authorization ID %d\n", pAuth->id);
217 free(pAuth);
230 SecurityAuthorizationPtr pAuth = (SecurityAuthorizationPtr)value;
232 for (pEventClient = pAuth->eventClients;
241 pAuth->eventClients = pEventClient->next;
255 * pAuth is the authorization for which we are computing the timeout
262 * Sets pAuth->secondsRemaining to any "overflow" amount of time
268 SecurityAuthorizationPtr pAuth,
278 pAuth->secondsRemaining = seconds - maxSecs;
283 pAuth->secondsRemaining = 0;
304 * over, otherwise recomputes pAuth->secondsRemaining.
313 SecurityAuthorizationPtr pAuth = (SecurityAuthorizationPtr)pval;
315 assert(pAuth->timer == timer);
317 if (pAuth->secondsRemaining)
319 return SecurityComputeAuthorizationTimeout(pAuth,
320 pAuth->secondsRemaining);
324 FreeResource(pAuth->id, RT_NONE);
332 * pAuth is the authorization whose timer should be started.
344 SecurityAuthorizationPtr pAuth)
346 pAuth->timer = TimerSet(pAuth->timer, 0,
347 SecurityComputeAuthorizationTimeout(pAuth, pAuth->timeout),
348 SecurityAuthorizationExpired, pAuth);
384 SecurityAuthorizationPtr pAuth,
390 for (pEventClient = pAuth->eventClients;
409 pEventClient->next = pAuth->eventClients;
411 (pointer)pAuth))
416 pAuth->eventClients = pEventClient;
429 SecurityAuthorizationPtr pAuth = NULL; /* auth we are creating */
536 pAuth = malloc(sizeof(SecurityAuthorizationRec));
537 if (!pAuth)
545 pAuth->id = authId;
546 pAuth->timeout = timeout;
547 pAuth->group = group;
548 pAuth->trustLevel = trustLevel;
549 pAuth->refcnt = 0; /* the auth was just created; nobody's using it yet */
550 pAuth->secondsRemaining = 0;
551 pAuth->timer = NULL;
552 pAuth->eventClients = NULL;
557 err = SecurityEventSelectForAuthorization(pAuth, client, eventMask);
562 if (!AddResource(authId, SecurityAuthorizationResType, pAuth))
570 if (pAuth->timeout != 0)
571 SecurityStartAuthorizationTimer(pAuth);
595 client->index, pAuth->id, pAuth->trustLevel, pAuth->timeout,
596 pAuth->group, eventMask);
598 /* the request succeeded; don't call RemoveAuthorization or free pAuth */
605 free(pAuth);
615 SecurityAuthorizationPtr pAuth;
620 rc = dixLookupResourceByType((pointer *)&pAuth, stuff->authId,
1006 SecurityAuthorizationPtr pAuth;
1020 rc = dixLookupResourceByType((pointer *)&pAuth, state->authId,
1025 pAuth->refcnt++;
1026 if (pAuth->refcnt == 1 && pAuth->timer)
1027 TimerCancel(pAuth->timer);
1029 state->trustLevel = pAuth->trustLevel;
1035 rc = dixLookupResourceByType((pointer *)&pAuth, state->authId,
1040 pAuth->refcnt--;
1041 if (pAuth->refcnt == 0)
1042 SecurityStartAuthorizationTimer(pAuth);