-int mac_audit_check_postselect(kauth_cred_t cred, unsigned short syscode,
- void *args, int error, int retval, int mac_forced);
-int mac_audit_check_preselect(kauth_cred_t cred, unsigned short syscode,
- void *args);
-int mac_bpfdesc_check_receive(struct bpf_d *bpf_d, struct ifnet *ifp);
-void mac_bpfdesc_label_destroy(struct bpf_d *bpf_d);
-void mac_bpfdesc_label_init(struct bpf_d *bpf_d);
-void mac_bpfdesc_label_associate(kauth_cred_t cred, struct bpf_d *bpf_d);
-int mac_cred_check_label_update(kauth_cred_t cred,
- struct label *newlabel);
-int mac_cred_check_label_update_execve(vfs_context_t ctx,
- struct vnode *vp, off_t offset, struct vnode *scriptvp,
- struct label *scriptvnodelabel, struct label *execlabel,
- proc_t proc, void *macextensions);
-int mac_cred_check_visible(kauth_cred_t u1, kauth_cred_t u2);
-struct label *mac_cred_label_alloc(void);
-void mac_cred_label_associate(kauth_cred_t cred_parent,
- kauth_cred_t cred_child);
-void mac_cred_label_associate_fork(kauth_cred_t cred, proc_t child);
-void mac_cred_label_associate_kernel(kauth_cred_t cred);
-void mac_cred_label_associate_user(kauth_cred_t cred);
-void mac_cred_label_destroy(kauth_cred_t cred);
-int mac_cred_label_externalize_audit(proc_t p, struct mac *mac);
-void mac_cred_label_free(struct label *label);
-void mac_cred_label_init(kauth_cred_t cred);
-int mac_cred_label_compare(struct label *a, struct label *b);
-void mac_cred_label_update(kauth_cred_t cred, struct label *newlabel);
-void mac_cred_label_update_execve(vfs_context_t ctx, kauth_cred_t newcred,
- struct vnode *vp, off_t offset, struct vnode *scriptvp,
- struct label *scriptvnodelabel, struct label *execlabel, u_int *csflags,
- void *macextensions, int *disjoint, int *labelupdateerror);
-void mac_devfs_label_associate_device(dev_t dev, struct devnode *de,
- const char *fullpath);
-void mac_devfs_label_associate_directory(const char *dirname, int dirnamelen,
- struct devnode *de, const char *fullpath);
-void mac_devfs_label_copy(struct label *, struct label *label);
-void mac_devfs_label_destroy(struct devnode *de);
-void mac_devfs_label_init(struct devnode *de);
-void mac_devfs_label_update(struct mount *mp, struct devnode *de,
- struct vnode *vp);
-int mac_execve_enter(user_addr_t mac_p, struct image_params *imgp);
-int mac_file_check_change_offset(kauth_cred_t cred, struct fileglob *fg);
-int mac_file_check_create(kauth_cred_t cred);
-int mac_file_check_dup(kauth_cred_t cred, struct fileglob *fg, int newfd);
-int mac_file_check_fcntl(kauth_cred_t cred, struct fileglob *fg, int cmd,
- user_long_t arg);
-int mac_file_check_get(kauth_cred_t cred, struct fileglob *fg,
- char *elements, int len);
-int mac_file_check_get_offset(kauth_cred_t cred, struct fileglob *fg);
-int mac_file_check_inherit(kauth_cred_t cred, struct fileglob *fg);
-int mac_file_check_ioctl(kauth_cred_t cred, struct fileglob *fg,
- unsigned int cmd);
-int mac_file_check_lock(kauth_cred_t cred, struct fileglob *fg, int op,
- struct flock *fl);
-int mac_file_check_mmap(kauth_cred_t cred, struct fileglob *fg,
- int prot, int flags, uint64_t file_pos, int *maxprot);
-void mac_file_check_mmap_downgrade(kauth_cred_t cred, struct fileglob *fg,
- int *prot);
-int mac_file_check_receive(kauth_cred_t cred, struct fileglob *fg);
-int mac_file_check_set(kauth_cred_t cred, struct fileglob *fg,
- char *bufp, int buflen);
-void mac_file_label_associate(kauth_cred_t cred, struct fileglob *fg);
-void mac_file_label_destroy(struct fileglob *fg);
-void mac_file_label_init(struct fileglob *fg);
-int mac_ifnet_check_transmit(struct ifnet *ifp, struct mbuf *mbuf,
- int family, int type);
-void mac_ifnet_label_associate(struct ifnet *ifp);
-void mac_ifnet_label_destroy(struct ifnet *ifp);
-int mac_ifnet_label_get(kauth_cred_t cred, struct ifreq *ifr,
- struct ifnet *ifp);
-void mac_ifnet_label_init(struct ifnet *ifp);
-void mac_ifnet_label_recycle(struct ifnet *ifp);
-int mac_ifnet_label_set(kauth_cred_t cred, struct ifreq *ifr,
- struct ifnet *ifp);
-int mac_inpcb_check_deliver(struct inpcb *inp, struct mbuf *mbuf,
- int family, int type);
-void mac_inpcb_label_associate(struct socket *so, struct inpcb *inp);
-void mac_inpcb_label_destroy(struct inpcb *inp);
-int mac_inpcb_label_init(struct inpcb *inp, int flag);
-void mac_inpcb_label_recycle(struct inpcb *inp);
-void mac_inpcb_label_update(struct socket *so);
-int mac_iokit_check_device(char *devtype, struct mac_module_data *mdata);
-int mac_iokit_check_open(kauth_cred_t cred, io_object_t user_client, unsigned int user_client_type);
-int mac_iokit_check_set_properties(kauth_cred_t cred, io_object_t registry_entry, io_object_t properties);
-int mac_iokit_check_filter_properties(kauth_cred_t cred, io_object_t registry_entry);
-int mac_iokit_check_get_property(kauth_cred_t cred, io_object_t registry_entry, const char *name);
-int mac_iokit_check_hid_control(kauth_cred_t cred);
-int mac_iokit_check_nvram_delete(kauth_cred_t cred, const char *name);
-int mac_iokit_check_nvram_get(kauth_cred_t cred, const char *name);
-int mac_iokit_check_nvram_set(kauth_cred_t cred, const char *name, io_object_t value);
-void mac_ipq_label_associate(struct mbuf *fragment, struct ipq *ipq);
-int mac_ipq_label_compare(struct mbuf *fragment, struct ipq *ipq);
-void mac_ipq_label_destroy(struct ipq *ipq);
-int mac_ipq_label_init(struct ipq *ipq, int flag);
-void mac_ipq_label_update(struct mbuf *fragment, struct ipq *ipq);
-void mac_mbuf_label_associate_bpfdesc(struct bpf_d *bpf_d, struct mbuf *m);
-void mac_mbuf_label_associate_ifnet(struct ifnet *ifp, struct mbuf *m);
-void mac_mbuf_label_associate_inpcb(struct inpcb *inp, struct mbuf *m);
-void mac_mbuf_label_associate_ipq(struct ipq *ipq, struct mbuf *mbuf);
-void mac_mbuf_label_associate_linklayer(struct ifnet *ifp, struct mbuf *m);
-void mac_mbuf_label_associate_multicast_encap(struct mbuf *oldmbuf,
- struct ifnet *ifp, struct mbuf *newmbuf);
-void mac_mbuf_label_associate_netlayer(struct mbuf *oldmbuf,
- struct mbuf *newmbuf);
-void mac_mbuf_label_associate_socket(struct socket *so, struct mbuf *m);
-void mac_mbuf_label_copy(struct mbuf *m_from, struct mbuf *m_to);
-void mac_mbuf_label_destroy(struct mbuf *m);
-int mac_mbuf_label_init(struct mbuf *m, int flag);
-void mac_mbuf_tag_copy(struct m_tag *m, struct m_tag *mtag);
-void mac_mbuf_tag_destroy(struct m_tag *mtag);
-int mac_mbuf_tag_init(struct m_tag *, int how);
-int mac_mount_check_fsctl(vfs_context_t ctx, struct mount *mp,
- unsigned int cmd);
-int mac_mount_check_getattr(vfs_context_t ctx, struct mount *mp,
- struct vfs_attr *vfa);
-int mac_mount_check_label_update(vfs_context_t ctx, struct mount *mp);
-int mac_mount_check_mount(vfs_context_t ctx, struct vnode *vp,
- struct componentname *cnp, const char *vfc_name);
-int mac_mount_check_remount(vfs_context_t ctx, struct mount *mp);
-int mac_mount_check_setattr(vfs_context_t ctx, struct mount *mp,
- struct vfs_attr *vfa);
-int mac_mount_check_stat(vfs_context_t ctx, struct mount *mp);
-int mac_mount_check_umount(vfs_context_t ctx, struct mount *mp);
-void mac_mount_label_associate(vfs_context_t ctx, struct mount *mp);
-void mac_mount_label_destroy(struct mount *mp);
-int mac_mount_label_externalize(struct label *label, char *elements,
- char *outbuf, size_t outbuflen);
-int mac_mount_label_get(struct mount *mp, user_addr_t mac_p);
-void mac_mount_label_init(struct mount *);
-int mac_mount_label_internalize(struct label *, char *string);
-void mac_netinet_fragment(struct mbuf *datagram, struct mbuf *fragment);
-void mac_netinet_icmp_reply(struct mbuf *m);
-void mac_netinet_tcp_reply(struct mbuf *m);
-int mac_pipe_check_ioctl(kauth_cred_t cred, struct pipe *cpipe,
- unsigned int cmd);
-int mac_pipe_check_kqfilter(kauth_cred_t cred, struct knote *kn,
- struct pipe *cpipe);
-int mac_pipe_check_read(kauth_cred_t cred, struct pipe *cpipe);
-int mac_pipe_check_select(kauth_cred_t cred, struct pipe *cpipe,
- int which);
-int mac_pipe_check_stat(kauth_cred_t cred, struct pipe *cpipe);
-int mac_pipe_check_write(kauth_cred_t cred, struct pipe *cpipe);
-struct label *mac_pipe_label_alloc(void);
-void mac_pipe_label_associate(kauth_cred_t cred, struct pipe *cpipe);
-void mac_pipe_label_copy(struct label *src, struct label *dest);
-void mac_pipe_label_destroy(struct pipe *cpipe);
-void mac_pipe_label_free(struct label *label);
-void mac_pipe_label_init(struct pipe *cpipe);
-int mac_pipe_label_update(kauth_cred_t cred, struct pipe *cpipe,
- struct label *label);
+int mac_audit_check_postselect(kauth_cred_t cred, unsigned short syscode,
+ void *args, int error, int retval, int mac_forced);
+int mac_audit_check_preselect(kauth_cred_t cred, unsigned short syscode,
+ void *args);
+int mac_cred_check_label_update(kauth_cred_t cred,
+ struct label *newlabel);
+int mac_cred_check_label_update_execve(vfs_context_t ctx,
+ struct vnode *vp, off_t offset, struct vnode *scriptvp,
+ struct label *scriptvnodelabel, struct label *execlabel,
+ proc_t proc, void *macextensions);
+int mac_cred_check_visible(kauth_cred_t u1, kauth_cred_t u2);
+struct label *mac_cred_label_alloc(void);
+void mac_cred_label_associate(kauth_cred_t cred_parent,
+ kauth_cred_t cred_child);
+void mac_cred_label_associate_fork(kauth_cred_t cred, proc_t child);
+void mac_cred_label_associate_kernel(kauth_cred_t cred);
+void mac_cred_label_associate_user(kauth_cred_t cred);
+void mac_cred_label_destroy(kauth_cred_t cred);
+int mac_cred_label_externalize_audit(proc_t p, struct mac *mac);
+void mac_cred_label_free(struct label *label);
+void mac_cred_label_init(kauth_cred_t cred);
+int mac_cred_label_compare(struct label *a, struct label *b);
+void mac_cred_label_update(kauth_cred_t cred, struct label *newlabel);
+void mac_cred_label_update_execve(vfs_context_t ctx, kauth_cred_t newcred,
+ struct vnode *vp, off_t offset, struct vnode *scriptvp,
+ struct label *scriptvnodelabel, struct label *execlabel, u_int *csflags,
+ void *macextensions, int *disjoint, int *labelupdateerror);
+void mac_devfs_label_associate_device(dev_t dev, struct devnode *de,
+ const char *fullpath);
+void mac_devfs_label_associate_directory(const char *dirname, int dirnamelen,
+ struct devnode *de, const char *fullpath);
+void mac_devfs_label_copy(struct label *, struct label *label);
+void mac_devfs_label_destroy(struct devnode *de);
+void mac_devfs_label_init(struct devnode *de);
+void mac_devfs_label_update(struct mount *mp, struct devnode *de,
+ struct vnode *vp);
+int mac_execve_enter(user_addr_t mac_p, struct image_params *imgp);
+int mac_file_check_change_offset(kauth_cred_t cred, struct fileglob *fg);
+int mac_file_check_create(kauth_cred_t cred);
+int mac_file_check_dup(kauth_cred_t cred, struct fileglob *fg, int newfd);
+int mac_file_check_fcntl(kauth_cred_t cred, struct fileglob *fg, int cmd,
+ user_long_t arg);
+int mac_file_check_get(kauth_cred_t cred, struct fileglob *fg,
+ char *elements, size_t len);
+int mac_file_check_get_offset(kauth_cred_t cred, struct fileglob *fg);
+int mac_file_check_inherit(kauth_cred_t cred, struct fileglob *fg);
+int mac_file_check_ioctl(kauth_cred_t cred, struct fileglob *fg,
+ unsigned long cmd);
+int mac_file_check_lock(kauth_cred_t cred, struct fileglob *fg, int op,
+ struct flock *fl);
+int mac_file_check_library_validation(struct proc *proc,
+ struct fileglob *fg, off_t slice_offset,
+ user_long_t error_message, size_t error_message_size);
+int mac_file_check_mmap(kauth_cred_t cred, struct fileglob *fg,
+ int prot, int flags, uint64_t file_pos, int *maxprot);
+void mac_file_check_mmap_downgrade(kauth_cred_t cred, struct fileglob *fg,
+ int *prot);
+int mac_file_check_receive(kauth_cred_t cred, struct fileglob *fg);
+int mac_file_check_set(kauth_cred_t cred, struct fileglob *fg,
+ char *bufp, size_t buflen);
+void mac_file_notify_close(struct ucred *cred, struct fileglob *fg);
+void mac_file_label_associate(kauth_cred_t cred, struct fileglob *fg);
+void mac_file_label_destroy(struct fileglob *fg);
+void mac_file_label_init(struct fileglob *fg);
+int mac_iokit_check_open(kauth_cred_t cred, io_object_t user_client, unsigned int user_client_type);
+int mac_iokit_check_set_properties(kauth_cred_t cred, io_object_t registry_entry, io_object_t properties);
+int mac_iokit_check_filter_properties(kauth_cred_t cred, io_object_t registry_entry);
+int mac_iokit_check_get_property(kauth_cred_t cred, io_object_t registry_entry, const char *name);
+#ifdef KERNEL_PRIVATE
+int mac_iokit_check_hid_control(kauth_cred_t cred);
+#endif
+int mac_mount_check_fsctl(vfs_context_t ctx, struct mount *mp,
+ unsigned long cmd);
+int mac_mount_check_getattr(vfs_context_t ctx, struct mount *mp,
+ struct vfs_attr *vfa);
+int mac_mount_check_label_update(vfs_context_t ctx, struct mount *mp);
+int mac_mount_check_mount(vfs_context_t ctx, struct vnode *vp,
+ struct componentname *cnp, const char *vfc_name);
+int mac_mount_check_mount_late(vfs_context_t ctx, struct mount *mp);
+int mac_mount_check_snapshot_create(vfs_context_t ctx, struct mount *mp,
+ const char *name);
+int mac_mount_check_snapshot_delete(vfs_context_t ctx, struct mount *mp,
+ const char *name);
+#ifdef KERNEL_PRIVATE
+int mac_mount_check_snapshot_mount(vfs_context_t ctx, struct vnode *rvp,
+ struct vnode *vp, struct componentname *cnp, const char *name,
+ const char *vfc_name);
+#endif
+int mac_mount_check_snapshot_revert(vfs_context_t ctx, struct mount *mp,
+ const char *name);
+int mac_mount_check_remount(vfs_context_t ctx, struct mount *mp);
+int mac_mount_check_setattr(vfs_context_t ctx, struct mount *mp,
+ struct vfs_attr *vfa);
+int mac_mount_check_stat(vfs_context_t ctx, struct mount *mp);
+int mac_mount_check_umount(vfs_context_t ctx, struct mount *mp);
+void mac_mount_label_associate(vfs_context_t ctx, struct mount *mp);
+void mac_mount_label_destroy(struct mount *mp);
+int mac_mount_label_externalize(struct label *label, char *elements,
+ char *outbuf, size_t outbuflen);
+int mac_mount_label_get(struct mount *mp, user_addr_t mac_p);
+void mac_mount_label_init(struct mount *);
+int mac_mount_label_internalize(struct label *, char *string);
+int mac_pipe_check_ioctl(kauth_cred_t cred, struct pipe *cpipe,
+ unsigned long cmd);
+int mac_pipe_check_kqfilter(kauth_cred_t cred, struct knote *kn,
+ struct pipe *cpipe);
+int mac_pipe_check_read(kauth_cred_t cred, struct pipe *cpipe);
+int mac_pipe_check_select(kauth_cred_t cred, struct pipe *cpipe,
+ int which);
+int mac_pipe_check_stat(kauth_cred_t cred, struct pipe *cpipe);
+int mac_pipe_check_write(kauth_cred_t cred, struct pipe *cpipe);
+struct label *mac_pipe_label_alloc(void);
+void mac_pipe_label_associate(kauth_cred_t cred, struct pipe *cpipe);
+void mac_pipe_label_destroy(struct pipe *cpipe);
+void mac_pipe_label_free(struct label *label);
+void mac_pipe_label_init(struct pipe *cpipe);