Deleted Added
full compact
mac_stub.c (168951) mac_stub.c (168954)
1/*-
2 * Copyright (c) 1999-2002, 2007 Robert N. M. Watson
3 * Copyright (c) 2001-2005 McAfee, Inc.
4 * Copyright (c) 2005 SPARTA, Inc.
5 * All rights reserved.
6 *
7 * This software was developed by Robert Watson for the TrustedBSD Project.
8 *

--- 21 unchanged lines hidden (view full) ---

30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
1/*-
2 * Copyright (c) 1999-2002, 2007 Robert N. M. Watson
3 * Copyright (c) 2001-2005 McAfee, Inc.
4 * Copyright (c) 2005 SPARTA, Inc.
5 * All rights reserved.
6 *
7 * This software was developed by Robert Watson for the TrustedBSD Project.
8 *

--- 21 unchanged lines hidden (view full) ---

30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * $FreeBSD: head/sys/security/mac_stub/mac_stub.c 168951 2007-04-22 15:31:22Z rwatson $
38 * $FreeBSD: head/sys/security/mac_stub/mac_stub.c 168954 2007-04-22 16:18:10Z rwatson $
39 */
40
41/*
42 * Developed by the TrustedBSD Project.
43 *
44 * Stub module that implements a NOOP for most (if not all) MAC Framework
45 * policy entry points.
46 */

--- 111 unchanged lines hidden (view full) ---

158 return (0);
159}
160
161/*
162 * Labeling event operations: file system objects, and things that look
163 * a lot like file system objects.
164 */
165static void
39 */
40
41/*
42 * Developed by the TrustedBSD Project.
43 *
44 * Stub module that implements a NOOP for most (if not all) MAC Framework
45 * policy entry points.
46 */

--- 111 unchanged lines hidden (view full) ---

