summaryrefslogtreecommitdiffstats
path: root/sys/fs/devfs
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2007-10-24 19:04:04 +0000
committerrwatson <rwatson@FreeBSD.org>2007-10-24 19:04:04 +0000
commit60570a92bf794d255e5f8ed235b49c553776ad92 (patch)
treefea282db79628eed98808fd38cc46445b2f97ca5 /sys/fs/devfs
parent7781c2181af1113baab38322a55a90b5469cba03 (diff)
downloadFreeBSD-src-60570a92bf794d255e5f8ed235b49c553776ad92.zip
FreeBSD-src-60570a92bf794d255e5f8ed235b49c553776ad92.tar.gz
Merge first in a series of TrustedBSD MAC Framework KPI changes
from Mac OS X Leopard--rationalize naming for entry points to the following general forms: mac_<object>_<method/action> mac_<object>_check_<method/action> The previous naming scheme was inconsistent and mostly reversed from the new scheme. Also, make object types more consistent and remove spaces from object types that contain multiple parts ("posix_sem" -> "posixsem") to make mechanical parsing easier. Introduce a new "netinet" object type for certain IPv4/IPv6-related methods. Also simplify, slightly, some entry point names. All MAC policy modules will need to be recompiled, and modules not updates as part of this commit will need to be modified to conform to the new KPI. Sponsored by: SPARTA (original patches against Mac OS X) Obtained from: TrustedBSD Project, Apple Computer
Diffstat (limited to 'sys/fs/devfs')
-rw-r--r--sys/fs/devfs/devfs_devs.c8
-rw-r--r--sys/fs/devfs/devfs_vnops.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/fs/devfs/devfs_devs.c b/sys/fs/devfs/devfs_devs.c
index ca5c2de..526f20d 100644
--- a/sys/fs/devfs/devfs_devs.c
+++ b/sys/fs/devfs/devfs_devs.c
@@ -182,7 +182,7 @@ devfs_newdirent(char *name, int namelen)
de->de_links = 1;
de->de_holdcnt = 1;
#ifdef MAC
- mac_init_devfs(de);
+ mac_devfs_init(de);
#endif
return (de);
}
@@ -226,7 +226,7 @@ devfs_vmkdir(struct devfs_mount *dmp, char *name, int namelen, struct devfs_dire
}
#ifdef MAC
- mac_create_devfs_directory(dmp->dm_mount, name, namelen, dd);
+ mac_devfs_create_directory(dmp->dm_mount, name, namelen, dd);
#endif
return (dd);
}
@@ -274,7 +274,7 @@ devfs_delete(struct devfs_mount *dm, struct devfs_dirent *de, int vp_locked)
de->de_symlink = NULL;
}
#ifdef MAC
- mac_destroy_devfs(de);
+ mac_devfs_destroy(de);
#endif
if (de->de_inode > DEVFS_ROOTINO) {
free_unr(devfs_inos, de->de_inode);
@@ -452,7 +452,7 @@ devfs_populate_loop(struct devfs_mount *dm, int cleanup)
de->de_inode = cdp->cdp_inode;
de->de_cdp = cdp;
#ifdef MAC
- mac_create_devfs_device(cdp->cdp_c.si_cred, dm->dm_mount,
+ mac_devfs_create_device(cdp->cdp_c.si_cred, dm->dm_mount,
&cdp->cdp_c, de);
#endif
de->de_dir = dd;
diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c
index 5ed41de..ba01318 100644
--- a/sys/fs/devfs/devfs_vnops.c
+++ b/sys/fs/devfs/devfs_vnops.c
@@ -262,7 +262,7 @@ devfs_allocv(struct devfs_dirent *de, struct mount *mp, struct vnode **vpp, stru
return (ENOENT);
}
#ifdef MAC
- mac_associate_vnode_devfs(mp, de, vp);
+ mac_devfs_vnode_associate(mp, de, vp);
#endif
sx_xunlock(&dmp->dm_lock);
*vpp = vp;
@@ -1233,8 +1233,8 @@ devfs_setlabel(struct vop_setlabel_args *ap)
vp = ap->a_vp;
de = vp->v_data;
- mac_relabel_vnode(ap->a_cred, vp, ap->a_label);
- mac_update_devfs(vp->v_mount, de, vp);
+ mac_vnode_relabel(ap->a_cred, vp, ap->a_label);
+ mac_devfs_update(vp->v_mount, de, vp);
return (0);
}
@@ -1275,7 +1275,7 @@ devfs_symlink(struct vop_symlink_args *ap)
bcopy(ap->a_target, de->de_symlink, i);
sx_xlock(&dmp->dm_lock);
#ifdef MAC
- mac_create_devfs_symlink(ap->a_cnp->cn_cred, dmp->dm_mount, dd, de);
+ mac_devfs_create_symlink(ap->a_cnp->cn_cred, dmp->dm_mount, dd, de);
#endif
TAILQ_INSERT_TAIL(&dd->de_dlist, de, de_list);
return (devfs_allocv(de, ap->a_dvp->v_mount, ap->a_vpp, td));
OpenPOWER on IntegriCloud