Lines Matching defs:rec

210 SELinuxLabelResource(XaceResourceAccessRec * rec, SELinuxSubjectRec * subj,
217 if (rec->rtype & RC_DRAWABLE && subj->win_create_sid) {
222 if (rec->parent)
223 offset = dixLookupPrivateOffset(rec->ptype);
225 if (rec->parent && offset >= 0) {
227 PrivateRec **privatePtr = DEVPRIV_AT(rec->parent, offset);
334 XaceDeviceAccessRec *rec = calldata;
337 SELinuxAuditRec auditdata = {.client = rec->client,.dev = rec->dev };
341 subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
342 obj = dixLookupPrivate(&rec->dev->devPrivates, objectKey);
345 if (rec->access_mode & DixCreateAccess) {
348 dsubj = dixLookupPrivate(&rec->dev->devPrivates, subjectKey);
362 cls = IsPointerDevice(rec->dev) ? SECCLASS_X_POINTER : SECCLASS_X_KEYBOARD;
363 rc = SELinuxDoCheck(subj, obj, cls, rec->access_mode, &auditdata);
365 rec->status = rc;
371 XaceSendAccessRec *rec = calldata;
374 SELinuxAuditRec auditdata = {.client = rec->client,.dev = rec->dev };
378 if (rec->dev)
379 subj = dixLookupPrivate(&rec->dev->devPrivates, subjectKey);
381 subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
383 obj = dixLookupPrivate(&rec->pWin->devPrivates, objectKey);
392 for (i = 0; i < rec->count; i++) {
393 type = rec->events[i].u.u.type;
407 rec->status = rc;
413 XaceReceiveAccessRec *rec = calldata;
420 subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
421 obj = dixLookupPrivate(&rec->pWin->devPrivates, objectKey);
430 for (i = 0; i < rec->count; i++) {
431 type = rec->events[i].u.u.type;
445 rec->status = rc;
451 XaceExtAccessRec *rec = calldata;
454 SELinuxAuditRec auditdata = {.client = rec->client };
457 subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
458 obj = dixLookupPrivate(&rec->ext->devPrivates, objectKey);
466 rc = SELinuxExtensionToSID(rec->ext->name, &sid);
468 rec->status = rc;
476 rec->status = BadValue;
482 auditdata.extension = (char *) rec->ext->name;
483 rc = SELinuxDoCheck(subj, obj, SECCLASS_X_EXTENSION, rec->access_mode,
486 rec->status = rc;
492 XaceSelectionAccessRec *rec = calldata;
495 Selection *pSel = *rec->ppSel;
497 Mask access_mode = rec->access_mode;
498 SELinuxAuditRec auditdata = {.client = rec->client,.selection = name };
502 subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
516 rec->status = rc;
526 *rec->ppSel = pSel;
528 rec->status = BadMatch;
537 rec->status = rc;
552 XacePropertyAccessRec *rec = calldata;
555 PropertyPtr pProp = *rec->ppProp;
557 SELinuxAuditRec auditdata = {.client = rec->client,.property = name };
562 if (rec->access_mode & DixPostAccess)
565 subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
569 if (rec->access_mode & DixCreateAccess) {
572 rec->status = rc;
580 rec->status = rc;
590 *rec->ppProp = pProp;
592 rec->status = BadMatch;
598 rc = SELinuxDoCheck(subj, obj, SECCLASS_X_PROPERTY, rec->access_mode,
601 rec->status = rc;
604 if (rec->access_mode & DixWriteAccess) {
616 XaceResourceAccessRec *rec = calldata;
619 SELinuxAuditRec auditdata = {.client = rec->client };
620 Mask access_mode = rec->access_mode;
625 subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
628 offset = dixLookupPrivateOffset(rec->rtype);
632 privatePtr = &clients[CLIENT_ID(rec->id)]->devPrivates;
637 class = SELinuxTypeToClass(rec->rtype);
638 privatePtr = DEVPRIV_AT(rec->res, offset);
644 rc = SELinuxLabelResource(rec, subj, obj, class);
646 rec->status = rc;
653 access_mode = ! !(rec->access_mode & SELinuxReadMask); /* rd */
654 access_mode |= ! !(rec->access_mode & ~SELinuxReadMask) << 1; /* wr */
658 auditdata.restype = rec->rtype;
659 auditdata.id = rec->id;
662 rec->status = rc;
665 if (access_mode & DixCreateAccess && rec->rtype == RT_WINDOW) {
668 ((WindowPtr) rec->res)->forcedBG = TRUE;
675 XaceScreenAccessRec *rec = calldata;
678 SELinuxAuditRec auditdata = {.client = rec->client };
679 Mask access_mode = rec->access_mode;
682 subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
683 obj = dixLookupPrivate(&rec->screen->devPrivates, objectKey);
691 rec->status = BadValue;
701 rec->status = rc;
707 XaceClientAccessRec *rec = calldata;
710 SELinuxAuditRec auditdata = {.client = rec->client };
713 subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
714 obj = dixLookupPrivate(&rec->target->devPrivates, objectKey);
716 rc = SELinuxDoCheck(subj, obj, SECCLASS_X_CLIENT, rec->access_mode,
719 rec->status = rc;
725 XaceServerAccessRec *rec = calldata;
728 SELinuxAuditRec auditdata = {.client = rec->client };
731 subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
734 rc = SELinuxDoCheck(subj, obj, SECCLASS_X_SERVER, rec->access_mode,
737 rec->status = rc;
762 ResourceStateInfoRec *rec = calldata;
767 if (rec->type != RT_WINDOW)
769 if (rec->state != ResourceStateAdding)
772 pWin = (WindowPtr) rec->value;