Page MenuHomeFreeBSD

bsnmpd(1) should use specified prefix for tcpwrappers/hosts.allow
AcceptedPublic

Authored by eugen_grosbein.net on Sep 16 2023, 10:11 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 12, 9:52 AM
Unknown Object (File)
Fri, Sep 19, 11:44 AM
Unknown Object (File)
Wed, Sep 17, 5:51 PM
Unknown Object (File)
Sep 12 2025, 3:15 AM
Unknown Object (File)
Sep 9 2025, 12:11 AM
Unknown Object (File)
Sep 4 2025, 3:27 PM
Unknown Object (File)
Sep 4 2025, 11:37 AM
Unknown Object (File)
Sep 4 2025, 11:22 AM
Subscribers

Details

Summary

bsnmpd(1) has "-l prefix" command line option as the default basename for the pid and the configuration file that simplifies running different instances of the daemon. However, it does not respect this prefix for tcpwappers-based access control but uses hardcoded "snmpd" string.

Proposed one-line change fixes the problem to allow distinct sets of access control lists for distinct daemon instances.

Test Plan

Try running second bsnmpd instance with "-l anothername" command line option while /etc/hosts.allow has restrictions for "snmpd".

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

This revision is now accepted and ready to land.Jul 22 2025, 7:47 AM

Funny thing, since 2023 I run a server with two copies of bsnmpd using different configuration files (one for SNMP v2c, another for SNMP v3) and different prefixes and different ACL by means of /etc/hosts.allow. I found this problem when I set it up back those days and came with same patch to make it work.

I don't remember if I ever reported that. Most probably not.