net-mgmt/net-snmp: 1.2 from master

This commit is contained in:
Franco Fichtner 2018-10-15 08:59:06 +02:00
parent ed72f97596
commit 0cbfe02400
4 changed files with 14 additions and 3 deletions

View file

@ -1,5 +1,5 @@
PLUGIN_NAME= net-snmp
PLUGIN_VERSION= 1.1
PLUGIN_VERSION= 1.2
PLUGIN_COMMENT= Net-SNMP is a daemon for the SNMP protocol
PLUGIN_DEPENDS= net-snmp
PLUGIN_MAINTAINER= m.muenz@gmail.com

View file

@ -23,4 +23,10 @@
<type>text</type>
<help>Set the encryption key to secure the connection between client and this host. Minimum is 8 characters.</help>
</field>
<field>
<id>user.readwrite</id>
<label>Allow Write Access</label>
<type>checkbox</type>
<help>This will enable write access in addition to read-only.</help>
</field>
</form>

View file

@ -1,7 +1,7 @@
<model>
<mount>//OPNsense/netsnmp/user</mount>
<description>Netsnmp user configuration</description>
<version>1.0.0</version>
<version>1.0.1</version>
<items>
<users>
<user type="ArrayField">
@ -27,6 +27,10 @@
<mask>/^([0-9a-zA-Z._\-\!\$\%\/\(\)\+\#\=]){8,64}$/u</mask>
<ValidationMessage>Should be a string between 8 and 64 characters. Allowed characters are 0-9a-zA-Z._-!$%/()+#=</ValidationMessage>
</enckey>
<readwrite type="BooleanField">
<default>0</default>
<Required>Y</Required>
</readwrite>
</user>
</users>
</items>

View file

@ -21,7 +21,8 @@ rocommunity6 {{ OPNsense.netsnmp.general.community }}
{% if helpers.exists('OPNsense.netsnmp.user.users.user') %}
{% for user_list in helpers.toList('OPNsense.netsnmp.user.users.user') %}
{% if user_list.enabled == '1' %}
rouser {{ user_list.username }}
{% if user_list.readwrite == '1' %}rwuser {{ user_list.username }} {% else %}rouser {{ user_list.username }} {% endif %}
{% endif %}
{% endfor %}
{% endif %}