PERFORCE change 101001 for review

Robert Watson rwatson at FreeBSD.org
Sat Jul 8 13:25:41 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=101001

Change 101001 by rwatson at rwatson_zoo on 2006/07/08 13:25:30

	Add regular expressions to rename policy entry points, and some
	notes on renaming that requires some hand attention.

Affected files ...

.. //depot/projects/trustedbsd/mac2/mac2_notes.txt#4 edit

Differences ...

==== //depot/projects/trustedbsd/mac2/mac2_notes.txt#4 (text+ko) ====

@@ -66,3 +66,163 @@
 - Move from just init/destroy to also attach/detach methods for the policy,
   so that memory allocation can be performed without the mac policy lock
   held.
+
+Rename expressions for policies:
+
+Delete references to mount fslabel by removing init, destroy methods,
+removing argument and assignment from mount_create, other references
+are a search and replace of fslabel with mntlabel.
+
+Rename policy init and destroy methods, no easy search/replace for this.
+
+:%s/init_bpfdesc/bpfdesc_init/g
+:%s/init_cred/cred_init/g
+:%s/init_devfsdirent/devfs_init/g
+:%s/init_ifnet/ifnet_init/g
+:%s/init_inpcb/inpcb_init/g
+:%s/init_ipq/ipq_init/g
+:%s/init_mbuf/mbuf_init/g
+:%s/init_mount/mount_init/g
+:%s/init_pipe/pipe_init/g
+:%s/init_posix_sem/posix_sem_init/g
+:%s/init_proc/proc_init/g
+:%s/init_socket_peer/socket_peer_init/g
+:%s/init_socket/socket_init/g
+:%s/init_sysv_msgmsg/sysvmsg_init/g
+:%s/init_sysv_msgqueue/sysvmsq_init/g
+:%s/init_sysv_sem/sysvsem_init/g
+:%s/init_sysv_shm/sysvshm_init/g
+:%s/init_vnode/vnode_init/g
+
+:%s/destroy_bpfdesc/bpfdesc_destroy/g
+:%s/destroy_cred/cred_destroy/g
+:%s/destroy_devfsdirent/devfs_destroy/g
+:%s/destroy_ifnet/ifnet_destroy/g
+:%s/destroy_inpcb/inpcb_destroy/g
+:%s/destroy_ipq/ipq_destroy/g
+:%s/destroy_mbuf/mbuf_destroy/g
+:%s/destroy_mount/mount_destroy/g
+:%s/destroy_pipe/pipe_destroy/g
+:%s/destroy_posix_sem/posix_sem_destroy/g
+:%s/destroy_proc/proc_destroy/g
+:%s/destroy_socket_peer/socket_peer_destroy/g
+:%s/destroy_socket/socket_destroy/g
+:%s/destroy_sysv_msgmsg/sysvmsg_destroy/g
+:%s/destroy_sysv_msgqueue/sysvmsq_destroy/g
+:%s/destroy_sysv_sem/sysvsem_destroy/g
+:%s/destroy_sysv_shm/sysvshm_destroy/g
+:%s/destroy_vnode/vnode_destroy/g
+
+:%s/cleanup_sysv_msgmsg/sysvmsg_cleanup/g
+:%s/cleanup_sysv_msgqueue/sysvmsq_cleanup/g
+:%s/cleanup_sysv_sem/sysvsem_cleanup/g
+:%s/cleanup_sysv_shm/sysvshm_cleanup/g
+
+:%s/copy_cred/cred_copy/g
+:%s/copy_ifnet/ifnet_copy/g
+:%s/copy_mbuf/mbuf_copy/g
+:%s/copy_pipe/pipe_copy/g
+:%s/copy_socket/socket_copy/g
+:%s/copy_vnode/vnode_copy/g
+
+:%s/check_bpfdesc/bpfdesc_check/g
+:%s/check_cred/cred_check/g
+:%s/check_devfsdirent/devfs_check/g
+:%s/check_ifnet/ifnet_check/g
+:%s/check_inpcb/inpcb_check/g
+:%s/check_ipq/ipq_check/g
+:%s/check_kenv/kenv_check/g
+:%s/check_kld/kld_check/g
+:%s/check_mbuf/mbuf_check/g
+:%s/check_mount/mount_check/g
+:%s/check_pipe/pipe_check/g
+:%s/check_posix_sem/posix_sem_check/g
+:%s/check_proc/proc_check/g
+:%s/check_socket/socket_check/g
+:%s/check_system/system_check/g
+:%s/check_vnode/vnode_check/g
+
+:%s/externalize_cred/cred_externalize/g
+:%s/externalize_ifnet/ifnet_externalize/g
+:%s/externalize_pipe/pipe_externalize/g
+:%s/externalize_socket_peer/socket_peer_externalize/g
+:%s/externalize_socket/socket_externalize/g
+:%s/externalize_vnode/vnode_externalize/g
+:%s/internalize_cred/cred_internalize/g
+:%s/internalize_ifnet/ifnet_internalize/g
+:%s/internalize_pipe/pipe_internalize/g
+:%s/internalize_socket/socket_internalize/g
+:%s/internalize_vnode/vnode_internalize/g
+
+:%s/associate_vnode/vnode_associate/g
+:%s/vnode_associate_devfs/devfs_vnode_associate/g
+:%s/create_devfs/devfs_create/g
+:%s/relabel_vnode/vnode_relabel/g
+:%s/create_vnode/vnode_create/g
+:%s/create_mount/mount_create/g
+:%s/setlabel_vnode/vnode_setlabel/g
+:%s/update_devfsdirent/devfs_update/g
+
+:%s/relabel_pipe/pipe_relabel/g
+:%s/create_bpfdesc/bpfdesc_create/g
+:%s/create_datagram_from_ipq/ipq_reassemble/g
+:%s/set_socket_peer_from_mbuf/socket_peer_set_from_mbuf/g
+:%s/set_socket_peer_from_socket/socket_peer_set_from_socket/g
+:%s/create_fragment/netinet_fragment/g
+:%s/create_ifnet/ifnet_create/g
+:%s/create_inpcb_from_socket/inpcb_create/g
+:%s/create_ipq/ipq_create/g
+:%s/create_pipe/pipe_create/g
+:%s/relabel_pipe/pipe_relabel/g
+:%s/create_posix_sem/posix_sem_create/g
+
+:%s/create_mbuf_from_inpcb/inpcb_create_mbuf/g
+:%s/create_mbuf_linklayer/mbuf_create_linklayer/g
+:%s/create_mbuf_from_bpfdesc/bpfdesc_create_mbuf/g
+:%s/create_mbuf_from_ifnet/ifnet_create_mbuf/g
+:%s/create_mbuf_from_socket/socket_create_mbuf/g
+:%s/create_mbuf_multicast_encap/mbuf_create_multicast_encap/g
+:%s/create_mbuf_netlayer/mbuf_create_netlayer/g
+:%s/fragment_match/ipq_match/g
+:%s/relabel_ifnet/ifnet_relabel/g
+:%s/update_ipq/ipq_update/g
+:%s/create_proc0/proc_create_swapper/g
+:%s/create_proc1/proc_create_init/g
+:%s/relabel_cred/cred_relabel/g
+:%s/relabel_socket/socket_relabel/g
+:%s/create_socket_from_socket/socket_accept/g
+:%s/create_socket/socket_create/g
+
+:%s/vnode_check_delete(/vnode_check_unlink(/g
+:%s/vnode_check_delete,/vnode_check_unlink,/g
+:%s/vnode_check_delete /vnode_check_unlink /g
+
+:%s/create_sysv_msgmsg/sysvmsg_create/g
+:%s/create_sysv_msgqueue/sysvmsq_create/g
+:%s/create_sysv_sem/sysvsem_create/g
+:%s/create_sysv_shm/sysvshm_create/g
+
+:%s/check_sysv_msgrcv/sysvmsq_check_msgrcv/g
+:%s/check_sysv_msgrmid/sysvmsq_check_msgrmid/g
+:%s/check_sysv_msqget/sysvmsq_check_msqget/g
+:%s/check_sysv_msqsnd/sysvmsq_check_msqsnd/g
+:%s/check_sysv_msqrcv/sysvmsq_check_msqrcv/g
+:%s/check_sysv_msqctl/sysvmsq_check_msqctl/g
+:%s/check_sysv_msgmsq/sysvmsq_check_msgmsq/g
+
+:%s/check_sysv_semctl/sysvsem_check_semctl/g
+:%s/check_sysv_semget/sysvsem_check_semget/g
+:%s/check_sysv_semop/sysvsem_check_semop/g
+:%s/check_sysv_shmat/sysvshm_check_shmat/g
+:%s/check_sysv_shmctl/sysvshm_check_shmctl/g
+:%s/check_sysv_shmget/sysvshm_check_shmget/g
+:%s/check_sysv_shmdt/sysvshm_check_shmdt/g
+
+:%s/reflect_mbuf_icmp/netinet_icmp_reply/g
+:%s/reflect_mbuf_tcp/netinet_tcp_reply/g
+
+:%s/execve_transition/vnode_execve_transition/g
+:%s/execve_will_transition/vnode_execve_will_transition/g
+
+:%s/check_sysarch_ioperm/system_check_ioperm/g
+


More information about the trustedbsd-cvs mailing list