From 60570a92bf794d255e5f8ed235b49c553776ad92 Mon Sep 17 00:00:00 2001 From: rwatson Date: Wed, 24 Oct 2007 19:04:04 +0000 Subject: 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__ mac__check_ 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 --- sys/fs/devfs/devfs_devs.c | 8 ++++---- sys/fs/devfs/devfs_vnops.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'sys/fs/devfs') 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)); -- cgit v1.1