]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add to bsnmpd(1) ability to specify multiple community strings with
authorae <ae@FreeBSD.org>
Fri, 19 Jan 2018 08:48:14 +0000 (08:48 +0000)
committerae <ae@FreeBSD.org>
Fri, 19 Jan 2018 08:48:14 +0000 (08:48 +0000)
commit4e525427a285e951e17da83530ed492d4225fe36
treea348664a87fadd47677f6770a8a2e325590e4b09
parent036832f8e3d1f023d2652868360c12262662a26d
Add to bsnmpd(1) ability to specify multiple community strings with
different access rights.

By default there are two community strings with index 1 and 2, one for
read-only access and second for read-write access:

  begemotSnmpdCommunityString.0.1 = $(read)
  begemotSnmpdCommunityString.0.2 = $(write)

Now it is possible to define additional community strings using different
indexes:

  begemotSnmpdCommunityString.0.3 = "SomeString1"
  begemotSnmpdCommunityPermission.0.3 = 1
  begemotSnmpdCommunityString.0.4 = "SomeString2"
  begemotSnmpdCommunityPermission.0.4 = 2
  begemotSnmpdCommunityString.0.5 = "SomeString3"
  begemotSnmpdCommunityString.0.6 = "SomeString4"

New attribute begemotSnmpdCommunityPermission can be used to specify access
rights: 1 means "read-only" access, 2 means "read-write" access. If
attribute is not specified for some index this means "read-only" rights.

Community strings must be unique, i.e. must not be the same for different
indexes.

Obtained from: Yandex LLC
MFC after: 2 weeks
Sponsored by: Yandex LLC
Differential Revision: https://reviews.freebsd.org/D13785
contrib/bsnmp/snmpd/BEGEMOT-SNMPD.txt
contrib/bsnmp/snmpd/action.c
contrib/bsnmp/snmpd/main.c
contrib/bsnmp/snmpd/snmpd.config
contrib/bsnmp/snmpd/snmpmod.h
contrib/bsnmp/snmpd/tree.def