summaryrefslogtreecommitdiffstats
path: root/sys/security
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2004-01-20 18:33:02 +0000
committerrwatson <rwatson@FreeBSD.org>2004-01-20 18:33:02 +0000
commit63d4653d05ffbec70fdf5d14dc3b1cb29e2b4425 (patch)
tree4c25cc433f296a24959e069f1598ced562b7cac6 /sys/security
parentdcc245d4e9f22fba713be7f55c68ec2398baa64a (diff)
downloadFreeBSD-src-63d4653d05ffbec70fdf5d14dc3b1cb29e2b4425.zip
FreeBSD-src-63d4653d05ffbec70fdf5d14dc3b1cb29e2b4425.tar.gz
Pay attention to mac_portacl_enabled.
Submitted by: simon
Diffstat (limited to 'sys/security')
-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