summaryrefslogtreecommitdiffstats
path: root/sys/modules
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2003-03-02 23:01:42 +0000
committerrwatson <rwatson@FreeBSD.org>2003-03-02 23:01:42 +0000
commitf9ac94177616b8fff27d42a447cd6a28ffa950c6 (patch)
tree780d03baf8a24d0bf855233fded296b78d04bcac /sys/modules
parent9de5e26506e8b21571504c222ad76c9ffd810b56 (diff)
downloadFreeBSD-src-f9ac94177616b8fff27d42a447cd6a28ffa950c6.zip
FreeBSD-src-f9ac94177616b8fff27d42a447cd6a28ffa950c6.tar.gz
A cute yet small MAC policy that provides a simple ACL mechanism to
permit users and groups to bind ports for TCP or UDP, and is intended to be combined with the recently committed support for net.inet.ip.portrange.reservedhigh. The policy is twiddled using sysctl(8). To use this module, you will need to compile in MAC support, and probably set reservedhigh to 0, then twiddle security.mac.portacl.rules to set things as desired. This policy module only restricts ports explicitly bound using bind(), not implicitly bound ports where the port number is selected by the IP stack. It appears to work properly in my local configuration, but needs more broad testing. A sample policy might be: # sysctl security.mac.portacl.rules="uid:425:tcp:80,uid:425:tcp:79" This permits uid 425 to bind TCP sockets to ports 79 and 80. Currently no distinction is made for incoming vs. outgoing ports with TCP, although that would probably be easy to add. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
Diffstat (limited to 'sys/modules')
-rw-r--r--sys/modules/Makefile1
-rw-r--r--sys/modules/mac_portacl/Makefile9
2 files changed, 10 insertions, 0 deletions
diff --git a/sys/modules/Makefile b/sys/modules/Makefile
index 3ceea0d..0bf4b80 100644
--- a/sys/modules/Makefile
+++ b/sys/modules/Makefile
@@ -64,6 +64,7 @@ SUBDIR= accf_data \
mac_mls \
mac_none \
mac_partition \
+ mac_portacl \
mac_seeotheruids \
mac_test \
mcd \
diff --git a/sys/modules/mac_portacl/Makefile b/sys/modules/mac_portacl/Makefile
new file mode 100644
index 0000000..f1e036a
--- /dev/null
+++ b/sys/modules/mac_portacl/Makefile
@@ -0,0 +1,9 @@
+# $FreeBSD$
+
+.PATH: ${.CURDIR}/../../security/mac_portacl
+
+KMOD= mac_portacl
+SRCS= vnode_if.h \
+ mac_portacl.c
+
+.include <bsd.kmod.mk>
OpenPOWER on IntegriCloud