From c5caffe9c429caa50e5fbb079d7ee14257116c62 Mon Sep 17 00:00:00 2001 From: rwatson Date: Mon, 9 Dec 2002 03:44:28 +0000 Subject: 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 --- sys/security/mac_stub/mac_stub.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'sys/security/mac_stub') diff --git a/sys/security/mac_stub/mac_stub.c b/sys/security/mac_stub/mac_stub.c index 0550793..99440db 100644 --- a/sys/security/mac_stub/mac_stub.c +++ b/sys/security/mac_stub/mac_stub.c @@ -169,22 +169,23 @@ mac_none_associate_vnode_singlelabel(struct mount *mp, } static void -mac_none_create_devfs_device(dev_t dev, struct devfs_dirent *devfs_dirent, - struct label *label) +mac_none_create_devfs_device(struct mount *mp, dev_t dev, + struct devfs_dirent *devfs_dirent, struct label *label) { } static void -mac_none_create_devfs_directory(char *dirname, int dirnamelen, - struct devfs_dirent *devfs_dirent, struct label *label) +mac_none_create_devfs_directory(struct mount *mp, char *dirname, + int dirnamelen, struct devfs_dirent *devfs_dirent, struct label *label) { } static void -mac_none_create_devfs_symlink(struct ucred *cred, struct devfs_dirent *dd, - struct label *ddlabel, struct devfs_dirent *de, struct label *delabel) +mac_none_create_devfs_symlink(struct ucred *cred, struct mount *mp, + struct devfs_dirent *dd, struct label *ddlabel, struct devfs_dirent *de, + struct label *delabel) { } @@ -228,8 +229,9 @@ mac_none_setlabel_vnode_extattr(struct ucred *cred, struct vnode *vp, } static void -mac_none_update_devfsdirent(struct devfs_dirent *devfs_dirent, - struct label *direntlabel, struct vnode *vp, struct label *vnodelabel) +mac_none_update_devfsdirent(struct mount *mp, + struct devfs_dirent *devfs_dirent, struct label *direntlabel, + struct vnode *vp, struct label *vnodelabel) { } -- cgit v1.1