diff options
| author | Robert Watson <rwatson@FreeBSD.org> | 2007-04-23 13:36:54 +0000 |
|---|---|---|
| committer | Robert Watson <rwatson@FreeBSD.org> | 2007-04-23 13:36:54 +0000 |
| commit | 305759909e4d09b2016bcc57f650a09cee23955d (patch) | |
| tree | 14bfe298fcdbdad74972de0dc9e05993e61787a1 /sys/security/mac | |
| parent | 78007886c995898a9494648343e5236bca1cbba3 (diff) | |
Notes
Diffstat (limited to 'sys/security/mac')
| -rw-r--r-- | sys/security/mac/mac_framework.h | 6 | ||||
| -rw-r--r-- | sys/security/mac/mac_policy.h | 12 | ||||
| -rw-r--r-- | sys/security/mac/mac_vfs.c | 22 |
3 files changed, 19 insertions, 21 deletions
diff --git a/sys/security/mac/mac_framework.h b/sys/security/mac/mac_framework.h index 64b4b90c98bc5..772fe3783da0b 100644 --- a/sys/security/mac/mac_framework.h +++ b/sys/security/mac/mac_framework.h @@ -91,7 +91,7 @@ struct vop_setlabel_args; */ void mac_init_bpfdesc(struct bpf_d *); void mac_init_cred(struct ucred *); -void mac_init_devfsdirent(struct devfs_dirent *); +void mac_init_devfs(struct devfs_dirent *); void mac_init_ifnet(struct ifnet *); int mac_init_inpcb(struct inpcb *, int); void mac_init_sysv_msgmsg(struct msg *); @@ -112,7 +112,7 @@ void mac_copy_mbuf_tag(struct m_tag *, struct m_tag *); void mac_copy_vnode_label(struct label *, struct label *); void mac_destroy_bpfdesc(struct bpf_d *); void mac_destroy_cred(struct ucred *); -void mac_destroy_devfsdirent(struct devfs_dirent *); +void mac_destroy_devfs(struct devfs_dirent *); void mac_destroy_ifnet(struct ifnet *); void mac_destroy_inpcb(struct inpcb *); void mac_destroy_sysv_msgmsg(struct msg *); @@ -152,7 +152,7 @@ int mac_create_vnode_extattr(struct ucred *cred, struct mount *mp, void mac_create_mount(struct ucred *cred, struct mount *mp); void mac_relabel_vnode(struct ucred *cred, struct vnode *vp, struct label *newlabel); -void mac_update_devfsdirent(struct mount *mp, struct devfs_dirent *de, +void mac_update_devfs(struct mount *mp, struct devfs_dirent *de, struct vnode *vp); /* diff --git a/sys/security/mac/mac_policy.h b/sys/security/mac/mac_policy.h index 75a55bd060531..efe0118a7b679 100644 --- a/sys/security/mac/mac_policy.h +++ b/sys/security/mac/mac_policy.h @@ -117,7 +117,7 @@ typedef void (*mpo_placeholder_t)(void); */ typedef void (*mpo_init_bpfdesc_label_t)(struct label *label); typedef void (*mpo_init_cred_label_t)(struct label *label); -typedef void (*mpo_init_devfsdirent_label_t)(struct label *label); +typedef void (*mpo_init_devfs_label_t)(struct label *label); typedef void (*mpo_init_ifnet_label_t)(struct label *label); typedef int (*mpo_init_inpcb_label_t)(struct label *label, int flag); typedef void (*mpo_init_sysv_msgmsg_label_t)(struct label *label); @@ -136,7 +136,7 @@ typedef void (*mpo_init_proc_label_t)(struct label *label); typedef void (*mpo_init_vnode_label_t)(struct label *label); typedef void (*mpo_destroy_bpfdesc_label_t)(struct label *label); typedef void (*mpo_destroy_cred_label_t)(struct label *label); -typedef void (*mpo_destroy_devfsdirent_label_t)(struct label *label); +typedef void (*mpo_destroy_devfs_label_t)(struct label *label); typedef void (*mpo_destroy_ifnet_label_t)(struct label *label); typedef void (*mpo_destroy_inpcb_label_t)(struct label *label); typedef void (*mpo_destroy_sysv_msgmsg_label_t)(struct label *label); @@ -227,7 +227,7 @@ typedef void (*mpo_relabel_vnode_t)(struct ucred *cred, struct vnode *vp, typedef int (*mpo_setlabel_vnode_extattr_t)(struct ucred *cred, struct vnode *vp, struct label *vplabel, struct label *intlabel); -typedef void (*mpo_update_devfsdirent_t)(struct mount *mp, +typedef void (*mpo_update_devfs_t)(struct mount *mp, struct devfs_dirent *de, struct label *delabel, struct vnode *vp, struct label *vplabel); @@ -630,7 +630,7 @@ struct mac_policy_ops { */ mpo_init_bpfdesc_label_t mpo_init_bpfdesc_label; mpo_init_cred_label_t mpo_init_cred_label; - mpo_init_devfsdirent_label_t mpo_init_devfsdirent_label; + mpo_init_devfs_label_t mpo_init_devfs_label; mpo_placeholder_t _mpo_placeholder0; mpo_init_ifnet_label_t mpo_init_ifnet_label; mpo_init_inpcb_label_t mpo_init_inpcb_label; @@ -649,7 +649,7 @@ struct mac_policy_ops { mpo_init_vnode_label_t mpo_init_vnode_label; mpo_destroy_bpfdesc_label_t mpo_destroy_bpfdesc_label; mpo_destroy_cred_label_t mpo_destroy_cred_label; - mpo_destroy_devfsdirent_label_t mpo_destroy_devfsdirent_label; + mpo_destroy_devfs_label_t mpo_destroy_devfs_label; mpo_placeholder_t _mpo_placeholder1; mpo_destroy_ifnet_label_t mpo_destroy_ifnet_label; mpo_destroy_inpcb_label_t mpo_destroy_inpcb_label; @@ -706,7 +706,7 @@ struct mac_policy_ops { mpo_create_mount_t mpo_create_mount; mpo_relabel_vnode_t mpo_relabel_vnode; mpo_setlabel_vnode_extattr_t mpo_setlabel_vnode_extattr; - mpo_update_devfsdirent_t mpo_update_devfsdirent; + mpo_update_devfs_t mpo_update_devfs; /* * Labeling event operations: IPC objects. diff --git a/sys/security/mac/mac_vfs.c b/sys/security/mac/mac_vfs.c index c6726d2fdbbc4..ed716dbbb9b7f 100644 --- a/sys/security/mac/mac_vfs.c +++ b/sys/security/mac/mac_vfs.c @@ -81,20 +81,20 @@ static int mac_setlabel_vnode_extattr(struct ucred *cred, struct vnode *vp, struct label *intlabel); static struct label * -mac_devfsdirent_label_alloc(void) +mac_devfs_label_alloc(void) { struct label *label; label = mac_labelzone_alloc(M_WAITOK); - MAC_PERFORM(init_devfsdirent_label, label); + MAC_PERFORM(init_devfs_label, label); return (label); } void -mac_init_devfsdirent(struct devfs_dirent *de) +mac_init_devfs(struct devfs_dirent *de) { - de->de_label = mac_devfsdirent_label_alloc(); + de->de_label = mac_devfs_label_alloc(); } static struct label * @@ -132,18 +132,18 @@ mac_init_vnode(struct vnode *vp) } static void -mac_devfsdirent_label_free(struct label *label) +mac_devfs_label_free(struct label *label) { - MAC_PERFORM(destroy_devfsdirent_label, label); + MAC_PERFORM(destroy_devfs_label, label); mac_labelzone_free(label); } void -mac_destroy_devfsdirent(struct devfs_dirent *de) +mac_destroy_devfs(struct devfs_dirent *de) { - mac_devfsdirent_label_free(de->de_label); + mac_devfs_label_free(de->de_label); de->de_label = NULL; } @@ -208,12 +208,10 @@ mac_internalize_vnode_label(struct label *label, char *string) } void -mac_update_devfsdirent(struct mount *mp, struct devfs_dirent *de, - struct vnode *vp) +mac_update_devfs(struct mount *mp, struct devfs_dirent *de, struct vnode *vp) { - MAC_PERFORM(update_devfsdirent, mp, de, de->de_label, vp, - vp->v_label); + MAC_PERFORM(update_devfs, mp, de, de->de_label, vp, vp->v_label); } void |
