net/haproxy: change default for "chroot" to enabled

This commit is contained in:
Frank Wall
2016-06-13 18:40:37 +02:00
parent 5a7459707f
commit 553c627c6a
3 changed files with 2 additions and 6 deletions
@@ -28,7 +28,7 @@
<id>haproxy.general.tuning.chroot</id>
<label>Secure mode (chroot)</label>
<type>checkbox</type>
<help><![CDATA[Enable or disable HAProxy's chroot feature.<br/><div class="text-info"><b>NOTE:</b> Enabling chroot will deactivate logging to localhost, because the local syslogd is running in secure mode and does not accept network connections (and it's log socket is not accessible from the chroot directory). You'll need to log to a remote host when enabling the chroot feature.</div>]]></help>
<help><![CDATA[Enable or disable HAProxy's chroot feature.]]></help>
</field>
<field>
<id>haproxy.general.tuning.nbproc</id>
@@ -15,7 +15,7 @@
<Required>Y</Required>
</root>
<chroot type="BooleanField">
<default>0</default>
<default>1</default>
<Required>Y</Required>
</chroot>
<maxConnections type="IntegerField">
@@ -447,8 +447,6 @@ global
{% endif %}
gid 80
{% if OPNsense.HAProxy.general.tuning.chroot == "1" %}
# NOTE: chroot prevents (most) local logging, you need to enable remote
# logging when using it (because syslogd is running in secure mode).
chroot /var/run/haproxy
{% endif %}
daemon
@@ -477,8 +475,6 @@ global
{% if OPNsense.HAProxy.general.logging.host != '127.0.0.1' %}
{% do logging.append(OPNsense.HAProxy.general.logging.host) %}
{% else %}
{# # NOTE: syslogd is running is secure mode and thus does not accept network #}
{# # connections. That's why we need to use the log socket instead. #}
{% do logging.append('/var/run/log') %}
{% endif %}
{% do logging.append('len ' ~ OPNsense.HAProxy.general.logging.length) if OPNsense.HAProxy.general.logging.length|default("") != "" %}