Lines Matching refs:perms
309 void aa_apply_modes_to_perms(struct aa_profile *profile, struct aa_perms *perms) in aa_apply_modes_to_perms() argument
313 perms->audit = ALL_PERMS_MASK; in aa_apply_modes_to_perms()
316 perms->quiet = 0; in aa_apply_modes_to_perms()
319 perms->audit = 0; in aa_apply_modes_to_perms()
322 perms->quiet = ALL_PERMS_MASK; in aa_apply_modes_to_perms()
327 perms->kill = ALL_PERMS_MASK; in aa_apply_modes_to_perms()
329 perms->complain = ALL_PERMS_MASK; in aa_apply_modes_to_perms()
331 perms->prompt = ALL_PERMS_MASK; in aa_apply_modes_to_perms()
337 int type, u32 request, struct aa_perms *perms) in aa_profile_match_label() argument
345 aa_label_match(profile, rules, label, state, false, request, perms); in aa_profile_match_label()
356 struct aa_perms perms; in aa_profile_label_perm() local
363 &perms); in aa_profile_label_perm()
364 aa_apply_modes_to_perms(profile, &perms); in aa_profile_label_perm()
365 *deny |= request & perms.deny; in aa_profile_label_perm()
366 return aa_check_perms(profile, &perms, request, sa, aa_audit_perms_cb); in aa_profile_label_perm()
387 int aa_check_perms(struct aa_profile *profile, struct aa_perms *perms, in aa_check_perms() argument
392 u32 denied = request & (~perms->allow | perms->deny); in aa_check_perms()
396 request &= perms->audit; in aa_check_perms()
405 if (denied & perms->kill) in aa_check_perms()
407 else if (denied == (denied & perms->complain)) in aa_check_perms()
412 if (denied == (denied & perms->hide)) in aa_check_perms()
415 denied &= ~perms->quiet; in aa_check_perms()