158 return (0);
159}
160
161/*
162 * Labeling event operations: file system objects, and things that look
163 * a lot like file system objects.
164 */
165static void
166stub_associate_vnode_devfs(struct mount *mp, struct label *fslabel,
166stub_associate_vnode_devfs(struct mount *mp, struct label *mntlabel,
167 struct devfs_dirent *de, struct label *delabel, struct vnode *vp,
168 struct label *vlabel)
169{
170
171}
172
173static int
167 struct devfs_dirent *de, struct label *delabel, struct vnode *vp,
168 struct label *vlabel)
169{
170
171}
172
173static int
174stub_associate_vnode_extattr(struct mount *mp, struct label *fslabel,
174stub_associate_vnode_extattr(struct mount *mp, struct label *mntlabel,
175 struct vnode *vp, struct label *vlabel)
176{
177
178 return (0);
179}
180
181static void
182stub_associate_vnode_singlelabel(struct mount *mp,
175 struct vnode *vp, struct label *vlabel)
176{
177
178 return (0);
179}
180
181static void
182stub_associate_vnode_singlelabel(struct mount *mp,
183 struct label *fslabel, struct vnode *vp, struct label *vlabel)
183 struct label *mntlabel, struct vnode *vp, struct label *vlabel)
184{
185
186}
187
188static void
189stub_associate_nfsd_label(struct ucred *cred)
190{
191

--- 18 unchanged lines hidden (view full) ---

210 struct devfs_dirent *dd, struct label *ddlabel, struct devfs_dirent *de,
211 struct label *delabel)
212{
213
214}
215
216static int
217stub_create_vnode_extattr(struct ucred *cred, struct mount *mp,
184{
185
186}
187
188static void
189stub_associate_nfsd_label(struct ucred *cred)
190{
191

--- 18 unchanged lines hidden (view full) ---

210 struct devfs_dirent *dd, struct label *ddlabel, struct devfs_dirent *de,
211 struct label *delabel)
212{
213
214}
215
216static int
217stub_create_vnode_extattr(struct ucred *cred, struct mount *mp,
218 struct label *fslabel, struct vnode *dvp, struct label *dlabel,
218 struct label *mntlabel, struct vnode *dvp, struct label *dlabel,
219 struct vnode *vp, struct label *vlabel, struct componentname *cnp)
220{
221
222 return (0);
223}
224
225static void
226stub_create_mount(struct ucred *cred, struct mount *mp,
219 struct vnode *vp, struct label *vlabel, struct componentname *cnp)
220{
221
222 return (0);
223}
224
225static void
226stub_create_mount(struct ucred *cred, struct mount *mp,
227 struct label *mntlabel, struct label *fslabel)
227 struct label *mntlabel)
228{
229
230}
231
232static void
233stub_relabel_vnode(struct ucred *cred, struct vnode *vp,
234 struct label *vnodelabel, struct label *label)
235{

--- 1206 unchanged lines hidden (view full) ---

1442 .mpo_init_inpcb_label = stub_init_label_waitcheck,
1443 .mpo_init_sysv_msgmsg_label = stub_init_label,
1444 .mpo_init_sysv_msgqueue_label = stub_init_label,
1445 .mpo_init_sysv_sem_label = stub_init_label,
1446 .mpo_init_sysv_shm_label = stub_init_label,
1447 .mpo_init_ipq_label = stub_init_label_waitcheck,
1448 .mpo_init_mbuf_label = stub_init_label_waitcheck,
1449 .mpo_init_mount_label = stub_init_label,
228{
229
230}
231
232static void
233stub_relabel_vnode(struct ucred *cred, struct vnode *vp,
234 struct label *vnodelabel, struct label *label)
235{

--- 1206 unchanged lines hidden (view full) ---

1442 .mpo_init_inpcb_label = stub_init_label_waitcheck,
1443 .mpo_init_sysv_msgmsg_label = stub_init_label,
1444 .mpo_init_sysv_msgqueue_label = stub_init_label,
1445 .mpo_init_sysv_sem_label = stub_init_label,
1446 .mpo_init_sysv_shm_label = stub_init_label,
1447 .mpo_init_ipq_label = stub_init_label_waitcheck,
1448 .mpo_init_mbuf_label = stub_init_label_waitcheck,
1449 .mpo_init_mount_label = stub_init_label,
1450 .mpo_init_mount_fs_label = stub_init_label,
1451 .mpo_init_pipe_label = stub_init_label,
1452 .mpo_init_posix_sem_label = stub_init_label,
1453 .mpo_init_socket_label = stub_init_label_waitcheck,
1454 .mpo_init_socket_peer_label = stub_init_label_waitcheck,
1455 .mpo_init_vnode_label = stub_init_label,
1456 .mpo_destroy_bpfdesc_label = stub_destroy_label,
1457 .mpo_destroy_cred_label = stub_destroy_label,
1458 .mpo_destroy_devfsdirent_label = stub_destroy_label,
1459 .mpo_destroy_ifnet_label = stub_destroy_label,
1460 .mpo_destroy_inpcb_label = stub_destroy_label,
1461 .mpo_destroy_sysv_msgmsg_label = stub_destroy_label,
1462 .mpo_destroy_sysv_msgqueue_label = stub_destroy_label,
1463 .mpo_destroy_sysv_sem_label = stub_destroy_label,
1464 .mpo_destroy_sysv_shm_label = stub_destroy_label,
1465 .mpo_destroy_ipq_label = stub_destroy_label,
1466 .mpo_destroy_mbuf_label = stub_destroy_label,
1467 .mpo_destroy_mount_label = stub_destroy_label,
1450 .mpo_init_pipe_label = stub_init_label,
1451 .mpo_init_posix_sem_label = stub_init_label,
1452 .mpo_init_socket_label = stub_init_label_waitcheck,
1453 .mpo_init_socket_peer_label = stub_init_label_waitcheck,
1454 .mpo_init_vnode_label = stub_init_label,
1455 .mpo_destroy_bpfdesc_label = stub_destroy_label,
1456 .mpo_destroy_cred_label = stub_destroy_label,
1457 .mpo_destroy_devfsdirent_label = stub_destroy_label,
1458 .mpo_destroy_ifnet_label = stub_destroy_label,
1459 .mpo_destroy_inpcb_label = stub_destroy_label,
1460 .mpo_destroy_sysv_msgmsg_label = stub_destroy_label,
1461 .mpo_destroy_sysv_msgqueue_label = stub_destroy_label,
1462 .mpo_destroy_sysv_sem_label = stub_destroy_label,
1463 .mpo_destroy_sysv_shm_label = stub_destroy_label,
1464 .mpo_destroy_ipq_label = stub_destroy_label,
1465 .mpo_destroy_mbuf_label = stub_destroy_label,
1466 .mpo_destroy_mount_label = stub_destroy_label,
1468 .mpo_destroy_mount_fs_label = stub_destroy_label,
1469 .mpo_destroy_pipe_label = stub_destroy_label,
1470 .mpo_destroy_posix_sem_label = stub_destroy_label,
1471 .mpo_destroy_socket_label = stub_destroy_label,
1472 .mpo_destroy_socket_peer_label = stub_destroy_label,
1473 .mpo_destroy_vnode_label = stub_destroy_label,
1474 .mpo_copy_cred_label = stub_copy_label,
1475 .mpo_copy_ifnet_label = stub_copy_label,
1476 .mpo_copy_mbuf_label = stub_copy_label,

--- 185 unchanged lines hidden ---
1467 .mpo_destroy_pipe_label = stub_destroy_label,
1468 .mpo_destroy_posix_sem_label = stub_destroy_label,
1469 .mpo_destroy_socket_label = stub_destroy_label,
1470 .mpo_destroy_socket_peer_label = stub_destroy_label,
1471 .mpo_destroy_vnode_label = stub_destroy_label,
1472 .mpo_copy_cred_label = stub_copy_label,
1473 .mpo_copy_ifnet_label = stub_copy_label,
1474 .mpo_copy_mbuf_label = stub_copy_label,

--- 185 unchanged lines hidden ---