Lines Matching refs:perms
105 int aa_audit_file(struct aa_profile *profile, struct aa_perms *perms, in aa_audit_file() argument
124 u32 mask = perms->audit; in aa_audit_file()
137 aad(&sa)->request = aad(&sa)->request & ~perms->allow; in aa_audit_file()
140 if (aad(&sa)->request & perms->kill) in aa_audit_file()
144 if ((aad(&sa)->request & perms->quiet) && in aa_audit_file()
147 aad(&sa)->request &= ~perms->quiet; in aa_audit_file()
153 aad(&sa)->denied = aad(&sa)->request & ~perms->allow; in aa_audit_file()
236 struct aa_perms perms = { }; in aa_compute_fperms() local
239 perms.allow = map_old_perms(dfa_user_allow(dfa, state)); in aa_compute_fperms()
240 perms.audit = map_old_perms(dfa_user_audit(dfa, state)); in aa_compute_fperms()
241 perms.quiet = map_old_perms(dfa_user_quiet(dfa, state)); in aa_compute_fperms()
242 perms.xindex = dfa_user_xindex(dfa, state); in aa_compute_fperms()
244 perms.allow = map_old_perms(dfa_other_allow(dfa, state)); in aa_compute_fperms()
245 perms.audit = map_old_perms(dfa_other_audit(dfa, state)); in aa_compute_fperms()
246 perms.quiet = map_old_perms(dfa_other_quiet(dfa, state)); in aa_compute_fperms()
247 perms.xindex = dfa_other_xindex(dfa, state); in aa_compute_fperms()
249 perms.allow |= AA_MAY_GETATTR; in aa_compute_fperms()
253 perms.allow |= AA_MAY_CHANGE_PROFILE; in aa_compute_fperms()
255 perms.allow |= AA_MAY_ONEXEC; in aa_compute_fperms()
257 return perms; in aa_compute_fperms()
272 struct aa_perms *perms) in aa_str_perms() argument
276 *perms = aa_compute_fperms(dfa, state, cond); in aa_str_perms()
283 struct aa_perms *perms) in __aa_path_perm() argument
289 aa_str_perms(profile->file.dfa, profile->file.start, name, cond, perms); in __aa_path_perm()
290 if (request & ~perms->allow) in __aa_path_perm()
292 return aa_audit_file(profile, perms, op, request, name, NULL, NULL, in __aa_path_perm()
300 struct aa_perms *perms) in profile_path_perm() argument
314 perms); in profile_path_perm()
332 struct aa_perms perms = {}; in aa_path_perm() local
342 cond, flags, &perms)); in aa_path_perm()
375 struct aa_perms lperms = {}, perms; in profile_path_link() local
402 aa_str_perms(profile->file.dfa, state, tname, cond, &perms); in profile_path_link()
407 lperms.audit = perms.audit; in profile_path_link()
408 lperms.quiet = perms.quiet; in profile_path_link()
409 lperms.kill = perms.kill; in profile_path_link()
411 if (!(perms.allow & AA_MAY_LINK)) { in profile_path_link()
413 lperms = perms; in profile_path_link()
418 if (!(perms.allow & AA_LINK_SUBSET)) in profile_path_link()
425 &perms); in profile_path_link()
429 lperms.allow &= perms.allow | AA_MAY_LINK; in profile_path_link()
431 request |= AA_AUDIT_FILE_MASK & (lperms.allow & ~perms.allow); in profile_path_link()
435 !xindex_is_subset(lperms.xindex, perms.xindex)) { in profile_path_link()
517 struct aa_perms perms = {}; in __file_path_perm() local
536 request, &cond, flags, &perms)); in __file_path_perm()
550 &perms)); in __file_path_perm()
555 &perms)); in __file_path_perm()