/* Check the AVC to determine whether the @requested permissions are granted for the SID pair (@ssid, @tsid), interpreting the permissions based on @tclass, and call the security server on a cache miss to obtain a new decision and add it to the cache. Audit the granting or denial of permissions in accordance with the policy. Return %0 if all @requested permissions are granted, -EACCES if any permissions are denied, or another -errno upon other errors.  */
int avc_has_perm(u32 ssid, u32 tsid, u16 tclass, u32 requested, struct common_audit_data *auditdata)
/* Check the AVC to determine whether the @requested permissions are granted for the SID pair (@ssid, @tsid), interpreting the permissions based on @tclass, and call the security server on a cache miss to obtain a new decision and add it to the cache. Audit the granting or denial of permissions in accordance with the policy. Return %0 if all @requested permissions are granted, -EACCES if any permissions are denied, or another -errno upon other errors.  */
int avc_has_perm(u32 ssid, u32 tsid, u16 tclass, u32 requested, struct common_audit_data *auditdata)
{
	struct av_decision avd;
	int rc;
	rc = avc_has_perm_noaudit(ssid, tsid, tclass, requested, 0, &avd);
	avc_audit(ssid, tsid, tclass, requested, &avd, rc, auditdata);
	return rc;
}