Lines Matching refs:perms

312 void aa_apply_modes_to_perms(struct aa_profile *profile, struct aa_perms *perms)  in aa_apply_modes_to_perms()  argument
316 perms->audit = ALL_PERMS_MASK; in aa_apply_modes_to_perms()
319 perms->quiet = 0; in aa_apply_modes_to_perms()
322 perms->audit = 0; in aa_apply_modes_to_perms()
325 perms->quiet = ALL_PERMS_MASK; in aa_apply_modes_to_perms()
330 perms->kill = ALL_PERMS_MASK; in aa_apply_modes_to_perms()
332 perms->complain = ALL_PERMS_MASK; in aa_apply_modes_to_perms()
334 perms->prompt = ALL_PERMS_MASK; in aa_apply_modes_to_perms()
340 int type, u32 request, struct aa_perms *perms) in aa_profile_match_label() argument
348 aa_label_match(profile, rules, label, state, false, request, perms); in aa_profile_match_label()
359 struct aa_perms perms; in aa_profile_label_perm() local
365 &perms); in aa_profile_label_perm()
366 aa_apply_modes_to_perms(profile, &perms); in aa_profile_label_perm()
367 *deny |= request & perms.deny; in aa_profile_label_perm()
368 return aa_check_perms(profile, &perms, request, ad, aa_audit_perms_cb); in aa_profile_label_perm()
388 int aa_check_perms(struct aa_profile *profile, struct aa_perms *perms, in aa_check_perms() argument
393 u32 denied = request & (~perms->allow | perms->deny); in aa_check_perms()
397 request &= perms->audit; in aa_check_perms()
406 if (denied & perms->kill) in aa_check_perms()
408 else if (denied == (denied & perms->complain)) in aa_check_perms()
413 if (denied == (denied & perms->hide)) in aa_check_perms()
416 denied &= ~perms->quiet; in aa_check_perms()