Lines Matching refs:profile
135 struct aa_profile *profile, const char *op, in audit_mount() argument
147 if (unlikely(AUDIT_MODE(profile) == AUDIT_ALL)) in audit_mount()
165 AUDIT_MODE(profile) != AUDIT_NOQUIET && in audit_mount()
166 AUDIT_MODE(profile) != AUDIT_ALL) in audit_mount()
184 return aa_audit(audit_type, profile, &ad, audit_cb); in audit_mount()
281 static int path_flags(struct aa_profile *profile, const struct path *path) in path_flags() argument
283 AA_BUG(!profile); in path_flags()
286 return profile->path_flags | in path_flags()
306 struct aa_profile *profile, in match_mnt_path_str() argument
314 struct aa_ruleset *rules = list_first_entry(&profile->rules, in match_mnt_path_str()
318 AA_BUG(!profile); in match_mnt_path_str()
325 error = aa_path_name(mntpath, path_flags(profile, mntpath), buffer, in match_mnt_path_str()
326 &mntpnt, &info, profile->disconnected); in match_mnt_path_str()
347 return audit_mount(subj_cred, profile, OP_MOUNT, mntpnt, devname, in match_mnt_path_str()
368 struct aa_profile *profile, const struct path *path, in match_mnt() argument
374 struct aa_ruleset *rules = list_first_entry(&profile->rules, in match_mnt()
378 AA_BUG(!profile); in match_mnt()
385 error = aa_path_name(devpath, path_flags(profile, devpath), in match_mnt()
387 profile->disconnected); in match_mnt()
392 return match_mnt_path_str(subj_cred, profile, path, buffer, devname, in match_mnt()
400 struct aa_profile *profile; in aa_remount() local
413 error = fn_for_each_confined(label, profile, in aa_remount()
414 match_mnt(subj_cred, profile, path, buffer, NULL, in aa_remount()
426 struct aa_profile *profile; in aa_bind_mount() local
449 error = fn_for_each_confined(label, profile, in aa_bind_mount()
450 match_mnt(subj_cred, profile, path, buffer, &old_path, in aa_bind_mount()
464 struct aa_profile *profile; in aa_mount_change_type() local
478 error = fn_for_each_confined(label, profile, in aa_mount_change_type()
479 match_mnt(subj_cred, profile, path, buffer, NULL, in aa_mount_change_type()
491 struct aa_profile *profile; in aa_move_mount() local
508 error = fn_for_each_confined(label, profile, in aa_move_mount()
509 match_mnt(subj_cred, profile, to_path, to_buffer, in aa_move_mount()
541 struct aa_profile *profile; in aa_new_mount() local
583 error = fn_for_each_confined(label, profile, in aa_new_mount()
584 match_mnt(subj_cred, profile, path, buffer, in aa_new_mount()
588 error = fn_for_each_confined(label, profile, in aa_new_mount()
589 match_mnt_path_str(subj_cred, profile, path, in aa_new_mount()
604 struct aa_profile *profile, const struct path *path, in profile_umount() argument
607 struct aa_ruleset *rules = list_first_entry(&profile->rules, in profile_umount()
614 AA_BUG(!profile); in profile_umount()
620 error = aa_path_name(path, path_flags(profile, path), buffer, &name, in profile_umount()
621 &info, profile->disconnected); in profile_umount()
633 return audit_mount(subj_cred, profile, OP_UMOUNT, name, NULL, NULL, in profile_umount()
641 struct aa_profile *profile; in aa_umount() local
653 error = fn_for_each_confined(label, profile, in aa_umount()
654 profile_umount(subj_cred, profile, &path, buffer)); in aa_umount()
665 struct aa_profile *profile, in build_pivotroot() argument
671 struct aa_ruleset *rules = list_first_entry(&profile->rules, in build_pivotroot()
679 AA_BUG(!profile); in build_pivotroot()
683 if (profile_unconfined(profile) || in build_pivotroot()
685 return aa_get_newest_label(&profile->label); in build_pivotroot()
687 error = aa_path_name(old_path, path_flags(profile, old_path), in build_pivotroot()
689 profile->disconnected); in build_pivotroot()
692 error = aa_path_name(new_path, path_flags(profile, new_path), in build_pivotroot()
694 profile->disconnected); in build_pivotroot()
710 error = audit_mount(subj_cred, profile, OP_PIVOTROOT, new_name, in build_pivotroot()
717 return aa_get_newest_label(&profile->label); in build_pivotroot()
724 struct aa_profile *profile; in aa_pivotroot() local
738 target = fn_label_build(label, profile, GFP_KERNEL, in aa_pivotroot()
739 build_pivotroot(subj_cred, profile, new_path, in aa_pivotroot()
765 error = fn_for_each(label, profile, in aa_pivotroot()
766 audit_mount(subj_cred, profile, OP_PIVOTROOT, in aa_pivotroot()