mac_ifoff.c (166531) | mac_ifoff.c (166905) |
---|---|
1/*- | 1/*- |
2 * Copyright (c) 1999-2002 Robert N. M. Watson | 2 * Copyright (c) 1999-2002, 2007 Robert N. M. Watson |
3 * Copyright (c) 2001-2002 Networks Associates Technology, Inc. 4 * All rights reserved. 5 * 6 * This software was developed by Robert Watson for the TrustedBSD Project. 7 * 8 * This software was developed for the FreeBSD Project in part by Network 9 * Associates Laboratories, the Security Research Division of Network 10 * Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), --- 15 unchanged lines hidden (view full) --- 26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * | 3 * Copyright (c) 2001-2002 Networks Associates Technology, Inc. 4 * All rights reserved. 5 * 6 * This software was developed by Robert Watson for the TrustedBSD Project. 7 * 8 * This software was developed for the FreeBSD Project in part by Network 9 * Associates Laboratories, the Security Research Division of Network 10 * Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), --- 15 unchanged lines hidden (view full) --- 26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * |
34 * $FreeBSD: head/sys/security/mac_ifoff/mac_ifoff.c 166531 2007-02-06 10:59:23Z rwatson $ | 34 * $FreeBSD: head/sys/security/mac_ifoff/mac_ifoff.c 166905 2007-02-23 14:39:04Z rwatson $ |
35 */ 36 37/* 38 * Developed by the TrustedBSD Project. 39 * Limit access to interfaces until they are specifically administratively 40 * enabled. Prevents protocol stack-driven packet leakage in unsafe 41 * environments. 42 */ 43 | 35 */ 36 37/* 38 * Developed by the TrustedBSD Project. 39 * Limit access to interfaces until they are specifically administratively 40 * enabled. Prevents protocol stack-driven packet leakage in unsafe 41 * environments. 42 */ 43 |
44#include <sys/types.h> | |
45#include <sys/param.h> | 44#include <sys/param.h> |
46#include <sys/conf.h> | |
47#include <sys/kernel.h> | 45#include <sys/kernel.h> |
48#include <sys/mount.h> 49#include <sys/proc.h> 50#include <sys/systm.h> 51#include <sys/sysproto.h> 52#include <sys/sysent.h> 53#include <sys/vnode.h> 54#include <sys/file.h> | 46#include <sys/module.h> |
55#include <sys/socket.h> | 47#include <sys/socket.h> |
56#include <sys/socketvar.h> | |
57#include <sys/sysctl.h> 58 59#include <net/bpfdesc.h> | 48#include <sys/sysctl.h> 49 50#include <net/bpfdesc.h> |
60#include <net/if.h> | |
61#include <net/if_types.h> | 51#include <net/if_types.h> |
62#include <net/if_var.h> | |
63 | 52 |
64#include <vm/vm.h> 65 | |
66#include <security/mac/mac_policy.h> 67 68SYSCTL_DECL(_security_mac); 69 70SYSCTL_NODE(_security_mac, OID_AUTO, ifoff, CTLFLAG_RW, 0, 71 "TrustedBSD mac_ifoff policy controls"); 72 73static int mac_ifoff_enabled = 1; --- 104 unchanged lines hidden --- | 53#include <security/mac/mac_policy.h> 54 55SYSCTL_DECL(_security_mac); 56 57SYSCTL_NODE(_security_mac, OID_AUTO, ifoff, CTLFLAG_RW, 0, 58 "TrustedBSD mac_ifoff policy controls"); 59 60static int mac_ifoff_enabled = 1; --- 104 unchanged lines hidden --- |