summaryrefslogtreecommitdiffstats
path: root/sys/fs/devfs/devfs_vfsops.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2002-12-09 03:44:28 +0000
committerrwatson <rwatson@FreeBSD.org>2002-12-09 03:44:28 +0000
commitc5caffe9c429caa50e5fbb079d7ee14257116c62 (patch)
treed6e9f6d24a2d8fb99e7d51ac22d960517e26182b /sys/fs/devfs/devfs_vfsops.c
parent5fcceddc0789f268ea6002c625215947c0cbe4b9 (diff)
downloadFreeBSD-src-c5caffe9c429caa50e5fbb079d7ee14257116c62.zip
FreeBSD-src-c5caffe9c429caa50e5fbb079d7ee14257116c62.tar.gz
Remove dm_root entry from struct devfs_mount. It's never set, and is
unused. Replace it with a dm_mount back-pointer to the struct mount that the devfs_mount is associated with. Export that pointer to MAC Framework entry points, where all current policies don't use the pointer. This permits the SEBSD port of SELinux's FLASK/TE to compile out-of-the-box on 5.0-CURRENT with full file system labeling support. Approved by: re (murray) Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
Diffstat (limited to 'sys/fs/devfs/devfs_vfsops.c')
-rw-r--r--sys/fs/devfs/devfs_vfsops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/fs/devfs/devfs_vfsops.c b/sys/fs/devfs/devfs_vfsops.c
index 5f4d855..e74b4e9 100644
--- a/sys/fs/devfs/devfs_vfsops.c
+++ b/sys/fs/devfs/devfs_vfsops.c
@@ -88,6 +88,7 @@ devfs_nmount(mp, ndp, td)
#ifdef MAC
mp->mnt_flag |= MNT_MULTILABEL;
#endif
+ fmp->dm_mount = mp;
mp->mnt_data = (qaddr_t) fmp;
vfs_getnewfsid(mp);
@@ -96,7 +97,7 @@ devfs_nmount(mp, ndp, td)
fmp->dm_rootdir = devfs_vmkdir("(root)", 6, NULL);
fmp->dm_rootdir->de_inode = 2;
#ifdef MAC
- mac_create_devfs_directory("", 0, fmp->dm_rootdir);
+ mac_create_devfs_directory(mp, "", 0, fmp->dm_rootdir);
#endif
fmp->dm_basedir = fmp->dm_rootdir;
devfs_rules_newmount(fmp, td);
OpenPOWER on IntegriCloud