HomeFreeBSD

MFC r328160:

Description

MFC r328160:

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
Sponsored by:		Yandex LLC
Differential Revision:	https://reviews.freebsd.org/D13785

MFC r328171:

Rename "index" variable to "idx" since gcc complains that it shadows
index(3) function declaration.

Details

Provenance
aeAuthored on
Parents
rS328770: Merge r1.120 from NetBSD:
Branches
Unknown
Tags
Unknown