Date: Mon, 22 Jan 2007 15:04:07 GMT From: Todd Miller <millert@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 113314 for review Message-ID: <200701221504.l0MF47Qe001869@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=113314 Change 113314 by millert@millert_macbook on 2007/01/22 15:03:29 Rename copy_network_label() to network_label_copy(). Replace sebsd_vnode_label_copy(), sebsd_task_label_copy() and sebsd_port_label_update_cred() with sebsd_label_copy(). Affected files ... .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#56 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#56 (text+ko) ==== @@ -154,7 +154,7 @@ } static void -copy_network_label(struct label *slabel, struct label *dlabel) +network_label_copy(struct label *slabel, struct label *dlabel) { struct network_security_struct *src, *dst; @@ -166,7 +166,7 @@ if (src == NULL || dst == NULL) return; - memcpy(dst, src, sizeof(struct network_security_struct)); + *dst = *src; } /* @@ -914,7 +914,7 @@ struct mbuf *m, struct label *mlabel) { - copy_network_label(blabel, mlabel); + network_label_copy(blabel, mlabel); } static void @@ -922,7 +922,7 @@ struct mbuf *m, struct label *mlabel) { - copy_network_label(ilabel, mlabel); + network_label_copy(ilabel, mlabel); } #endif @@ -1119,7 +1119,7 @@ struct mbuf *m, struct label *mlabel) { - copy_network_label(solabel, mlabel); + network_label_copy(solabel, mlabel); } static void @@ -1180,7 +1180,7 @@ struct xsocket *news, struct label *newslabel) { - copy_network_label(oldslabel, newslabel); + network_label_copy(oldslabel, newslabel); } static int @@ -1791,7 +1791,7 @@ struct label *oldlabel, struct label *newlabel) { - copy_network_label(oldlabel, newlabel); + network_label_copy(oldlabel, newlabel); } static void @@ -1832,7 +1832,7 @@ struct xsocket *xso, struct label *sopeerlabel) { - copy_network_label(mlabel, sopeerlabel); + network_label_copy(mlabel, sopeerlabel); } static void @@ -1840,7 +1840,7 @@ struct xsocket *news, struct label *newsockpeerlabel) { - copy_network_label(oldslabel, newsockpeerlabel); + network_label_copy(oldslabel, newsockpeerlabel); } static int @@ -2878,37 +2878,12 @@ } static void -sebsd_vnode_label_copy(struct label *src, struct label *dest) +sebsd_label_copy(struct label *src, struct label *dest) { - *(struct vnode_security_struct *)SLOT(dest) = - *(struct vnode_security_struct *)SLOT(src); + *(struct sebsd_label *)SLOT(dest) = *(struct sebsd_label *)SLOT(src); } -#if 0 -static void -sebsd_copy_mount_label(struct label *src, struct label *dest) -{ - - *(struct mount_security_struct *)SLOT(dest) = - *(struct mount_security_struct *)SLOT(src); -} -#endif - -static void -sebsd_task_label_copy(struct label *src, struct label *dest) -{ - *(struct task_security_struct *)SLOT(dest) = - *(struct task_security_struct *)SLOT(src); -} - -static void -sebsd_port_label_update_cred(struct label *src, struct label *dest) -{ - *(struct task_security_struct *)SLOT(dest) = - *(struct task_security_struct *)SLOT(src); -} - #ifdef FD__CREATE static int sebsd_file_check_create(struct ucred *cred) @@ -3369,7 +3344,7 @@ .mpo_cred_label_update_execve = sebsd_cred_label_update_execve, .mpo_devfs_label_associate_device = sebsd_devfs_label_associate_device, .mpo_devfs_label_associate_directory = sebsd_devfs_label_associate_directory, - .mpo_devfs_label_copy = sebsd_vnode_label_copy, + .mpo_devfs_label_copy = sebsd_label_copy, .mpo_devfs_label_destroy = sebsd_label_destroy, .mpo_devfs_label_init = sebsd_label_init, .mpo_devfs_label_update = sebsd_devfs_update, @@ -3386,7 +3361,7 @@ .mpo_file_label_destroy = sebsd_label_destroy, .mpo_file_label_init = sebsd_label_init, .mpo_mbuf_label_associate_socket = sebsd_mbuf_label_associate_socket, - .mpo_mbuf_label_copy = copy_network_label, + .mpo_mbuf_label_copy = network_label_copy, .mpo_mbuf_label_destroy = sebsd_label_destroy, .mpo_mbuf_label_init = sebsd_label_init2, .mpo_mount_check_getattr = sebsd_mount_check_getattr, @@ -3409,7 +3384,7 @@ .mpo_pipe_check_stat = sebsd_pipe_check_stat, .mpo_pipe_check_write = sebsd_pipe_check_write, .mpo_pipe_label_associate = sebsd_pipe_label_associate, - .mpo_pipe_label_copy = sebsd_vnode_label_copy, + .mpo_pipe_label_copy = sebsd_label_copy, .mpo_pipe_label_destroy = sebsd_label_destroy, .mpo_pipe_label_externalize = sebsd_label_externalize, .mpo_pipe_label_init = sebsd_label_init, @@ -3436,10 +3411,10 @@ .mpo_port_label_associate = sebsd_port_create, .mpo_port_label_associate_kernel = sebsd_port_label_associate_kernel, .mpo_port_label_compute = sebsd_request_label, - .mpo_port_label_copy = sebsd_task_label_copy, + .mpo_port_label_copy = sebsd_label_copy, .mpo_port_label_destroy = sebsd_label_destroy, .mpo_port_label_init = sebsd_label_init, - .mpo_port_label_update_cred = sebsd_port_label_update_cred, + .mpo_port_label_update_cred = sebsd_label_copy, .mpo_posixsem_check_create = sebsd_posixsem_check_create, .mpo_posixsem_check_open = sebsd_posixsem_check_open, .mpo_posixsem_check_post = sebsd_posixsem_check_post, @@ -3476,7 +3451,7 @@ .mpo_socket_check_stat = sebsd_socket_check_stat, .mpo_socket_label_associate = sebsd_socket_label_associate, .mpo_socket_label_associate_accept = sebsd_socket_label_associate_accept, - .mpo_socket_label_copy = copy_network_label, + .mpo_socket_label_copy = network_label_copy, .mpo_socket_label_destroy = sebsd_label_destroy, .mpo_socket_label_externalize = sebsd_label_externalize, .mpo_socket_label_init = sebsd_label_init2, @@ -3527,7 +3502,7 @@ .mpo_task_check_get_port = sebsd_task_check_get_port, .mpo_task_label_associate = sebsd_task_create, .mpo_task_label_associate_kernel = sebsd_task_create_kernel, - .mpo_task_label_copy = sebsd_task_label_copy, + .mpo_task_label_copy = sebsd_label_copy, .mpo_task_label_destroy = sebsd_label_destroy, .mpo_task_label_externalize = sebsd_label_externalize, .mpo_task_label_init = sebsd_label_init, @@ -3571,7 +3546,7 @@ .mpo_vnode_label_associate_posixshm = sebsd_vnode_label_associate_posixshm, .mpo_vnode_label_associate_singlelabel = sebsd_vnode_label_associate_singlelabel, .mpo_vnode_label_associate_socket = sebsd_vnode_label_associate_socket, - .mpo_vnode_label_copy = sebsd_vnode_label_copy, + .mpo_vnode_label_copy = sebsd_label_copy, .mpo_vnode_label_destroy = sebsd_label_destroy, .mpo_vnode_label_externalize = sebsd_label_externalize, .mpo_vnode_label_externalize_audit = sebsd_label_externalize,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701221504.l0MF47Qe001869>