Lines Matching refs:mp
121 mac_mount_label_init(struct mount *mp)
124 mp->mnt_mntlabel = mac_mount_label_alloc();
183 mac_mount_label_destroy(struct mount *mp)
187 if (mp->mnt_mntlabel != NULL) {
188 mac_mount_label_free(mp->mnt_mntlabel);
189 mp->mnt_mntlabel = NULL;
282 mac_devfs_label_update(struct mount *mp, struct devnode *de,
289 MAC_PERFORM(devfs_label_update, mp, de, de->dn_label, vp,
294 mac_vnode_label_associate(struct mount *mp, struct vnode *vp, vfs_context_t ctx)
307 mac_vnode_label_associate_devfs(mp, dnp, vp);
311 error = mac_vnode_label_associate_fdesc(mp, fnp, vp, ctx);
314 error = mac_vnode_label_associate_extattr(mp, vp);
322 mac_vnode_label_associate_devfs(struct mount *mp, struct devnode *de,
329 mp, mp ? mp->mnt_mntlabel : NULL,
335 mac_vnode_label_associate_extattr(struct mount *mp, struct vnode *vp)
339 MAC_CHECK(vnode_label_associate_extattr, mp, mp->mnt_mntlabel, vp,
346 mac_vnode_label_associate_singlelabel(struct mount *mp, struct vnode *vp)
352 MAC_PERFORM(vnode_label_associate_singlelabel, mp,
353 mp ? mp->mnt_mntlabel : NULL, vp, vp->v_label);
357 mac_vnode_notify_create(vfs_context_t ctx, struct mount *mp,
368 MAC_CHECK(vnode_notify_create, cred, mp, mp->mnt_mntlabel,
380 mac_vnode_label_update_extattr(struct mount *mp, struct vnode *vp,
388 MAC_PERFORM(vnode_label_update_extattr, mp, mp->mnt_mntlabel, vp,
1088 mac_mount_label_associate(vfs_context_t ctx, struct mount *mp)
1095 if ((mp->mnt_flag & MNT_ROOTFS) &&
1096 (strcmp(mp->mnt_vfsstat.f_fstypename, "hfs") == 0))
1097 mp->mnt_flag |= MNT_MULTILABEL;
1100 if (strcmp(mp->mnt_vfsstat.f_fstypename, "devfs") == 0)
1101 mp->mnt_flag |= MNT_MULTILABEL;
1104 if (strcmp(mp->mnt_vfsstat.f_fstypename, "fdesc") == 0)
1105 mp->mnt_flag |= MNT_MULTILABEL;
1108 if (strcmp(mp->mnt_vfsstat.f_fstypename, "nfs") == 0)
1109 mp->mnt_flag |= MNT_MULTILABEL;
1112 if (strcmp(mp->mnt_vfsstat.f_fstypename, "afpfs") == 0)
1113 mp->mnt_flag |= MNT_MULTILABEL;
1115 if (mp->mnt_vtable != NULL) {
1117 if ((mp->mnt_vtable->vfc_vfsflags & VFC_VFSNATIVEXATTR))
1118 mp->mnt_flag |= MNT_MULTILABEL;
1121 if ((mp->mnt_vtable->vfc_vfsflags & VFC_VFSNOMACLABEL) &&
1122 (mp->mnt_flag & MNT_MULTILABEL))
1123 mp->mnt_flag &= ~MNT_MULTILABEL;
1126 MAC_PERFORM(mount_label_associate, cred, mp, mp->mnt_mntlabel);
1129 mp->mnt_flag & MNT_MULTILABEL ? "multilabel" : "singlelabel",
1130 mp->mnt_vfsstat.f_mntfromname,
1131 mp->mnt_vfsstat.f_mntonname,
1132 mp->mnt_vfsstat.f_fstypename);
1154 mac_mount_check_remount(vfs_context_t ctx, struct mount *mp)
1164 MAC_CHECK(mount_check_remount, cred, mp, mp->mnt_mntlabel);
1170 mac_mount_check_umount(vfs_context_t ctx, struct mount *mp)
1180 MAC_CHECK(mount_check_umount, cred, mp, mp->mnt_mntlabel);
1186 mac_mount_check_getattr(vfs_context_t ctx, struct mount *mp,
1197 MAC_CHECK(mount_check_getattr, cred, mp, mp->mnt_mntlabel, vfa);
1202 mac_mount_check_setattr(vfs_context_t ctx, struct mount *mp,
1213 MAC_CHECK(mount_check_setattr, cred, mp, mp->mnt_mntlabel, vfa);
1250 mac_mount_check_fsctl(vfs_context_t ctx, struct mount *mp, u_int cmd)
1260 MAC_CHECK(mount_check_fsctl, cred, mp, mp->mnt_mntlabel, cmd);
1335 mac_vnode_label_associate_fdesc(struct mount *mp, struct fdescnode *fnp,
1352 mp, mp->mnt_mntlabel, NULL, NULL, vp, vp->v_label);
1404 mp, mp->mnt_mntlabel, fp->f_fglob, fp->f_fglob->fg_label,