Lines Matching refs:mp
121 mac_mount_label_init(struct mount *mp)
124 mp->mnt_mntlabel = mac_mount_label_alloc();
188 mac_mount_label_destroy(struct mount *mp)
190 if (mp->mnt_mntlabel != NULL) {
191 mac_mount_label_free(mp->mnt_mntlabel);
192 mp->mnt_mntlabel = NULL;
288 mac_devfs_label_update(struct mount *mp, struct devnode *de,
295 MAC_PERFORM(devfs_label_update, mp, de, de->dn_label, vp,
300 mac_vnode_label_associate(struct mount *mp, struct vnode *vp, vfs_context_t ctx)
313 mac_vnode_label_associate_devfs(mp, dnp, vp);
317 error = mac_vnode_label_associate_fdesc(mp, fnp, vp, ctx);
320 error = mac_vnode_label_associate_extattr(mp, vp);
328 mac_vnode_label_associate_devfs(struct mount *mp, struct devnode *de,
335 mp, mp ? mp->mnt_mntlabel : NULL,
341 mac_vnode_label_associate_extattr(struct mount *mp, struct vnode *vp)
345 MAC_CHECK(vnode_label_associate_extattr, mp, mp->mnt_mntlabel, vp,
352 mac_vnode_label_associate_singlelabel(struct mount *mp, struct vnode *vp)
358 MAC_PERFORM(vnode_label_associate_singlelabel, mp,
359 mp ? mp->mnt_mntlabel : NULL, vp, vp->v_label);
363 mac_vnode_notify_create(vfs_context_t ctx, struct mount *mp,
374 MAC_CHECK(vnode_notify_create, cred, mp, mp->mnt_mntlabel,
414 mac_vnode_label_update_extattr(struct mount *mp, struct vnode *vp,
422 MAC_PERFORM(vnode_label_update_extattr, mp, mp->mnt_mntlabel, vp,
1198 mac_mount_label_associate(vfs_context_t ctx, struct mount *mp)
1205 if ((mp->mnt_flag & MNT_ROOTFS) &&
1206 (strcmp(mp->mnt_vfsstat.f_fstypename, "hfs") == 0))
1207 mp->mnt_flag |= MNT_MULTILABEL;
1210 if (strcmp(mp->mnt_vfsstat.f_fstypename, "devfs") == 0)
1211 mp->mnt_flag |= MNT_MULTILABEL;
1214 if (strcmp(mp->mnt_vfsstat.f_fstypename, "fdesc") == 0)
1215 mp->mnt_flag |= MNT_MULTILABEL;
1218 if (strcmp(mp->mnt_vfsstat.f_fstypename, "nfs") == 0)
1219 mp->mnt_flag |= MNT_MULTILABEL;
1222 if (strcmp(mp->mnt_vfsstat.f_fstypename, "afpfs") == 0)
1223 mp->mnt_flag |= MNT_MULTILABEL;
1225 if (mp->mnt_vtable != NULL) {
1227 if ((mp->mnt_vtable->vfc_vfsflags & VFC_VFSNATIVEXATTR))
1228 mp->mnt_flag |= MNT_MULTILABEL;
1231 if ((mp->mnt_vtable->vfc_vfsflags & VFC_VFSNOMACLABEL) &&
1232 (mp->mnt_flag & MNT_MULTILABEL))
1233 mp->mnt_flag &= ~MNT_MULTILABEL;
1236 MAC_PERFORM(mount_label_associate, cred, mp, mp->mnt_mntlabel);
1239 mp->mnt_flag & MNT_MULTILABEL ? "multilabel" : "singlelabel",
1240 mp->mnt_vfsstat.f_mntfromname,
1241 mp->mnt_vfsstat.f_mntonname,
1242 mp->mnt_vfsstat.f_fstypename);
1264 mac_mount_check_remount(vfs_context_t ctx, struct mount *mp)
1274 MAC_CHECK(mount_check_remount, cred, mp, mp->mnt_mntlabel);
1280 mac_mount_check_umount(vfs_context_t ctx, struct mount *mp)
1290 MAC_CHECK(mount_check_umount, cred, mp, mp->mnt_mntlabel);
1296 mac_mount_check_getattr(vfs_context_t ctx, struct mount *mp,
1307 MAC_CHECK(mount_check_getattr, cred, mp, mp->mnt_mntlabel, vfa);
1312 mac_mount_check_setattr(vfs_context_t ctx, struct mount *mp,
1323 MAC_CHECK(mount_check_setattr, cred, mp, mp->mnt_mntlabel, vfa);
1360 mac_mount_check_fsctl(vfs_context_t ctx, struct mount *mp, u_int cmd)
1370 MAC_CHECK(mount_check_fsctl, cred, mp, mp->mnt_mntlabel, cmd);
1445 mac_vnode_label_associate_fdesc(struct mount *mp, struct fdescnode *fnp,
1462 mp, mp->mnt_mntlabel, NULL, NULL, vp, vp->v_label);
1514 mp, mp->mnt_mntlabel, fp->f_fglob, fp->f_fglob->fg_label,