xselinux: Label the default device directly with the process context.

This commit is contained in:
Eamon Walsh 2007-10-25 12:35:01 -04:00 committed by Eamon Walsh
parent b633d54b94
commit 40de9fcf18

View File

@ -486,13 +486,9 @@ SELinuxDevice(CallbackListPtr *pcbl, pointer unused, pointer calldata)
if (rec->access_mode & DixCreateAccess) {
sidput(obj->sid);
/* Perform a transition to obtain the final SID */
if (avc_compute_create(subj->sid, subj->sid, SECCLASS_X_DEVICE,
&obj->sid) < 0) {
ErrorF("XSELinux: a compute_create call failed!\n");
rec->status = BadValue;
return;
}
/* Label the device directly with the process SID */
sidget(subj->sid);
obj->sid = subj->sid;
}
rc = SELinuxDoCheck(rec->client->index, subj, obj, SECCLASS_X_DEVICE,