PERFORCE change 100660 for review
Robert Watson
rwatson at FreeBSD.org
Wed Jul 5 21:53:39 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=100660
Change 100660 by rwatson at rwatson_zoo on 2006/07/05 21:51:38
Some renaming. (checkpoint)
Affected files ...
.. //depot/projects/trustedbsd/mac2/sys/sys/mac_policy.h#4 edit
Differences ...
==== //depot/projects/trustedbsd/mac2/sys/sys/mac_policy.h#4 (text+ko) ====
@@ -113,8 +113,8 @@
* attaching, which occurs with locks held. We might also want to allow
* attach to fail.
*/
-typedef void (*mpo_destroy_t)(struct mac_policy_conf *mpc);
-typedef void (*mpo_init_t)(struct mac_policy_conf *mpc);
+typedef void (*mpo_policy_destroy_t)(struct mac_policy_conf *mpc);
+typedef void (*mpo_policy_init_t)(struct mac_policy_conf *mpc);
/*
* General policy-directed security system call so that policies may
@@ -131,37 +131,37 @@
/*
* Object: struct bpfdesc (BPF descriptor)
*/
-typedef void (*mpo_init_bpfdesc_label_t)(struct label *label);
-typedef void (*mpo_destroy_bpfdesc_label_t)(struct label *label);
-typedef void (*mpo_create_bpfdesc_t)(struct ucred *cred,
+typedef void (*mpo_bpfdesc_init_label_t)(struct label *label);
+typedef void (*mpo_bpfdesc_destroy_label_t)(struct label *label);
+typedef void (*mpo_bpfdesc_create_t)(struct ucred *cred,
struct bpf_d *bpf_d, struct label *bpflabel);
-typedef void (*mpo_create_mbuf_from_bpfdesc_t)(struct bpf_d *bpf_d,
+typedef void (*mpo_bpfdesc_create_mbuf_t)(struct bpf_d *bpf_d,
struct label *bpflabel, struct mbuf *mbuf,
struct label *mbuflabel);
-typedef int (*mpo_check_bpfdesc_receive_t)(struct bpf_d *bpf_d,
+typedef int (*mpo_bpfdesc_check_receive_t)(struct bpf_d *bpf_d,
struct label *bpflabel, struct ifnet *ifnet,
struct label *ifnetlabel);
/*
* Object: struct devfsdirent (Devfs directory entry)
*/
-typedef void (*mpo_init_devfsdirent_label_t)(struct label *label);
-typedef void (*mpo_destroy_devfsdirent_label_t)(struct label *label);
-typedef void (*mpo_associate_vnode_devfs_t)(struct mount *mp,
+typedef void (*mpo_devfsdirent_init_label_t)(struct label *label);
+typedef void (*mpo_devfsdirent_destroy_label_t)(struct label *label);
+typedef void (*mpo_devfs_vnode_associate_t)(struct mount *mp,
struct label *fslabel, struct devfs_dirent *de,
struct label *delabel, struct vnode *vp,
struct label *vlabel);
-typedef void (*mpo_create_devfs_device_t)(struct ucred *cred,
+typedef void (*mpo_devfs_create_device_t)(struct ucred *cred,
struct mount *mp, struct cdev *dev,
struct devfs_dirent *de, struct label *label);
-typedef void (*mpo_create_devfs_directory_t)(struct mount *mp,
+typedef void (*mpo_devfs_create_directory_t)(struct mount *mp,
char *dirname, int dirnamelen, struct devfs_dirent *de,
struct label *label);
-typedef void (*mpo_create_devfs_symlink_t)(struct ucred *cred,
+typedef void (*mpo_devfs_create_symlink_t)(struct ucred *cred,
struct mount *mp, struct devfs_dirent *dd,
struct label *ddlabel, struct devfs_dirent *de,
struct label *delabel);
-typedef void (*mpo_update_devfsdirent_t)(struct mount *mp,
+typedef void (*mpo_devfsdirent_update_t)(struct mount *mp,
struct devfs_dirent *devfs_dirent,
struct label *direntlabel, struct vnode *vp,
struct label *vnodelabel);
@@ -169,171 +169,165 @@
/*
* Object: struct ucred (User credential)
*/
-typedef void (*mpo_init_cred_label_t)(struct label *label);
-typedef void (*mpo_destroy_cred_label_t)(struct label *label);
-typedef void (*mpo_copy_cred_label_t)(struct label *src,
+typedef void (*mpo_cred_init_label_t)(struct label *label);
+typedef void (*mpo_cred_destroy_cred_label_t)(struct label *label);
+typedef void (*mpo_cred_copy_label_t)(struct label *src,
struct label *dest);
-typedef int (*mpo_externalize_cred_label_t)(struct label *label,
+typedef int (*mpo_cred_externalize_label_t)(struct label *label,
char *element_name, struct sbuf *sb, int *claimed);
-typedef int (*mpo_internalize_cred_label_t)(struct label *label,
+typedef int (*mpo_cred_internalize_label_t)(struct label *label,
char *element_name, char *element_data, int *claimed);
-typedef void (*mpo_relabel_cred_t)(struct ucred *cred,
+typedef void (*mpo_cred_relabel_t)(struct ucred *cred,
struct label *newlabel);
-typedef int (*mpo_check_cred_relabel_t)(struct ucred *cred,
+typedef int (*mpo_cred_check_relabel_t)(struct ucred *cred,
struct label *newlabel);
-typedef int (*mpo_check_cred_visible_t)(struct ucred *u1,
+typedef int (*mpo_cred_check_visible_t)(struct ucred *u1,
struct ucred *u2);
/*
* Object: struct ifnet (Network interface)
*/
-typedef void (*mpo_init_ifnet_label_t)(struct label *label);
-typedef void (*mpo_destroy_ifnet_label_t)(struct label *label);
-typedef void (*mpo_copy_ifnet_label_t)(struct label *src,
+typedef void (*mpo_ifnet_init_label_t)(struct label *label);
+typedef void (*mpo_ifnet_destroy_label_t)(struct label *label);
+typedef void (*mpo_ifnet_copy_label_t)(struct label *src,
struct label *dest);
-typedef int (*mpo_externalize_ifnet_label_t)(struct label *label,
+typedef int (*mpo_ifnet_externalize_label_t)(struct label *label,
char *element_name, struct sbuf *sb, int *claimed);
-typedef int (*mpo_internalize_ifnet_label_t)(struct label *label,
+typedef int (*mpo_ifnet_internalize_label_t)(struct label *label,
char *element_name, char *element_data, int *claimed);
-typedef void (*mpo_create_ifnet_t)(struct ifnet *ifnet,
+typedef void (*mpo_ifnet_create_t)(struct ifnet *ifnet,
struct label *ifnetlabel);
typedef void (*mpo_create_mbuf_linklayer_t)(struct ifnet *ifnet,
struct label *ifnetlabel, struct mbuf *mbuf,
struct label *mbuflabel);
-typedef void (*mpo_create_mbuf_from_ifnet_t)(struct ifnet *ifnet,
+typedef void (*mpo_ifnet_create_mbuf_t)(struct ifnet *ifnet,
struct label *ifnetlabel, struct mbuf *mbuf,
struct label *mbuflabel);
typedef void (*mpo_create_mbuf_multicast_encap_t)(struct mbuf *oldmbuf,
struct label *oldmbuflabel, struct ifnet *ifnet,
struct label *ifnetlabel, struct mbuf *newmbuf,
struct label *newmbuflabel);
-typedef void (*mpo_relabel_ifnet_t)(struct ucred *cred,
+typedef void (*mpo_ifnet_relabel_t)(struct ucred *cred,
struct ifnet *ifnet, struct label *ifnetlabel,
struct label *newlabel);
-typedef int (*mpo_check_ifnet_relabel_t)(struct ucred *cred,
+typedef int (*mpo_ifnet_check_relabel_t)(struct ucred *cred,
struct ifnet *ifnet, struct label *ifnetlabel,
struct label *newlabel);
-typedef int (*mpo_check_ifnet_transmit_t)(struct ifnet *ifnet,
+typedef int (*mpo_ifnet_check_transmit_t)(struct ifnet *ifnet,
struct label *ifnetlabel, struct mbuf *m,
struct label *mbuflabel);
/*
* Object: struct inpcb (Internet protocol control block)
*/
-typedef int (*mpo_init_inpcb_label_t)(struct label *label, int flag);
-typedef void (*mpo_destroy_inpcb_label_t)(struct label *label);
-typedef void (*mpo_create_inpcb_from_socket_t)(struct socket *so,
+typedef int (*mpo_inpcb_init_label_t)(struct label *label, int flag);
+typedef void (*mpo_inpcb_destroy_label_t)(struct label *label);
+typedef void (*mpo_inpcb_create_from_socket_t)(struct socket *so,
struct label *solabel, struct inpcb *inp,
struct label *inplabel);
-typedef void (*mpo_create_mbuf_from_inpcb_t)(struct inpcb *inp,
+typedef void (*mpo_inpcb_create_mbuf_t)(struct inpcb *inp,
struct label *inplabel, struct mbuf *m,
struct label *mlabel);
typedef void (*mpo_inpcb_sosetlabel_t)(struct socket *so,
struct label *label, struct inpcb *inp,
struct label *inplabel);
-typedef int (*mpo_check_inpcb_deliver_t)(struct inpcb *inp,
+typedef int (*mpo_inpcb_check_deliver_t)(struct inpcb *inp,
struct label *inplabel, struct mbuf *m,
struct label *mlabel);
/*
* Object: struct ipq (IP fragment reassembly queue)
*/
-typedef int (*mpo_init_ipq_label_t)(struct label *label, int flag);
-typedef void (*mpo_destroy_ipq_label_t)(struct label *label);
-typedef void (*mpo_create_ipq_t)(struct mbuf *fragment,
+typedef int (*mpo_ipq_init_label_t)(struct label *label, int flag);
+typedef void (*mpo_ipq_destroy_label_t)(struct label *label);
+typedef void (*mpo_ipq_create_t)(struct mbuf *fragment,
struct label *fragmentlabel, struct ipq *ipq,
struct label *ipqlabel);
-typedef void (*mpo_create_datagram_from_ipq)
+typedef void (*mpo_ipq_create_datagram_t)
(struct ipq *ipq, struct label *ipqlabel,
struct mbuf *datagram, struct label *datagramlabel);
-typedef int (*mpo_fragment_match_t)(struct mbuf *fragment,
+typedef int (*mpo_ipq_fragment_match_t)(struct mbuf *fragment,
struct label *fragmentlabel, struct ipq *ipq,
struct label *ipqlabel);
-typedef void (*mpo_update_ipq_t)(struct mbuf *fragment,
+typedef void (*mpo_ipq_update_t)(struct mbuf *fragment,
struct label *fragmentlabel, struct ipq *ipq,
struct label *ipqlabel);
/*
* Object: kenv (Kernel environment)
*/
-typedef int (*mpo_check_kenv_dump_t)(struct ucred *cred);
-typedef int (*mpo_check_kenv_get_t)(struct ucred *cred, char *name);
-typedef int (*mpo_check_kenv_set_t)(struct ucred *cred, char *name,
+typedef int (*mpo_kenv_check_dump_t)(struct ucred *cred);
+typedef int (*mpo_kenv_check_get_t)(struct ucred *cred, char *name);
+typedef int (*mpo_kenv_check_set_t)(struct ucred *cred, char *name,
char *value);
-typedef int (*mpo_check_kenv_unset_t)(struct ucred *cred, char *name);
+typedef int (*mpo_kenv_check_unset_t)(struct ucred *cred, char *name);
/*
* Object: kld (Loadable kernel module)
*/
-typedef int (*mpo_check_kld_load_t)(struct ucred *cred, struct vnode *vp,
+typedef int (*mpo_kld_check_load_t)(struct ucred *cred, struct vnode *vp,
struct label *vlabel);
-typedef int (*mpo_check_kld_stat_t)(struct ucred *cred);
-typedef int (*mpo_check_kld_unload_t)(struct ucred *cred);
+typedef int (*mpo_kld_check_stat_t)(struct ucred *cred);
+typedef int (*mpo_kld_check_unload_t)(struct ucred *cred);
/*
* Object: struct ksem (POSIX semaphore)
*/
-typedef void (*mpo_init_posix_sem_label_t)(struct label *label);
-typedef void (*mpo_destroy_posix_sem_label_t)(struct label *label);
-typedef void (*mpo_create_posix_sem_t)(struct ucred *cred,
+typedef void (*mpo_posix_sem_init_label_t)(struct label *label);
+typedef void (*mpo_posix_sem_destroy_label_t)(struct label *label);
+typedef void (*mpo_posix_sem_create_t)(struct ucred *cred,
struct ksem *ksemptr, struct label *ks_label);
-typedef int (*mpo_check_posix_sem_destroy_t)(struct ucred *cred,
+typedef int (*mpo_posix_sem_check_destroy_t)(struct ucred *cred,
struct ksem *ksemptr, struct label *ks_label);
-typedef int (*mpo_check_posix_sem_getvalue_t)(struct ucred *cred,
+typedef int (*mpo_posix_sem_check_getvalue_t)(struct ucred *cred,
struct ksem *ksemptr, struct label *ks_label);
-typedef int (*mpo_check_posix_sem_open_t)(struct ucred *cred,
+typedef int (*mpo_posix_sem_check_open_t)(struct ucred *cred,
struct ksem *ksemptr, struct label *ks_label);
-typedef int (*mpo_check_posix_sem_post_t)(struct ucred *cred,
+typedef int (*mpo_posix_sem_check_post_t)(struct ucred *cred,
struct ksem *ksemptr, struct label *ks_label);
-typedef int (*mpo_check_posix_sem_unlink_t)(struct ucred *cred,
+typedef int (*mpo_posix_sem_check_unlink_t)(struct ucred *cred,
struct ksem *ksemptr, struct label *ks_label);
-typedef int (*mpo_check_posix_sem_wait_t)(struct ucred *cred,
+typedef int (*mpo_posix_sem_check_wait_t)(struct ucred *cred,
struct ksem *ksemptr, struct label *ks_label);
/*
* Object: struct mbuf (Message buffer)
*/
-typedef int (*mpo_init_mbuf_label_t)(struct label *label, int flag);
-typedef void (*mpo_destroy_mbuf_label_t)(struct label *label);
-typedef void (*mpo_copy_mbuf_label_t)(struct label *src,
+typedef int (*mpo_mbuf_init_label_t)(struct label *label, int flag);
+typedef void (*mpo_mbuf_destroy_label_t)(struct label *label);
+typedef void (*mpo_mbuf_copy_label_t)(struct label *src,
struct label *dest);
-typedef void (*mpo_create_mbuf_from_socket_t)(struct socket *so,
- struct label *socketlabel, struct mbuf *m,
- struct label *mbuflabel);
-typedef void (*mpo_set_socket_peer_from_mbuf_t)(struct mbuf *mbuf,
- struct label *mbuflabel, struct socket *so,
- struct label *socketpeerlabel);
-typedef void (*mpo_create_fragment_t)(struct mbuf *datagram,
+typedef void (*mpo_mbuf_create_fragment_t)(struct mbuf *datagram,
struct label *datagramlabel, struct mbuf *fragment,
struct label *fragmentlabel);
-typedef void (*mpo_create_mbuf_netlayer_t)(struct mbuf *oldmbuf,
+typedef void (*mpo_mbuf_create_netlayer_t)(struct mbuf *oldmbuf,
struct label *oldmbuflabel, struct mbuf *newmbuf,
struct label *newmbuflabel);
-typedef void (*mpo_reflect_mbuf_icmp_t)(struct mbuf *m,
+typedef void (*mpo_mbuf_reflect_icmp_t)(struct mbuf *m,
struct label *mlabel);
-typedef void (*mpo_reflect_mbuf_tcp_t)(struct mbuf *m,
+typedef void (*mpo_mbuf_reflect_tcp_t)(struct mbuf *m,
struct label *mlabel);
/*
* Object: struct mount (File system mountpoint)
*/
-typedef void (*mpo_init_mount_label_t)(struct label *label);
-typedef void (*mpo_init_mount_fs_label_t)(struct label *label);
-typedef void (*mpo_destroy_mount_label_t)(struct label *label);
-typedef void (*mpo_destroy_mount_fs_label_t)(struct label *label);
-typedef int (*mpo_check_mount_stat_t)(struct ucred *cred,
+typedef void (*mpo_mount_init_label_t)(struct label *label);
+typedef void (*mpo_mount_fs_init_label_t)(struct label *label);
+typedef void (*mpo_mount_destroy_label_t)(struct label *label);
+typedef void (*mpo_mount_fs_destroy_label_t)(struct label *label);
+typedef int (*mpo_mount_check_stat_t)(struct ucred *cred,
struct mount *mp, struct label *mntlabel);
/*
* Object: struct msqid_kernel (System V message queue)
*/
-typedef void (*mpo_init_sysv_msgqueue_label_t)(struct label *label);
-typedef void (*mpo_destroy_sysv_msgqueue_label_t)(struct label *label);
-typedef void (*mpo_cleanup_sysv_msgqueue_t)(struct label *msqlabel);
-typedef void (*mpo_create_sysv_msgmsg_t)(struct ucred *cred,
+typedef void (*mpo_sysv_msgqueue_init_label_t)(struct label *label);
+typedef void (*mpo_sysv_msgqueue_destroy_t)(struct label *label);
+typedef void (*mpo_sysv_msgqueue_cleanup_t)(struct label *msqlabel);
+typedef void (*mpo_sysv_msgmsg_create_t)(struct ucred *cred,
struct msqid_kernel *msqkptr, struct label *msqlabel,
struct msg *msgptr, struct label *msglabel);
-typedef void (*mpo_create_sysv_msgqueue_t)(struct ucred *cred,
+typedef void (*mpo_sysv_msgqueue_create_t)(struct ucred *cred,
struct msqid_kernel *msqkptr, struct label *msqlabel);
typedef int (*mpo_check_sysv_msgmsq_t)(struct ucred *cred,
@@ -355,95 +349,95 @@
/*
* Object: struct msg (System V message)
*/
-typedef void (*mpo_init_sysv_msgmsg_label_t)(struct label *label);
-typedef void (*mpo_destroy_sysv_msgmsg_label_t)(struct label *label);
-typedef void (*mpo_cleanup_sysv_msgmsg_t)(struct label *msglabel);
+typedef void (*mpo_sysv_msgmsg_init_label_t)(struct label *label);
+typedef void (*mpo_sysv_msgmsg_destroy_label_t)(struct label *label);
+typedef void (*mpo_sysv_msgmsg_cleanup_t)(struct label *msglabel);
/*
* Object: struct pipepair (Pipe)
*/
-typedef void (*mpo_init_pipe_label_t)(struct label *label);
-typedef void (*mpo_destroy_pipe_label_t)(struct label *label);
-typedef void (*mpo_copy_pipe_label_t)(struct label *src,
+typedef void (*mpo_pipe_init_label_t)(struct label *label);
+typedef void (*mpo_pipe_destroy_label_t)(struct label *label);
+typedef void (*mpo_pipe_copy_label_t)(struct label *src,
struct label *dest);
-typedef int (*mpo_externalize_pipe_label_t)(struct label *label,
+typedef int (*mpo_pipe_externalize_label_t)(struct label *label,
char *element_name, struct sbuf *sb, int *claimed);
-typedef int (*mpo_internalize_pipe_label_t)(struct label *label,
+typedef int (*mpo_pipe_internalize_label_t)(struct label *label,
char *element_name, char *element_data, int *claimed);
-typedef void (*mpo_relabel_pipe_t)(struct ucred *cred, struct pipepair *pp,
+typedef void (*mpo_pipe_relabel_t)(struct ucred *cred, struct pipepair *pp,
struct label *oldlabel, struct label *newlabel);
-typedef void (*mpo_create_pipe_t)(struct ucred *cred, struct pipepair *pp,
+typedef void (*mpo_pipe_create_t)(struct ucred *cred, struct pipepair *pp,
struct label *pipelabel);
-typedef int (*mpo_check_pipe_ioctl_t)(struct ucred *cred,
+typedef int (*mpo_pipe_check_ioctl_t)(struct ucred *cred,
struct pipepair *pp, struct label *pipelabel,
unsigned long cmd, void *data);
-typedef int (*mpo_check_pipe_poll_t)(struct ucred *cred,
+typedef int (*mpo_pipe_check_poll_t)(struct ucred *cred,
struct pipepair *pp, struct label *pipelabel);
-typedef int (*mpo_check_pipe_read_t)(struct ucred *cred,
+typedef int (*mpo_pipe_check_read_t)(struct ucred *cred,
struct pipepair *pp, struct label *pipelabel);
-typedef int (*mpo_check_pipe_relabel_t)(struct ucred *cred,
+typedef int (*mpo_pipe_check_relabel_t)(struct ucred *cred,
struct pipepair *pp, struct label *pipelabel,
struct label *newlabel);
-typedef int (*mpo_check_pipe_stat_t)(struct ucred *cred,
+typedef int (*mpo_pipe_check_stat_t)(struct ucred *cred,
struct pipepair *pp, struct label *pipelabel);
-typedef int (*mpo_check_pipe_write_t)(struct ucred *cred,
+typedef int (*mpo_pipe_check_write_t)(struct ucred *cred,
struct pipepair *pp, struct label *pipelabel);
/*
* Object: struct proc (Process)
*/
-typedef void (*mpo_init_proc_label_t)(struct label *label);
-typedef void (*mpo_destroy_proc_label_t)(struct label *label);
-typedef void (*mpo_create_proc0_t)(struct ucred *cred);
-typedef void (*mpo_create_proc1_t)(struct ucred *cred);
-typedef void (*mpo_thread_userret_t)(struct thread *thread);
-typedef int (*mpo_check_proc_debug_t)(struct ucred *cred,
+typedef void (*mpo_proc_init_label_t)(struct label *label);
+typedef void (*mpo_proc_destroy_label_t)(struct label *label);
+typedef void (*mpo_proc_create_init_t)(struct ucred *cred);
+typedef void (*mpo_proc_create_swapper_t)(struct ucred *cred);
+typedef void (*mpo_proc_thread_userret_t)(struct thread *thread);
+typedef int (*mpo_proc_check_debug_t)(struct ucred *cred,
struct proc *proc);
-typedef int (*mpo_check_proc_sched_t)(struct ucred *cred,
+typedef int (*mpo_proc_check_sched_t)(struct ucred *cred,
struct proc *proc);
-typedef int (*mpo_check_proc_setuid_t)(struct ucred *cred, uid_t uid);
-typedef int (*mpo_check_proc_seteuid_t)(struct ucred *cred, uid_t euid);
-typedef int (*mpo_check_proc_setgid_t)(struct ucred *cred, gid_t gid);
-typedef int (*mpo_check_proc_setegid_t)(struct ucred *cred, gid_t egid);
-typedef int (*mpo_check_proc_setgroups_t)(struct ucred *cred, int ngroups,
+typedef int (*mpo_proc_check_setuid_t)(struct ucred *cred, uid_t uid);
+typedef int (*mpo_proc_check_seteuid_t)(struct ucred *cred, uid_t euid);
+typedef int (*mpo_proc_check_setgid_t)(struct ucred *cred, gid_t gid);
+typedef int (*mpo_proc_check_setegid_t)(struct ucred *cred, gid_t egid);
+typedef int (*mpo_proc_check_setgroups_t)(struct ucred *cred, int ngroups,
gid_t *gidset);
-typedef int (*mpo_check_proc_setreuid_t)(struct ucred *cred, uid_t ruid,
+typedef int (*mpo_proc_check_setreuid_t)(struct ucred *cred, uid_t ruid,
uid_t euid);
-typedef int (*mpo_check_proc_setregid_t)(struct ucred *cred, gid_t rgid,
+typedef int (*mpo_proc_check_setregid_t)(struct ucred *cred, gid_t rgid,
gid_t egid);
-typedef int (*mpo_check_proc_setresuid_t)(struct ucred *cred, uid_t ruid,
+typedef int (*mpo_proc_check_setresuid_t)(struct ucred *cred, uid_t ruid,
uid_t euid, uid_t suid);
-typedef int (*mpo_check_proc_setresgid_t)(struct ucred *cred, gid_t rgid,
+typedef int (*mpo_proc_check_setresgid_t)(struct ucred *cred, gid_t rgid,
gid_t egid, gid_t sgid);
-typedef int (*mpo_check_proc_signal_t)(struct ucred *cred,
+typedef int (*mpo_proc_check_signal_t)(struct ucred *cred,
struct proc *proc, int signum);
-typedef int (*mpo_check_proc_wait_t)(struct ucred *cred,
+typedef int (*mpo_proc_check_wait_t)(struct ucred *cred,
struct proc *proc);
/*
* Object: struct semid_kernel (System V IPC semaphore)
*/
-typedef void (*mpo_init_sysv_sem_label_t)(struct label *label);
-typedef void (*mpo_destroy_sysv_sem_label_t)(struct label *label);
-typedef void (*mpo_cleanup_sysv_sem_t)(struct label *semalabel);
-typedef void (*mpo_create_sysv_sem_t)(struct ucred *cred,
+typedef void (*mpo_sysv_sem_init_label_t)(struct label *label);
+typedef void (*mpo_sysv_sem_destroy_label_t)(struct label *label);
+typedef void (*mpo_sysv_sem_cleanup_t)(struct label *semalabel);
+typedef void (*mpo_sysv_sem_create_t)(struct ucred *cred,
struct semid_kernel *semakptr, struct label *semalabel);
-typedef int (*mpo_check_sysv_semctl_t)(struct ucred *cred,
+typedef int (*mpo_sysv_sem_check_semctl_t)(struct ucred *cred,
struct semid_kernel *semakptr, struct label *semaklabel,
int cmd);
-typedef int (*mpo_check_sysv_semget_t)(struct ucred *cred,
+typedef int (*mpo_sysv_sem_check_semget_t)(struct ucred *cred,
struct semid_kernel *semakptr, struct label *semaklabel);
-typedef int (*mpo_check_sysv_semop_t)(struct ucred *cred,
+typedef int (*mpo_sysv_sem_check_semop_t)(struct ucred *cred,
struct semid_kernel *semakptr, struct label *semaklabel,
size_t accesstype);
/*
* Object: struct shmid_kernel (System V shared memory segment)
*/
-typedef void (*mpo_init_sysv_shm_label_t)(struct label *label);
-typedef void (*mpo_destroy_sysv_shm_label_t)(struct label *label);
-typedef void (*mpo_cleanup_sysv_shm_t)(struct label *shmlabel);
-typedef void (*mpo_create_sysv_shm_t)(struct ucred *cred,
+typedef void (*mpo_sysv_shm_init_label_t)(struct label *label);
+typedef void (*mpo_sysv_shm_destroy_label_t)(struct label *label);
+typedef void (*mpo_sysv_shm_cleanup_t)(struct label *shmlabel);
+typedef void (*mpo_sysv_shm_create_t)(struct ucred *cred,
struct shmid_kernel *shmsegptr, struct label *shmlabel);
typedef int (*mpo_check_sysv_shmat_t)(struct ucred *cred,
struct shmid_kernel *shmsegptr,
@@ -461,199 +455,205 @@
/*
* Object: struct socket (Socket)
*/
-typedef int (*mpo_init_socket_label_t)(struct label *label, int flag);
-typedef int (*mpo_init_socket_peer_label_t)(struct label *label,
+typedef int (*mpo_socket_init_label_t)(struct label *label, int flag);
+typedef int (*mpo_socket_init_peer_label_t)(struct label *label,
int flag);
-typedef void (*mpo_destroy_socket_label_t)(struct label *label);
-typedef void (*mpo_destroy_socket_peer_label_t)(struct label *label);
-typedef void (*mpo_copy_socket_label_t)(struct label *src,
+typedef void (*mpo_socket_destroy_label_t)(struct label *label);
+typedef void (*mpo_socket_destroy_peer_label_t)(struct label *label);
+typedef void (*mpo_socket_copy_label_t)(struct label *src,
struct label *dest);
-typedef int (*mpo_externalize_socket_label_t)(struct label *label,
+typedef int (*mpo_socket_externalize_label_t)(struct label *label,
char *element_name, struct sbuf *sb, int *claimed);
-typedef int (*mpo_externalize_socket_peer_label_t)(struct label *label,
+typedef int (*mpo_socket_externalize_peer_label_t)(struct label *label,
char *element_name, struct sbuf *sb, int *claimed);
-typedef int (*mpo_internalize_socket_label_t)(struct label *label,
+typedef int (*mpo_socket_internalize_label_t)(struct label *label,
char *element_name, char *element_data, int *claimed);
-typedef void (*mpo_create_socket_t)(struct ucred *cred, struct socket *so,
+typedef void (*mpo_socket_create_t)(struct ucred *cred, struct socket *so,
struct label *socketlabel);
-typedef void (*mpo_create_socket_from_socket_t)(struct socket *oldsocket,
+typedef void (*mpo_socket_create_from_socket_t)(struct socket *oldsocket,
struct label *oldsocketlabel, struct socket *newsocket,
struct label *newsocketlabel);
-typedef void (*mpo_relabel_socket_t)(struct ucred *cred, struct socket *so,
+typedef void (*mpo_socket_relabel_t)(struct ucred *cred, struct socket *so,
struct label *oldlabel, struct label *newlabel);
-typedef void (*mpo_set_socket_peer_from_socket_t)(struct socket *oldsocket,
+typedef void (*mpo_socket_set_peer_from_socket_t)(struct socket *oldsocket,
struct label *oldsocketlabel, struct socket *newsocket,
struct label *newsocketpeerlabel);
-typedef int (*mpo_check_socket_accept_t)(struct ucred *cred,
+typedef void (*mpo_socket_create_mbuf_t)(struct socket *so,
+ struct label *socketlabel, struct mbuf *m,
+ struct label *mbuflabel);
+typedef void (*mpo_socket_set_peer_from_mbuf_t)(struct mbuf *mbuf,
+ struct label *mbuflabel, struct socket *so,
+ struct label *socketpeerlabel);
+typedef int (*mpo_socket_check_accept_t)(struct ucred *cred,
struct socket *so, struct label *socketlabel);
-typedef int (*mpo_check_socket_bind_t)(struct ucred *cred,
+typedef int (*mpo_socket_check_bind_t)(struct ucred *cred,
struct socket *so, struct label *socketlabel,
struct sockaddr *sockaddr);
-typedef int (*mpo_check_socket_connect_t)(struct ucred *cred,
+typedef int (*mpo_socket_check_connect_t)(struct ucred *cred,
struct socket *so, struct label *socketlabel,
struct sockaddr *sockaddr);
-typedef int (*mpo_check_socket_create_t)(struct ucred *cred, int domain,
+typedef int (*mpo_socket_check_create_t)(struct ucred *cred, int domain,
int type, int protocol);
-typedef int (*mpo_check_socket_deliver_t)(struct socket *so,
+typedef int (*mpo_socket_check_deliver_t)(struct socket *so,
struct label *socketlabel, struct mbuf *m,
struct label *mbuflabel);
-typedef int (*mpo_check_socket_listen_t)(struct ucred *cred,
+typedef int (*mpo_socket_check_listen_t)(struct ucred *cred,
struct socket *so, struct label *socketlabel);
-typedef int (*mpo_check_socket_poll_t)(struct ucred *cred,
+typedef int (*mpo_socket_check_poll_t)(struct ucred *cred,
struct socket *so, struct label *socketlabel);
-typedef int (*mpo_check_socket_receive_t)(struct ucred *cred,
+typedef int (*mpo_socket_check_receive_t)(struct ucred *cred,
struct socket *so, struct label *socketlabel);
-typedef int (*mpo_check_socket_relabel_t)(struct ucred *cred,
+typedef int (*mpo_socket_check_relabel_t)(struct ucred *cred,
struct socket *so, struct label *socketlabel,
struct label *newlabel);
-typedef int (*mpo_check_socket_send_t)(struct ucred *cred,
+typedef int (*mpo_socket_check_send_t)(struct ucred *cred,
struct socket *so, struct label *socketlabel);
-typedef int (*mpo_check_socket_stat_t)(struct ucred *cred,
+typedef int (*mpo_socket_check_stat_t)(struct ucred *cred,
struct socket *so, struct label *socketlabel);
-typedef int (*mpo_check_socket_visible_t)(struct ucred *cred,
+typedef int (*mpo_socket_check_visible_t)(struct ucred *cred,
struct socket *so, struct label *socketlabel);
/*
* Object: system (Global system state)
*/
-typedef int (*mpo_check_sysarch_ioperm_t)(struct ucred *cred);
-typedef int (*mpo_check_system_acct_t)(struct ucred *cred,
+typedef int (*mpo_system_check_ioperm_t)(struct ucred *cred);
+typedef int (*mpo_system_check_acct_t)(struct ucred *cred,
struct vnode *vp, struct label *vlabel);
-typedef int (*mpo_check_system_nfsd_t)(struct ucred *cred);
-typedef int (*mpo_check_system_reboot_t)(struct ucred *cred, int howto);
-typedef int (*mpo_check_system_settime_t)(struct ucred *cred);
-typedef int (*mpo_check_system_swapon_t)(struct ucred *cred,
+typedef int (*mpo_system_check_nfsd_t)(struct ucred *cred);
+typedef int (*mpo_system_check_reboot_t)(struct ucred *cred, int howto);
+typedef int (*mpo_system_check_settime_t)(struct ucred *cred);
+typedef int (*mpo_system_check_swapon_t)(struct ucred *cred,
struct vnode *vp, struct label *label);
-typedef int (*mpo_check_system_swapoff_t)(struct ucred *cred,
+typedef int (*mpo_system_check_swapoff_t)(struct ucred *cred,
struct vnode *vp, struct label *label);
-typedef int (*mpo_check_system_sysctl_t)(struct ucred *cred,
+typedef int (*mpo_system_check_sysctl_t)(struct ucred *cred,
struct sysctl_oid *oidp, void *arg1, int arg2,
struct sysctl_req *req);
/*
* Object: struct vnode (VFS node)
*/
-typedef void (*mpo_init_vnode_label_t)(struct label *label);
-typedef void (*mpo_destroy_vnode_label_t)(struct label *label);
-typedef int (*mpo_associate_vnode_extattr_t)(struct mount *mp,
+typedef void (*mpo_vnode_init_label_t)(struct label *label);
+typedef void (*mpo_vnode_destroy_vnode_label_t)(struct label *label);
+typedef int (*mpo_vnode_associate_vnode_extattr_t)(struct mount *mp,
struct label *fslabel, struct vnode *vp,
struct label *vlabel);
-typedef void (*mpo_associate_vnode_singlelabel_t)(struct mount *mp,
+typedef void (*mpo_vnode_associate_vnode_singlelabel_t)(struct mount *mp,
struct label *fslabel, struct vnode *vp,
struct label *vlabel);
-typedef int (*mpo_create_vnode_extattr_t)(struct ucred *cred,
+typedef int (*mpo_vnode_create_vnode_extattr_t)(struct ucred *cred,
struct mount *mp, struct label *fslabel,
struct vnode *dvp, struct label *dlabel,
struct vnode *vp, struct label *vlabel,
struct componentname *cnp);
-typedef void (*mpo_create_mount_t)(struct ucred *cred, struct mount *mp,
+typedef void (*mpo_vnode_create_mount_t)(struct ucred *cred, struct mount *mp,
struct label *mntlabel, struct label *fslabel);
-typedef void (*mpo_relabel_vnode_t)(struct ucred *cred, struct vnode *vp,
+typedef void (*mpo_vnode_relabel_vnode_t)(struct ucred *cred, struct vnode *vp,
struct label *vnodelabel, struct label *label);
-typedef int (*mpo_setlabel_vnode_extattr_t)(struct ucred *cred,
+typedef int (*mpo_vnode_setlabel_vnode_extattr_t)(struct ucred *cred,
struct vnode *vp, struct label *vlabel,
struct label *intlabel);
-typedef void (*mpo_copy_vnode_label_t)(struct label *src,
+typedef void (*mpo_vnode_copy_vnode_label_t)(struct label *src,
struct label *dest);
-typedef int (*mpo_externalize_vnode_label_t)(struct label *label,
+typedef int (*mpo_vnode_externalize_vnode_label_t)(struct label *label,
char *element_name, struct sbuf *sb, int *claimed);
-typedef int (*mpo_internalize_vnode_label_t)(struct label *label,
+typedef int (*mpo_vnode_internalize_vnode_label_t)(struct label *label,
char *element_name, char *element_data, int *claimed);
-typedef void (*mpo_execve_transition_t)(struct ucred *old,
+typedef void (*mpo_vnode_execve_transition_t)(struct ucred *old,
struct ucred *new, struct vnode *vp,
struct label *vnodelabel, struct label *interpvnodelabel,
struct image_params *imgp, struct label *execlabel);
-typedef int (*mpo_execve_will_transition_t)(struct ucred *old,
+typedef int (*mpo_vnode_execve_will_transition_t)(struct ucred *old,
struct vnode *vp, struct label *vnodelabel,
struct label *interpvnodelabel,
struct image_params *imgp, struct label *execlabel);
-typedef int (*mpo_check_vnode_access_t)(struct ucred *cred,
+typedef int (*mpo_vnode_check_access_t)(struct ucred *cred,
struct vnode *vp, struct label *label, int acc_mode);
typedef int (*mpo_check_vnode_chdir_t)(struct ucred *cred,
struct vnode *dvp, struct label *dlabel);
typedef int (*mpo_check_vnode_chroot_t)(struct ucred *cred,
struct vnode *dvp, struct label *dlabel);
-typedef int (*mpo_check_vnode_create_t)(struct ucred *cred,
+typedef int (*mpo_vnode_check_create_t)(struct ucred *cred,
struct vnode *dvp, struct label *dlabel,
struct componentname *cnp, struct vattr *vap);
-typedef int (*mpo_check_vnode_delete_t)(struct ucred *cred,
+typedef int (*mpo_vnode_check_delete_t)(struct ucred *cred,
struct vnode *dvp, struct label *dlabel,
struct vnode *vp, struct label *label,
struct componentname *cnp);
-typedef int (*mpo_check_vnode_deleteacl_t)(struct ucred *cred,
+typedef int (*mpo_vnode_check_deleteacl_t)(struct ucred *cred,
struct vnode *vp, struct label *label, acl_type_t type);
-typedef int (*mpo_check_vnode_deleteextattr_t)(struct ucred *cred,
+typedef int (*mpo_vnode_check_deleteextattr_t)(struct ucred *cred,
struct vnode *vp, struct label *label, int attrnamespace,
const char *name);
-typedef int (*mpo_check_vnode_exec_t)(struct ucred *cred,
+typedef int (*mpo_vnode_check_exec_t)(struct ucred *cred,
struct vnode *vp, struct label *label,
struct image_params *imgp, struct label *execlabel);
-typedef int (*mpo_check_vnode_getacl_t)(struct ucred *cred,
+typedef int (*mpo_vnode_check_getacl_t)(struct ucred *cred,
struct vnode *vp, struct label *label, acl_type_t type);
-typedef int (*mpo_check_vnode_getextattr_t)(struct ucred *cred,
+typedef int (*mpo_vnode_check_getextattr_t)(struct ucred *cred,
struct vnode *vp, struct label *label, int attrnamespace,
const char *name, struct uio *uio);
-typedef int (*mpo_check_vnode_link_t)(struct ucred *cred,
+typedef int (*mpo_vnode_check_link_t)(struct ucred *cred,
struct vnode *dvp, struct label *dlabel, struct vnode *vp,
struct label *label, struct componentname *cnp);
-typedef int (*mpo_check_vnode_listextattr_t)(struct ucred *cred,
+typedef int (*mpo_vnode_check_listextattr_t)(struct ucred *cred,
struct vnode *vp, struct label *label,
int attrnamespace);
-typedef int (*mpo_check_vnode_lookup_t)(struct ucred *cred,
+typedef int (*mpo_vnode_check_lookup_t)(struct ucred *cred,
struct vnode *dvp, struct label *dlabel,
struct componentname *cnp);
-typedef int (*mpo_check_vnode_mmap_t)(struct ucred *cred,
+typedef int (*mpo_vnode_check_mmap_t)(struct ucred *cred,
struct vnode *vp, struct label *label, int prot,
int flags);
-typedef void (*mpo_check_vnode_mmap_downgrade_t)(struct ucred *cred,
+typedef void (*mpo_vnode_check_mmap_downgrade_t)(struct ucred *cred,
struct vnode *vp, struct label *label, int *prot);
-typedef int (*mpo_check_vnode_mprotect_t)(struct ucred *cred,
+typedef int (*mpo_vnode_check_mprotect_t)(struct ucred *cred,
struct vnode *vp, struct label *label, int prot);
-typedef int (*mpo_check_vnode_open_t)(struct ucred *cred,
+typedef int (*mpo_vnode_check_open_t)(struct ucred *cred,
struct vnode *vp, struct label *label, int acc_mode);
-typedef int (*mpo_check_vnode_poll_t)(struct ucred *active_cred,
+typedef int (*mpo_vnode_check_poll_t)(struct ucred *active_cred,
struct ucred *file_cred, struct vnode *vp,
struct label *label);
-typedef int (*mpo_check_vnode_read_t)(struct ucred *active_cred,
+typedef int (*mpo_vnode_check_read_t)(struct ucred *active_cred,
struct ucred *file_cred, struct vnode *vp,
struct label *label);
-typedef int (*mpo_check_vnode_readdir_t)(struct ucred *cred,
+typedef int (*mpo_vnode_check_readdir_t)(struct ucred *cred,
struct vnode *dvp, struct label *dlabel);
-typedef int (*mpo_check_vnode_readlink_t)(struct ucred *cred,
+typedef int (*mpo_vnode_check_readlink_t)(struct ucred *cred,
struct vnode *vp, struct label *label);
-typedef int (*mpo_check_vnode_relabel_t)(struct ucred *cred,
+typedef int (*mpo_vnode_check_relabel_t)(struct ucred *cred,
struct vnode *vp, struct label *vnodelabel,
struct label *newlabel);
-typedef int (*mpo_check_vnode_rename_from_t)(struct ucred *cred,
+typedef int (*mpo_vnode_check_rename_from_t)(struct ucred *cred,
struct vnode *dvp, struct label *dlabel,
struct vnode *vp, struct label *label,
struct componentname *cnp);
-typedef int (*mpo_check_vnode_rename_to_t)(struct ucred *cred,
+typedef int (*mpo_vnode_check_rename_to_t)(struct ucred *cred,
struct vnode *dvp, struct label *dlabel,
struct vnode *vp, struct label *label, int samedir,
struct componentname *cnp);
-typedef int (*mpo_check_vnode_revoke_t)(struct ucred *cred,
+typedef int (*mpo_vnode_check_revoke_t)(struct ucred *cred,
struct vnode *vp, struct label *label);
-typedef int (*mpo_check_vnode_setacl_t)(struct ucred *cred,
+typedef int (*mpo_vnode_check_setacl_t)(struct ucred *cred,
struct vnode *vp, struct label *label, acl_type_t type,
struct acl *acl);
-typedef int (*mpo_check_vnode_setextattr_t)(struct ucred *cred,
+typedef int (*mpo_vnode_check_setextattr_t)(struct ucred *cred,
struct vnode *vp, struct label *label, int attrnamespace,
const char *name, struct uio *uio);
-typedef int (*mpo_check_vnode_setflags_t)(struct ucred *cred,
+typedef int (*mpo_vnode_check_setflags_t)(struct ucred *cred,
struct vnode *vp, struct label *label, u_long flags);
-typedef int (*mpo_check_vnode_setmode_t)(struct ucred *cred,
+typedef int (*mpo_vnode_check_setmode_t)(struct ucred *cred,
struct vnode *vp, struct label *label, mode_t mode);
-typedef int (*mpo_check_vnode_setowner_t)(struct ucred *cred,
+typedef int (*mpo_vnode_check_setowner_t)(struct ucred *cred,
struct vnode *vp, struct label *label, uid_t uid,
gid_t gid);
-typedef int (*mpo_check_vnode_setutimes_t)(struct ucred *cred,
+typedef int (*mpo_vnode_check_setutimes_t)(struct ucred *cred,
struct vnode *vp, struct label *label,
struct timespec atime, struct timespec mtime);
-typedef int (*mpo_check_vnode_stat_t)(struct ucred *active_cred,
+typedef int (*mpo_vnode_check_stat_t)(struct ucred *active_cred,
struct ucred *file_cred, struct vnode *vp,
struct label *label);
-typedef int (*mpo_check_vnode_write_t)(struct ucred *active_cred,
+typedef int (*mpo_vnode_check_write_t)(struct ucred *active_cred,
struct ucred *file_cred, struct vnode *vp,
struct label *label);
typedef int (*mpo_associate_nfsd_label_t)(struct ucred *cred);
More information about the trustedbsd-cvs
mailing list