Bug 269791

Summary: net-mgmt/net-snmp: fix net-snmp-config --create-snmpv3-user for use on jail hosts
Product: Ports & Packages Reporter: Dan Langille <dvl>
Component: Individual Port(s)Assignee: Ryan Steinmetz <zi>
Status: Closed FIXED    
Severity: Affects Only Me Flags: zi: maintainer-feedback+
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Use @PSCMD@ -J 0 not @PSCMD@ none

Description Dan Langille freebsd_committer freebsd_triage 2023-02-23 23:01:02 UTC
Created attachment 240356 [details]
Use @PSCMD@ -J 0 not @PSCMD@

re https://github.com/net-snmp/net-snmp/issues/280 submitted about 10 months ago.

This patch allows sudo net-snmp-config --create-snmpv3-user to succeed if run on a jail host and snmpd is also running in one of the jails.

The code checks to see if snmpd is running, but fails to check only the host, not all processes.

Just now, I've starting patching my own net-mgmt/net-snmp

This works here.
Comment 1 Ryan Steinmetz freebsd_committer freebsd_triage 2023-02-24 00:57:03 UTC
Approved.
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-02-24 15:36:20 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7344c09f84ab44ed4cefe39f671b2b0b26449fe0

commit 7344c09f84ab44ed4cefe39f671b2b0b26449fe0
Author:     Dan Langille <dvl@FreeBSD.org>
AuthorDate: 2023-02-24 15:32:28 +0000
Commit:     Dan Langille <dvl@FreeBSD.org>
CommitDate: 2023-02-24 15:35:47 +0000

    net-mgmt/net-snmp: fix net-snmp-config on jail hosts

    re https://github.com/net-snmp/net-snmp/issues/280

    This patch allows 'net-snmp-config --create-snmpv3-user' to succeed
    if run on a jail host and snmpd is also running in one of the jails.

    Thhis patch limits the check to the host, ingnoring jails.

    PR:             269791

 net-mgmt/net-snmp/Makefile                               |  2 +-
 net-mgmt/net-snmp/files/patch-net-snmp-create-v3-user.in | 11 ++++++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)
Comment 3 Dan Langille freebsd_committer freebsd_triage 2023-02-24 15:37:11 UTC
Thank you.