diff options
author | gjb <gjb@FreeBSD.org> | 2014-06-27 22:05:21 +0000 |
---|---|---|
committer | gjb <gjb@FreeBSD.org> | 2014-06-27 22:05:21 +0000 |
commit | fc21f40567ac7485e9e987cf5a539bd0d11c7155 (patch) | |
tree | fce5301b062a855bc68b9cb76c6b5966c5a2acbe /sys/security/mac_portacl | |
parent | 2f456747e010bfa5a9dd3498aa5650e0ade39f22 (diff) | |
download | FreeBSD-src-fc21f40567ac7485e9e987cf5a539bd0d11c7155.zip FreeBSD-src-fc21f40567ac7485e9e987cf5a539bd0d11c7155.tar.gz |
Revert r267961, r267973:
These changes prevent sysctl(8) from returning proper output,
such as:
1) no output from sysctl(8)
2) erroneously returning ENOMEM with tools like truss(1)
or uname(1)
truss: can not get etype: Cannot allocate memory
Diffstat (limited to 'sys/security/mac_portacl')
-rw-r--r-- | sys/security/mac_portacl/mac_portacl.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/security/mac_portacl/mac_portacl.c b/sys/security/mac_portacl/mac_portacl.c index 17427ee..1dbd199 100644 --- a/sys/security/mac_portacl/mac_portacl.c +++ b/sys/security/mac_portacl/mac_portacl.c @@ -87,21 +87,27 @@ static SYSCTL_NODE(_security_mac, OID_AUTO, portacl, CTLFLAG_RW, 0, "TrustedBSD mac_portacl policy controls"); static int portacl_enabled = 1; -SYSCTL_INT(_security_mac_portacl, OID_AUTO, enabled, CTLFLAG_RWTUN, +SYSCTL_INT(_security_mac_portacl, OID_AUTO, enabled, CTLFLAG_RW, &portacl_enabled, 0, "Enforce portacl policy"); +TUNABLE_INT("security.mac.portacl.enabled", &portacl_enabled); static int portacl_suser_exempt = 1; -SYSCTL_INT(_security_mac_portacl, OID_AUTO, suser_exempt, CTLFLAG_RWTUN, +SYSCTL_INT(_security_mac_portacl, OID_AUTO, suser_exempt, CTLFLAG_RW, &portacl_suser_exempt, 0, "Privilege permits binding of any port"); +TUNABLE_INT("security.mac.portacl.suser_exempt", + &portacl_suser_exempt); static int portacl_autoport_exempt = 1; -SYSCTL_INT(_security_mac_portacl, OID_AUTO, autoport_exempt, CTLFLAG_RWTUN, +SYSCTL_INT(_security_mac_portacl, OID_AUTO, autoport_exempt, CTLFLAG_RW, &portacl_autoport_exempt, 0, "Allow automatic allocation through " "binding port 0 if not IP_PORTRANGELOW"); +TUNABLE_INT("security.mac.portacl.autoport_exempt", + &portacl_autoport_exempt); static int portacl_port_high = 1023; -SYSCTL_INT(_security_mac_portacl, OID_AUTO, port_high, CTLFLAG_RWTUN, +SYSCTL_INT(_security_mac_portacl, OID_AUTO, port_high, CTLFLAG_RW, &portacl_port_high, 0, "Highest port to enforce for"); +TUNABLE_INT("security.mac.portacl.port_high", &portacl_port_high); static MALLOC_DEFINE(M_PORTACL, "portacl_rule", "Rules for mac_portacl"); |