summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/security/mac_portacl/mac_portacl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/security/mac_portacl/mac_portacl.c b/sys/security/mac_portacl/mac_portacl.c
index a44be71..4b671c6 100644
--- a/sys/security/mac_portacl/mac_portacl.c
+++ b/sys/security/mac_portacl/mac_portacl.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2003 Networks Associates Technology, Inc.
+ * Copyright (c) 2003-2004 Networks Associates Technology, Inc.
* All rights reserved.
*
* This software was developed for the FreeBSD Project by Network
@@ -451,6 +451,10 @@ check_socket_bind(struct ucred *cred, struct socket *so,
int family, type;
u_int16_t port;
+ /* Only run if we are enabled. */
+ if (mac_portacl_enabled == 0)
+ return (0);
+
/* Only interested in IPv4 and IPv6 sockets. */
if (so->so_proto->pr_domain->dom_family != PF_INET &&
so->so_proto->pr_domain->dom_family != PF_INET6)
OpenPOWER on IntegriCloud