Lines Matching refs:perms
90 int aa_audit_file(struct aa_profile *profile, struct aa_perms *perms, in aa_audit_file() argument
109 u32 mask = perms->audit; in aa_audit_file()
122 aad(&sa)->request = aad(&sa)->request & ~perms->allow; in aa_audit_file()
125 if (aad(&sa)->request & perms->kill) in aa_audit_file()
129 if ((aad(&sa)->request & perms->quiet) && in aa_audit_file()
132 aad(&sa)->request &= ~perms->quiet; in aa_audit_file()
138 aad(&sa)->denied = aad(&sa)->request & ~perms->allow; in aa_audit_file()
221 struct aa_perms perms = { }; in aa_compute_fperms() local
224 perms.allow = map_old_perms(dfa_user_allow(dfa, state)); in aa_compute_fperms()
225 perms.audit = map_old_perms(dfa_user_audit(dfa, state)); in aa_compute_fperms()
226 perms.quiet = map_old_perms(dfa_user_quiet(dfa, state)); in aa_compute_fperms()
227 perms.xindex = dfa_user_xindex(dfa, state); in aa_compute_fperms()
229 perms.allow = map_old_perms(dfa_other_allow(dfa, state)); in aa_compute_fperms()
230 perms.audit = map_old_perms(dfa_other_audit(dfa, state)); in aa_compute_fperms()
231 perms.quiet = map_old_perms(dfa_other_quiet(dfa, state)); in aa_compute_fperms()
232 perms.xindex = dfa_other_xindex(dfa, state); in aa_compute_fperms()
234 perms.allow |= AA_MAY_GETATTR; in aa_compute_fperms()
238 perms.allow |= AA_MAY_CHANGE_PROFILE; in aa_compute_fperms()
240 perms.allow |= AA_MAY_ONEXEC; in aa_compute_fperms()
242 return perms; in aa_compute_fperms()
257 struct aa_perms *perms) in aa_str_perms() argument
261 *perms = aa_compute_fperms(dfa, state, cond); in aa_str_perms()
268 struct aa_perms *perms) in __aa_path_perm() argument
274 aa_str_perms(profile->file.dfa, profile->file.start, name, cond, perms); in __aa_path_perm()
275 if (request & ~perms->allow) in __aa_path_perm()
277 return aa_audit_file(profile, perms, op, request, name, NULL, NULL, in __aa_path_perm()
285 struct aa_perms *perms) in profile_path_perm() argument
299 perms); in profile_path_perm()
317 struct aa_perms perms = {}; in aa_path_perm() local
329 cond, flags, &perms)); in aa_path_perm()
362 struct aa_perms lperms = {}, perms; in profile_path_link() local
389 aa_str_perms(profile->file.dfa, state, tname, cond, &perms); in profile_path_link()
394 lperms.audit = perms.audit; in profile_path_link()
395 lperms.quiet = perms.quiet; in profile_path_link()
396 lperms.kill = perms.kill; in profile_path_link()
398 if (!(perms.allow & AA_MAY_LINK)) { in profile_path_link()
400 lperms = perms; in profile_path_link()
405 if (!(perms.allow & AA_LINK_SUBSET)) in profile_path_link()
412 &perms); in profile_path_link()
416 lperms.allow &= perms.allow | AA_MAY_LINK; in profile_path_link()
418 request |= AA_AUDIT_FILE_MASK & (lperms.allow & ~perms.allow); in profile_path_link()
422 !xindex_is_subset(lperms.xindex, perms.xindex)) { in profile_path_link()
510 struct aa_perms perms = {}; in __file_path_perm() local
531 request, &cond, flags, &perms)); in __file_path_perm()
545 &perms)); in __file_path_perm()
550 &perms)); in __file_path_perm()