xselinux: Use the now-exported IsPointerDevice() instead of a copy.
Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
This commit is contained in:
parent
0ae1632be0
commit
264ce9e836
|
@ -86,16 +86,6 @@ static void SELinuxScreen(CallbackListPtr *, pointer, pointer);
|
||||||
static pointer truep = (pointer)1;
|
static pointer truep = (pointer)1;
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns true if device is a pointer device.
|
|
||||||
* Note: this duplicates dix IsPointerDevice() which is not exported.
|
|
||||||
*/
|
|
||||||
static inline Bool
|
|
||||||
IsPointerDev(DeviceIntPtr dev)
|
|
||||||
{
|
|
||||||
return (dev->type == MASTER_POINTER) || (dev->valuator && dev->button);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Performs an SELinux permission check.
|
* Performs an SELinux permission check.
|
||||||
*/
|
*/
|
||||||
|
@ -383,7 +373,7 @@ SELinuxDevice(CallbackListPtr *pcbl, pointer unused, pointer calldata)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cls = IsPointerDev(rec->dev) ? SECCLASS_X_POINTER : SECCLASS_X_KEYBOARD;
|
cls = IsPointerDevice(rec->dev) ? SECCLASS_X_POINTER : SECCLASS_X_KEYBOARD;
|
||||||
rc = SELinuxDoCheck(subj, obj, cls, rec->access_mode, &auditdata);
|
rc = SELinuxDoCheck(subj, obj, cls, rec->access_mode, &auditdata);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
rec->status = rc;
|
rec->status = rc;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user