summaryrefslogtreecommitdiffstats
path: root/sys/fs/devfs/devfs_vnops.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_vnops.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_vnops.c')
-rw-r--r--sys/fs/devfs/devfs_vnops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c
index f7b99d5..844d6bc 100644
--- a/sys/fs/devfs/devfs_vnops.c
+++ b/sys/fs/devfs/devfs_vnops.c
@@ -832,7 +832,7 @@ devfs_setlabel(ap)
de = vp->v_data;
mac_relabel_vnode(ap->a_cred, vp, ap->a_label);
- mac_update_devfsdirent(de, vp);
+ mac_update_devfsdirent(vp->v_mount, de, vp);
return (0);
}
@@ -869,7 +869,7 @@ devfs_symlink(ap)
bcopy(ap->a_target, de->de_symlink, i);
lockmgr(&dmp->dm_lock, LK_EXCLUSIVE, 0, curthread);
#ifdef MAC
- mac_create_devfs_symlink(ap->a_cnp->cn_cred, dd, de);
+ mac_create_devfs_symlink(ap->a_cnp->cn_cred, dmp->dm_mount, dd, de);
#endif
TAILQ_INSERT_TAIL(&dd->de_dlist, de, de_list);
devfs_allocv(de, ap->a_dvp->v_mount, ap->a_vpp, 0);
OpenPOWER on IntegriCloud