Lines Matching full:profile
117 * @profile: the profile being enforced (NOT NULL)
133 struct aa_profile *profile, const char *op, in audit_mount() argument
145 if (unlikely(AUDIT_MODE(profile) == AUDIT_ALL)) in audit_mount()
163 AUDIT_MODE(profile) != AUDIT_NOQUIET && in audit_mount()
164 AUDIT_MODE(profile) != AUDIT_ALL) in audit_mount()
182 return aa_audit(audit_type, profile, &ad, audit_cb); in audit_mount()
279 static int path_flags(struct aa_profile *profile, const struct path *path) in path_flags() argument
281 AA_BUG(!profile); in path_flags()
284 return profile->path_flags | in path_flags()
291 * @profile: the confining profile
304 struct aa_profile *profile, in match_mnt_path_str() argument
312 struct aa_ruleset *rules = list_first_entry(&profile->rules, in match_mnt_path_str()
316 AA_BUG(!profile); in match_mnt_path_str()
323 error = aa_path_name(mntpath, path_flags(profile, mntpath), buffer, in match_mnt_path_str()
324 &mntpnt, &info, profile->disconnected); in match_mnt_path_str()
345 return audit_mount(subj_cred, profile, OP_MOUNT, mntpnt, devname, in match_mnt_path_str()
353 * @profile: the confining profile
366 struct aa_profile *profile, const struct path *path, in match_mnt() argument
372 struct aa_ruleset *rules = list_first_entry(&profile->rules, in match_mnt()
376 AA_BUG(!profile); in match_mnt()
383 error = aa_path_name(devpath, path_flags(profile, devpath), in match_mnt()
385 profile->disconnected); in match_mnt()
390 return match_mnt_path_str(subj_cred, profile, path, buffer, devname, in match_mnt()
398 struct aa_profile *profile; in aa_remount() local
411 error = fn_for_each_confined(label, profile, in aa_remount()
412 match_mnt(subj_cred, profile, path, buffer, NULL, in aa_remount()
424 struct aa_profile *profile; in aa_bind_mount() local
447 error = fn_for_each_confined(label, profile, in aa_bind_mount()
448 match_mnt(subj_cred, profile, path, buffer, &old_path, in aa_bind_mount()
462 struct aa_profile *profile; in aa_mount_change_type() local
476 error = fn_for_each_confined(label, profile, in aa_mount_change_type()
477 match_mnt(subj_cred, profile, path, buffer, NULL, in aa_mount_change_type()
489 struct aa_profile *profile; in aa_move_mount() local
506 error = fn_for_each_confined(label, profile, in aa_move_mount()
507 match_mnt(subj_cred, profile, to_path, to_buffer, in aa_move_mount()
539 struct aa_profile *profile; in aa_new_mount() local
581 error = fn_for_each_confined(label, profile, in aa_new_mount()
582 match_mnt(subj_cred, profile, path, buffer, in aa_new_mount()
586 error = fn_for_each_confined(label, profile, in aa_new_mount()
587 match_mnt_path_str(subj_cred, profile, path, in aa_new_mount()
602 struct aa_profile *profile, const struct path *path, in profile_umount() argument
605 struct aa_ruleset *rules = list_first_entry(&profile->rules, in profile_umount()
612 AA_BUG(!profile); in profile_umount()
618 error = aa_path_name(path, path_flags(profile, path), buffer, &name, in profile_umount()
619 &info, profile->disconnected); in profile_umount()
631 return audit_mount(subj_cred, profile, OP_UMOUNT, name, NULL, NULL, in profile_umount()
639 struct aa_profile *profile; in aa_umount() local
651 error = fn_for_each_confined(label, profile, in aa_umount()
652 profile_umount(subj_cred, profile, &path, buffer)); in aa_umount()
663 struct aa_profile *profile, in build_pivotroot() argument
669 struct aa_ruleset *rules = list_first_entry(&profile->rules, in build_pivotroot()
677 AA_BUG(!profile); in build_pivotroot()
681 if (profile_unconfined(profile) || in build_pivotroot()
683 return aa_get_newest_label(&profile->label); in build_pivotroot()
685 error = aa_path_name(old_path, path_flags(profile, old_path), in build_pivotroot()
687 profile->disconnected); in build_pivotroot()
690 error = aa_path_name(new_path, path_flags(profile, new_path), in build_pivotroot()
692 profile->disconnected); in build_pivotroot()
708 error = audit_mount(subj_cred, profile, OP_PIVOTROOT, new_name, in build_pivotroot()
715 return aa_get_newest_label(&profile->label); in build_pivotroot()
722 struct aa_profile *profile; in aa_pivotroot() local
736 target = fn_label_build(label, profile, GFP_KERNEL, in aa_pivotroot()
737 build_pivotroot(subj_cred, profile, new_path, in aa_pivotroot()
763 error = fn_for_each(label, profile, in aa_pivotroot()
764 audit_mount(subj_cred, profile, OP_PIVOTROOT, in aa_pivotroot()