Lines Matching refs:perms
137 struct aa_perms *perms) in label_compound_match() argument
154 *perms = allperms; in label_compound_match()
166 *perms = aa_compute_fperms(profile->file.dfa, state, &cond); in label_compound_match()
167 aa_apply_modes_to_perms(profile, perms); in label_compound_match()
168 if ((perms->allow & request) != request) in label_compound_match()
174 *perms = nullperms; in label_compound_match()
197 struct aa_perms *perms) in label_components_match() argument
221 aa_perms_accum(perms, &tmp); in label_components_match()
230 aa_perms_accum(perms, &tmp); in label_components_match()
233 if ((perms->allow & request) != request) in label_components_match()
239 *perms = nullperms; in label_components_match()
257 struct aa_perms *perms) in label_match() argument
261 *perms = nullperms; in label_match()
263 request, perms); in label_match()
267 *perms = allperms; in label_match()
269 request, perms); in label_match()
291 struct aa_perms *perms) in change_profile_perms() argument
294 perms->allow = AA_MAY_CHANGE_PROFILE | AA_MAY_ONEXEC; in change_profile_perms()
295 perms->audit = perms->quiet = perms->kill = 0; in change_profile_perms()
300 return label_match(profile, target, stack, start, true, request, perms); in change_profile_perms()
632 struct aa_perms perms = {}; in profile_transition() local
665 state = aa_str_perms(profile->file.dfa, state, name, cond, &perms); in profile_transition()
666 if (perms.allow & MAY_EXEC) { in profile_transition()
668 new = x_to_label(profile, bprm, name, perms.xindex, &target, in profile_transition()
677 perms.allow &= ~MAY_EXEC; in profile_transition()
692 perms.xindex |= AA_X_UNSAFE; in profile_transition()
701 if (!(perms.xindex & AA_X_UNSAFE)) { in profile_transition()
712 aa_audit_file(profile, &perms, OP_EXEC, MAY_EXEC, name, target, new, in profile_transition()
728 struct aa_perms perms = {}; in profile_onexec() local
760 state = aa_str_perms(profile->file.dfa, state, xname, cond, &perms); in profile_onexec()
761 if (!(perms.allow & AA_MAY_ONEXEC)) { in profile_onexec()
771 state, &perms); in profile_onexec()
773 perms.allow &= ~AA_MAY_ONEXEC; in profile_onexec()
777 if (!(perms.xindex & AA_X_UNSAFE)) { in profile_onexec()
788 return aa_audit_file(profile, &perms, OP_EXEC, AA_MAY_ONEXEC, xname, in profile_onexec()
1155 struct aa_perms perms = {}; in aa_change_hat() local
1249 perms.kill = AA_MAY_CHANGEHAT; in aa_change_hat()
1253 aa_audit_file(profile, &perms, OP_CHANGE_HAT, in aa_change_hat()
1264 u32 request, struct aa_perms *perms) in change_profile_perms_wrapper() argument
1271 profile->file.start, perms); in change_profile_perms_wrapper()
1273 error = aa_audit_file(profile, perms, op, request, name, in change_profile_perms_wrapper()
1298 struct aa_perms perms = {}; in aa_change_profile() local
1381 request, &perms)); in aa_change_profile()
1434 perms.allow = 0; in aa_change_profile()
1450 aa_audit_file(profile, &perms, op, request, auditname, in aa_change_profile()