Function selinux_sys::avc_has_perm[][src]

pub unsafe extern "C" fn avc_has_perm(
    ssid: security_id_t,
    tsid: security_id_t,
    tclass: security_class_t,
    requested: access_vector_t,
    aeref: *mut avc_entry_ref,
    auditdata: *mut c_void
) -> c_int

avc_has_perm - Check permissions and perform any appropriate auditing. @ssid: source security identifier @tsid: target security identifier @tclass: target security class @requested: requested permissions, interpreted based on @tclass @aeref: AVC entry reference @auditdata: auxiliary audit data

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. Update @aeref to refer to an AVC entry with the resulting decisions. Audit the granting or denial of permissions in accordance with the policy. Return %0 if all @requested permissions are granted, -%1 with @errno set to %EACCES if any permissions are denied or to another value upon other errors.