Lines Matching defs:rec

212 SELinuxLabelResource(XaceResourceAccessRec *rec, SELinuxSubjectRec *subj,
219 if (rec->rtype & RC_DRAWABLE && subj->win_create_sid) {
224 if (rec->parent)
225 offset = dixLookupPrivateOffset(rec->ptype);
227 if (rec->parent && offset >= 0) {
229 PrivateRec **privatePtr = DEVPRIV_AT(rec->parent, offset);
333 XaceDeviceAccessRec *rec = calldata;
336 SELinuxAuditRec auditdata = { .client = rec->client, .dev = rec->dev };
340 subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
341 obj = dixLookupPrivate(&rec->dev->devPrivates, objectKey);
344 if (rec->access_mode & DixCreateAccess) {
346 dsubj = dixLookupPrivate(&rec->dev->devPrivates, subjectKey);
359 cls = IsPointerDevice(rec->dev) ? SECCLASS_X_POINTER : SECCLASS_X_KEYBOARD;
360 rc = SELinuxDoCheck(subj, obj, cls, rec->access_mode, &auditdata);
362 rec->status = rc;
368 XaceSendAccessRec *rec = calldata;
371 SELinuxAuditRec auditdata = { .client = rec->client, .dev = rec->dev };
375 if (rec->dev)
376 subj = dixLookupPrivate(&rec->dev->devPrivates, subjectKey);
378 subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
380 obj = dixLookupPrivate(&rec->pWin->devPrivates, objectKey);
389 for (i = 0; i < rec->count; i++) {
390 type = rec->events[i].u.u.type;
404 rec->status = rc;
410 XaceReceiveAccessRec *rec = calldata;
417 subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
418 obj = dixLookupPrivate(&rec->pWin->devPrivates, objectKey);
427 for (i = 0; i < rec->count; i++) {
428 type = rec->events[i].u.u.type;
442 rec->status = rc;
448 XaceExtAccessRec *rec = calldata;
451 SELinuxAuditRec auditdata = { .client = rec->client };
454 subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
455 obj = dixLookupPrivate(&rec->ext->devPrivates, objectKey);
463 rc = SELinuxExtensionToSID(rec->ext->name, &sid);
465 rec->status = rc;
473 rec->status = BadValue;
479 auditdata.extension = rec->ext->name;
480 rc = SELinuxDoCheck(subj, obj, SECCLASS_X_EXTENSION, rec->access_mode,
483 rec->status = rc;
489 XaceSelectionAccessRec *rec = calldata;
492 Selection *pSel = *rec->ppSel;
494 Mask access_mode = rec->access_mode;
495 SELinuxAuditRec auditdata = { .client = rec->client, .selection = name };
499 subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
513 rec->status = rc;
523 *rec->ppSel = pSel;
525 rec->status = BadMatch;
534 rec->status = rc;
549 XacePropertyAccessRec *rec = calldata;
552 PropertyPtr pProp = *rec->ppProp;
554 SELinuxAuditRec auditdata = { .client = rec->client, .property = name };
559 if (rec->access_mode & DixPostAccess)
562 subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
566 if (rec->access_mode & DixCreateAccess) {
569 rec->status = rc;
577 rec->status = rc;
587 *rec->ppProp = pProp;
589 rec->status = BadMatch;
595 rc = SELinuxDoCheck(subj, obj, SECCLASS_X_PROPERTY, rec->access_mode,
598 rec->status = rc;
601 if (rec->access_mode & DixWriteAccess) {
613 XaceResourceAccessRec *rec = calldata;
616 SELinuxAuditRec auditdata = { .client = rec->client };
617 Mask access_mode = rec->access_mode;
622 subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
625 offset = dixLookupPrivateOffset(rec->rtype);
629 privatePtr = &clients[CLIENT_ID(rec->id)]->devPrivates;
633 class = SELinuxTypeToClass(rec->rtype);
634 privatePtr = DEVPRIV_AT(rec->res, offset);
640 rc = SELinuxLabelResource(rec, subj, obj, class);
642 rec->status = rc;
649 access_mode = !!(rec->access_mode & SELinuxReadMask); /* rd */
650 access_mode |= !!(rec->access_mode & ~SELinuxReadMask) << 1; /* wr */
654 auditdata.restype = rec->rtype;
655 auditdata.id = rec->id;
658 rec->status = rc;
661 if (access_mode & DixCreateAccess && rec->rtype == RT_WINDOW) {
664 ((WindowPtr)rec->res)->forcedBG = TRUE;
671 XaceScreenAccessRec *rec = calldata;
674 SELinuxAuditRec auditdata = { .client = rec->client };
675 Mask access_mode = rec->access_mode;
678 subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
679 obj = dixLookupPrivate(&rec->screen->devPrivates, objectKey);
687 rec->status = BadValue;
697 rec->status = rc;
703 XaceClientAccessRec *rec = calldata;
706 SELinuxAuditRec auditdata = { .client = rec->client };
709 subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
710 obj = dixLookupPrivate(&rec->target->devPrivates, objectKey);
712 rc = SELinuxDoCheck(subj, obj, SECCLASS_X_CLIENT, rec->access_mode,
715 rec->status = rc;
721 XaceServerAccessRec *rec = calldata;
724 SELinuxAuditRec auditdata = { .client = rec->client };
727 subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey);
730 rc = SELinuxDoCheck(subj, obj, SECCLASS_X_SERVER, rec->access_mode,
733 rec->status = rc;
759 ResourceStateInfoRec *rec = calldata;
764 if (rec->type != RT_WINDOW)
766 if (rec->state != ResourceStateAdding)
769 pWin = (WindowPtr)rec->value;