Lines Matching full:ad
95 struct apparmor_audit_data *ad = aad(sa); in audit_cb() local
97 if (ad->mnt.type) { in audit_cb()
99 audit_log_untrustedstring(ab, ad->mnt.type); in audit_cb()
101 if (ad->mnt.src_name) { in audit_cb()
103 audit_log_untrustedstring(ab, ad->mnt.src_name); in audit_cb()
105 if (ad->mnt.trans) { in audit_cb()
107 audit_log_untrustedstring(ab, ad->mnt.trans); in audit_cb()
109 if (ad->mnt.flags) { in audit_cb()
111 audit_mnt_flags(ab, ad->mnt.flags); in audit_cb()
114 if (ad->mnt.data) { in audit_cb()
116 audit_log_untrustedstring(ab, ad->mnt.data); in audit_cb()
234 * @ad: apparmor audit data structure
243 struct apparmor_audit_data *ad) in match_mnt_path_str() argument
257 ad->mnt.type = type; in match_mnt_path_str()
260 &mntpnt, &ad->info, profile->disconnected); in match_mnt_path_str()
263 error, ad, audit_cb); in match_mnt_path_str()
264 ad->name = mntpnt; in match_mnt_path_str()
268 ad->info = devinfo; in match_mnt_path_str()
270 error, ad, audit_cb); in match_mnt_path_str()
272 ad->mnt.src_name = devname; in match_mnt_path_str()
278 ad->info = mnt_info_table[pos]; in match_mnt_path_str()
282 ad->mnt.data = data; in match_mnt_path_str()
283 return aa_check_perms(profile, &perms, AA_MAY_MOUNT, ad, audit_cb); in match_mnt_path_str()
297 * @ad: apparmor audit data structure
304 bool binary, struct apparmor_audit_data *ad) in match_mnt() argument
325 type, flags, data, binary, info, ad); in match_mnt()
336 DEFINE_AUDIT_MOUNT(ad, OP_MOUNT, subj_cred); in aa_remount()
337 ad.mnt.flags = flags; in aa_remount()
349 flags, data, binary, &ad)); in aa_remount()
363 DEFINE_AUDIT_MOUNT(ad, OP_MOUNT, subj_cred); in aa_bind_mount()
372 ad.mnt.flags = flags; in aa_bind_mount()
376 return aa_audit_perm_error(label, AA_MAY_MOUNT, error, &ad, in aa_bind_mount()
387 old_buffer, NULL, flags, NULL, false, &ad)); in aa_bind_mount()
403 DEFINE_AUDIT_MOUNT(ad, OP_MOUNT, subj_cred); in aa_mount_change_type()
411 ad.mnt.flags = flags; in aa_mount_change_type()
418 flags, NULL, false, &ad)); in aa_mount_change_type()
431 DEFINE_AUDIT_MOUNT(ad, OP_MOUNT, subj_cred); in aa_move_mount()
432 ad.mnt.flags = MS_MOVE; in aa_move_mount()
450 &ad)); in aa_move_mount()
486 DEFINE_AUDIT_MOUNT(ad, OP_MOUNT, subj_cred); in aa_new_mount()
487 ad.mnt.flags = flags; in aa_new_mount()
527 binary, &ad)); in aa_new_mount()
532 binary, NULL, &ad)); in aa_new_mount()
545 char *buffer, struct apparmor_audit_data *ad) in profile_umount() argument
563 &ad->info, profile->disconnected); in profile_umount()
566 error, ad, audit_cb); in profile_umount()
568 ad->name = name; in profile_umount()
575 return aa_check_perms(profile, &perms, AA_MAY_UMOUNT, ad, audit_cb); in profile_umount()
585 DEFINE_AUDIT_MOUNT(ad, OP_UMOUNT, subj_cred); in aa_umount()
595 profile_umount(profile, &path, buffer, &ad)); in aa_umount()
610 struct apparmor_audit_data *ad) in build_pivotroot() argument
627 old_buffer, &old_name, &ad->info, in build_pivotroot()
631 ad->mnt.src_name = old_name; in build_pivotroot()
633 new_buffer, &new_name, &ad->info, in build_pivotroot()
637 ad->name = new_name; in build_pivotroot()
646 ad->mnt.trans = profile->label.hname; in build_pivotroot()
649 error = aa_check_perms(profile, &perms, AA_MAY_PIVOTROOT, ad, audit_cb); in build_pivotroot()
659 ad, audit_cb); in build_pivotroot()
671 DEFINE_AUDIT_MOUNT(ad, OP_PIVOTROOT, subj_cred); in aa_pivotroot()
684 old_path, old_buffer, &ad)); in aa_pivotroot()
704 ad.mnt.trans = target->hname; in aa_pivotroot()
705 error = aa_audit_perm_error(label, AA_MAY_PIVOTROOT, error, &ad, in aa_pivotroot()