Deleted Added
full compact
mac_net.c (165433) mac_net.c (165469)
1/*-
2 * Copyright (c) 1999-2002 Robert N. M. Watson
3 * Copyright (c) 2001 Ilmar S. Habibulin
4 * Copyright (c) 2001-2004 Networks Associates Technology, Inc.
5 * All rights reserved.
6 *
7 * This software was developed by Robert Watson and Ilmar Habibulin for the
8 * TrustedBSD Project.

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

30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 */
36
37#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1999-2002 Robert N. M. Watson
3 * Copyright (c) 2001 Ilmar S. Habibulin
4 * Copyright (c) 2001-2004 Networks Associates Technology, Inc.
5 * All rights reserved.
6 *
7 * This software was developed by Robert Watson and Ilmar Habibulin for the
8 * TrustedBSD Project.

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

30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 */
36
37#include <sys/cdefs.h>
38__FBSDID("$FreeBSD: head/sys/security/mac/mac_net.c 165433 2006-12-21 09:51:34Z rwatson $");
38__FBSDID("$FreeBSD: head/sys/security/mac/mac_net.c 165469 2006-12-22 23:34:47Z rwatson $");
39
40#include "opt_mac.h"
41
42#include <sys/param.h>
43#include <sys/kernel.h>
44#include <sys/lock.h>
45#include <sys/malloc.h>
46#include <sys/mutex.h>

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

51#include <sys/mount.h>
52#include <sys/file.h>
53#include <sys/namei.h>
54#include <sys/protosw.h>
55#include <sys/socket.h>
56#include <sys/socketvar.h>
57#include <sys/sysctl.h>
58
39
40#include "opt_mac.h"
41
42#include <sys/param.h>
43#include <sys/kernel.h>
44#include <sys/lock.h>
45#include <sys/malloc.h>
46#include <sys/mutex.h>

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

51#include <sys/mount.h>
52#include <sys/file.h>
53#include <sys/namei.h>
54#include <sys/protosw.h>
55#include <sys/socket.h>
56#include <sys/socketvar.h>
57#include <sys/sysctl.h>
58
59#include <sys/mac_policy.h>
60
61#include <net/bpfdesc.h>
62#include <net/if.h>
63#include <net/if_var.h>
64
65#include <security/mac/mac_framework.h>
66#include <security/mac/mac_internal.h>
59#include <net/bpfdesc.h>
60#include <net/if.h>
61#include <net/if_var.h>
62
63#include <security/mac/mac_framework.h>
64#include <security/mac/mac_internal.h>
65#include <security/mac/mac_policy.h>
67
68/*
69 * XXXRW: struct ifnet locking is incomplete in the network code, so we use
70 * our own global mutex for struct ifnet. Non-ideal, but should help in the
71 * SMP environment.
72 */
73static struct mtx mac_ifnet_mtx;
74MTX_SYSINIT(mac_ifnet_mtx, &mac_ifnet_mtx, "mac_ifnet", MTX_DEF);

--- 427 unchanged lines hidden ---
66
67/*
68 * XXXRW: struct ifnet locking is incomplete in the network code, so we use
69 * our own global mutex for struct ifnet. Non-ideal, but should help in the
70 * SMP environment.
71 */
72static struct mtx mac_ifnet_mtx;
73MTX_SYSINIT(mac_ifnet_mtx, &mac_ifnet_mtx, "mac_ifnet", MTX_DEF);

--- 427 unchanged lines hidden ---