Index: head/etc/snmpd.config =================================================================== --- head/etc/snmpd.config (revision 337624) +++ head/etc/snmpd.config (nonexistent) @@ -1,322 +0,0 @@ -# $FreeBSD$ -# -# Example configuration file for bsnmpd(1). -# - -# -# Set some common variables -# -location := "Room 200" -contact := "sysmeister@example.com" -system := 1 # FreeBSD -traphost := localhost -trapport := 162 - -# -# Set the SNMP engine ID. -# -# The snmpEngineID object required from the SNMPv3 Framework. If not explicitly set via -# this configuration file, an ID is assigned based on the value of the -# kern.hostid variable -# engine := 0x80:0x10:0x08:0x10:0x80:0x25 -# snmpEngineID = $(engine) - -# Change this! -read := "public" -# Uncomment begemotSnmpdCommunityString.0.2 below that sets the community -# string to enable write access. -write := "geheim" -trap := "mytrap" - -# -# Declarations for SNMP-USER-BASED-SM-MIB authentication and privacy options -# - -NoAuthProtocol := 1.3.6.1.6.3.10.1.1.1 -HMACMD5AuthProtocol := 1.3.6.1.6.3.10.1.1.2 -HMACSHAAuthProtocol := 1.3.6.1.6.3.10.1.1.3 -NoPrivProtocol := 1.3.6.1.6.3.10.1.2.1 -DESPrivProtocol := 1.3.6.1.6.3.10.1.2.2 -AesCfb128Protocol := 1.3.6.1.6.3.10.1.2.4 - -# -# Enumerations from SNMP-FRAMEWORK-MIB -# - -# Security models -securityModelAny := 0 -securityModelSNMPv1 := 1 -securityModelSNMPv2c := 2 -securityModelUSM := 3 - -# Message Processing models -MPmodelSNMPv1 := 0 -MPmodelSNMPv2c := 1 -MPmodelSNMPv3 := 3 - -# Security levels -noAuthNoPriv := 1 -authNoPriv := 2 -authPriv := 3 - - -# SNMPv3 USM User definition -# -# The localized hex password for a user may be obtained by setting SNMPUSER, SNMPPASSWD, -# SNMPAUTH and SNMPPRIV environment variables to the desired parameters and invoking -# 'bsnmpget -v 3 -D -K -o verbose' against the running bsnmpd(1). For other -# usages refer to the bsnmpget(1) manual page. The following lines define a user "bsnmp" -# with a private password "bsnmptest", localized for the above engine ID. -# -#user1 := "bsnmp" -#user1passwd := 0x22:0x98:0x1a:0x6e:0x39:0x93:0x16:0x5e:0x6a:0x21:0x1b:0xd8:0xa9:0x81:0x31:0x05:0x16:0x33:0x38:0x60 - -# -# Configuration -# -%snmpd -begemotSnmpdDebugDumpPdus = 2 -begemotSnmpdDebugSyslogPri = 7 - -# -# Set the read and write communities. -# -# The default value of the community strings is NULL (note, that this is -# different from the empty string). This disables both read and write access. -# To enable read access only the read community string must be set. Setting -# the write community string enables both read and write access with that -# string. -# -# Be sure to understand the security implications of SNMPv2 - the community -# strings are readable on the wire! -# -begemotSnmpdCommunityString.0.1 = $(read) -# begemotSnmpdCommunityString.0.2 = $(write) -begemotSnmpdCommunityDisable = 1 - -# open standard SNMP ports -begemotSnmpdPortStatus.0.0.0.0.161 = 1 - -# open a unix domain socket -begemotSnmpdLocalPortStatus."/var/run/snmpd.sock" = 1 -begemotSnmpdLocalPortType."/var/run/snmpd.sock" = 4 - -# send traps to the traphost -begemotTrapSinkStatus.[$(traphost)].$(trapport) = 4 -begemotTrapSinkVersion.[$(traphost)].$(trapport) = 2 -begemotTrapSinkComm.[$(traphost)].$(trapport) = $(trap) - -sysContact = $(contact) -sysLocation = $(location) -sysObjectId = 1.3.6.1.4.1.12325.1.1.2.1.$(system) - -snmpEnableAuthenTraps = 2 - -# Uncomment `begemotSnmpdModulePath.".." = ".."' entries below to enable -# modules - -# -# Control configuration for the modules in the module specific sections, e.g. -# the "usm" module (begemotSnmpdModulePath."usm") can be controlled in the -# %usm specific section. You must uncomment the section specific header in -# order to use the enclosed variables, e.g. `usmUserStatus.$(engine).$(user1)` -# can only be used if %usm is uncommented. -# -# Modules are loaded in the order listed, so they must be before any -# dependent modules, e.g. "mibII" vs "bridge". -# - -# -# MIB-2 module -# -begemotSnmpdModulePath."mibII" = "/usr/lib/snmp_mibII.so" - -# -# Bridge module -# This requires the mibII module. -# -#begemotSnmpdModulePath."bridge" = "/usr/lib/snmp_bridge.so" - -# -# Host resources module -# This requires the mibII module. -# -#begemotSnmpdModulePath."hostres" = "/usr/lib/snmp_hostres.so" - -# -# LM75 Sensor module -# -#begemotSnmpdModulePath."lm75" = "/usr/lib/snmp_lm75.so" - -# -# Netgraph module -# -#begemotSnmpdModulePath."netgraph" = "/usr/lib/snmp_netgraph.so" - -# -# pf(4) module -# -#begemotSnmpdModulePath."pf" = "/usr/lib/snmp_pf.so" - -# -# SNMPv3 Notification Targets -# -# begemotSnmpdModulePath."target" = "/usr/lib/snmp_target.so" - -# -# SNMPv3 User-based security module - must be loaded for SNMPv3 USM -# -#begemotSnmpdModulePath."usm" = "/usr/lib/snmp_usm.so" - -# -# SNMPv3 View-based Access Control module -# -#begemotSnmpdModulePath."vacm" = "/usr/lib/snmp_vacm.so" - -# -# Wireless module -# This requires the mibII module. -# -#begemotSnmpdModulePath."wlan" = "/usr/lib/snmp_wlan.so" - -# -# SNMPv3 USM User definition. -# - -#%usm - -# -# The following block creates a user with name "bsnmp" and sets privacy -# and encryption options to SHA256 message digests and AES encryption -# for this user. -# -# usmUserStatus.$(engine).$(user1) = 5 -# usmUserAuthProtocol.$(engine).$(user1) = $(HMACSHAAuthProtocol) -# usmUserAuthKeyChange.$(engine).$(user1) = $(user1passwd) -# usmUserPrivProtocol.$(engine).$(user1) = $(AesCfb128Protocol) -# usmUserPrivKeyChange.$(engine).$(user1) = $(user1passwd) -# usmUserStatus.$(engine).$(user1) = 1 -# - -# -# The following block creates a user with name "public" with no authentication -# or encryption options. -# -# usmUserStatus.$(engine).$(read) = 5 -# usmUserAuthProtocol.$(engine).$(read) = $(NoAuthProtocol) -# usmUserPrivProtocol.$(engine).$(read) = $(NoPrivProtocol) -# usmUserStatus.$(engine).$(read) = 1 -# - -# -# Definition of view-based access control entries. -# -#%vacm - -# Definition of a SNMPv1 group -# vacmSecurityToGroupStatus.$(securityModelSNMPv1).$(read) = 4 -# vacmGroupName.$(securityModelSNMPv1).$(read) = $(read) - -# Definition of SNMPv2 group -# vacmSecurityToGroupStatus.$(securityModelSNMPv2c).$(write) = 4 -# vacmGroupName.$(securityModelSNMPv2c).$(write) = $(write) - -# Definition of SNMPv3 group with users "bsnmp" and "public" -# vacmSecurityToGroupStatus.$(securityModelUSM).$(user1) = 4 -# vacmGroupName.$(securityModelUSM).$(user1) = $(write) -# vacmSecurityToGroupStatus.$(securityModelUSM).$(read) = 4 -# vacmGroupName.$(securityModelUSM).$(read) = $(write) - -# -# The OID of the .iso.org.dod.internet subtree -# -# internetoid := 1.3.6.1 -# internetoidlen := 4 - -# -# Definitions of two views -# -# vacmViewTreeFamilyStatus."internet".$(internetoidlen).$(internetoid) = 4 -# vacmViewTreeFamilyStatus."restricted".$(internetoidlen).$(internetoid) = 4 - -# -# Access control -# - -# -# Read-only access for SNMPv1 users -# -# vacmAccessStatus.$(read)."".$(securityModelSNMPv1).$(noAuthNoPriv) = 4 -# vacmAccessReadViewName.$(read)."".$(securityModelSNMPv1).$(noAuthNoPriv) = "internet" - -# -# Read-write access for SNMPv2 users -# -# vacmAccessStatus.$(write)."".$(securityModelSNMPv2c).$(noAuthNoPriv) = 4 -# vacmAccessReadViewName.$(write)."".$(securityModelSNMPv2c).$(noAuthNoPriv) = "internet" -# vacmAccessWriteViewName.$(write)."".$(securityModelSNMPv2c).$(noAuthNoPriv) = "internet" - -# -# Read-write-notify access for SNMPv3 USM users with noAuthNoPriv -# -# vacmAccessStatus.$(write)."".3.$(noAuthNoPriv) = 4 -# vacmAccessReadViewName.$(write)."".$(securityModelUSM).$(noAuthNoPriv) = "internet" -# vacmAccessWriteViewName.$(write)."".$(securityModelUSM).$(noAuthNoPriv) = "internet" -# vacmAccessNotifyViewName.$(write)."".$(securityModelUSM).$(noAuthNoPriv) = "internet" - -# -#Read-write-notify access to restricted for SNMPv3 USM users with authPriv -# -# vacmAccessStatus.$(write)."".$(securityModelUSM).$(authPriv) = 4 -# vacmAccessReadViewName.$(write)."".$(securityModelUSM).$(authPriv) = "restricted" -# vacmAccessWriteViewName.$(write)."".$(securityModelUSM).$(authPriv) = "restricted" -# vacmAccessNotifyViewName.$(write)."".$(securityModelUSM).$(authPriv) = "restricted" - -#%target -# Send notifications to target tag "test" -# tag := "test" -# snmpNotifyRowStatus.$(tag) = 4 -# snmpNotifyTag.$(tag) = $(tag) - -# tagremote := "testremote" -# snmpNotifyRowStatus.$(tagremote) = 4 -# snmpNotifyTag.$(tagremote) = $(tagremote) - -# -# Specify the target parameters for the notifications - send with the credentials -# of user "bsnmp" -# -# snmpTargetParamsRowStatus.$(tag) = 5 -# snmpTargetParamsMPModel.$(tag) = $(MPmodelSNMPv3) -# snmpTargetParamsSecurityModel.$(tag) = $(securityModelUSM) -# snmpTargetParamsSecurityName.$(tag) = $(user1) -# snmpTargetParamsSecurityLevel.$(tag) = $(authPriv) -# snmpTargetParamsRowStatus.$(tag) = 1 - -# -# Define the notifications' target address - port 162 on localhost -# -# snmpTargetAddrRowStatus.$(tag) = 5 -# snmpTargetAddrTAddress.$(tag) = 0x7f:0x0:0x0:0x1:0x0:0xa2 -# snmpTargetAddrTagList.$(tag) = "test notification" -# snmpTargetAddrParams.$(tag) = $(tag) -# snmpTargetAddrRowStatus.$(tag) = 1 - -# -# Define the notifications' target address - port 162 on 10.0.0.1 -# -# snmpTargetAddrRowStatus.$(tagremote) = 5 -# snmpTargetAddrTAddress.$(tagremote) = 0x0a:0x00:0x00:0x1:0x0:0xa2 -# snmpTargetAddrTagList.$(tagremote) = $(tagremote) -# snmpTargetAddrParams.$(tagremote) = $(tag) -# snmpTargetAddrRowStatus.$(tagremote) = 1 - -# Force a polling rate for the 64-bit interface counters in case -# the automatic computation is wrong (which may be the case if an interface -# announces the wrong bit rate via its MIB). -#%mibII -#begemotIfForcePoll = 2000 - -#%netgraph -#begemotNgControlNodeName = "snmpd" - Property changes on: head/etc/snmpd.config ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/etc/Makefile =================================================================== --- head/etc/Makefile (revision 337624) +++ head/etc/Makefile (revision 337625) @@ -1,357 +1,352 @@ # from: @(#)Makefile 5.11 (Berkeley) 5/21/91 # $FreeBSD$ .include FILESGROUPS= FILES # No need as it is empty and just causes rebuilds since this file does so much. UPDATE_DEPENDFILE= no .if ${MK_SENDMAIL} != "no" SUBDIR+=sendmail .endif BIN1= crontab \ devd.conf \ devfs.conf \ dhclient.conf \ disktab \ fbtab \ gettytab \ group \ hosts \ hosts.allow \ hosts.equiv \ libalias.conf \ libmap.conf \ login.access \ login.conf \ mac.conf \ motd \ netconfig \ networks \ newsyslog.conf \ nsswitch.conf \ phones \ profile \ protocols \ rc.bsdextended \ rc.firewall \ remote \ rpc \ services \ syslog.conf \ termcap.small .if exists(${.CURDIR}/etc.${MACHINE}/ttys) BIN1+= etc.${MACHINE}/ttys .elif exists(${.CURDIR}/etc.${MACHINE_ARCH}/ttys) BIN1+= etc.${MACHINE_ARCH}/ttys .elif exists(${.CURDIR}/etc.${MACHINE_CPUARCH}/ttys) BIN1+= etc.${MACHINE_CPUARCH}/ttys .else .error etc.MACHINE/ttys missing .endif # NB: keep these sorted by MK_* knobs .if ${MK_AMD} != "no" BIN1+= amd.map .endif .if ${MK_FTP} != "no" BIN1+= ftpusers .endif .if ${MK_INETD} != "no" BIN1+= inetd.conf .endif .if ${MK_LOCATE} != "no" BIN1+= ${SRCTOP}/usr.bin/locate/locate/locate.rc .endif .if ${MK_LPR} != "no" BIN1+= hosts.lpd printcap .endif .if ${MK_MAIL} != "no" BIN1+= ${SRCTOP}/usr.bin/mail/misc/mail.rc .endif .if ${MK_NTP} != "no" BIN1+= ntp.conf .endif .if ${MK_OPENSSH} != "no" SSH= ${SRCTOP}/crypto/openssh/ssh_config \ ${SRCTOP}/crypto/openssh/sshd_config \ ${SRCTOP}/crypto/openssh/moduli .endif .if ${MK_OPENSSL} != "no" SSL= ${SRCTOP}/crypto/openssl/apps/openssl.cnf .endif .if ${MK_PF} != "no" BIN1+= pf.os .endif .if ${MK_SENDMAIL} != "no" BIN1+= rc.sendmail .endif .if ${MK_TCSH} != "no" BIN1+= csh.cshrc csh.login csh.logout .endif .if ${MK_WIRELESS} != "no" BIN1+= regdomain.xml .endif .if ${MK_SENDMAIL} == "no" ETCMAIL=mailer.conf aliases .else ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \ mailertable.sample aliases .endif # Special top level files for FreeBSD FREEBSD=COPYRIGHT # Sanitize DESTDIR DESTDIR:= ${DESTDIR:C://*:/:g} afterinstall: .if ${MK_MAN} != "no" ${_+_}cd ${SRCTOP}/share/man; ${MAKE} makedb .endif distribute: # Avoid installing tests here; "make distribution" will do this and # correctly place them in the right location. ${_+_}cd ${.CURDIR} ; ${MAKE} MK_TESTS=no install \ DESTDIR=${DISTDIR}/${DISTRIBUTION} ${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION} .include .if defined(NO_ROOT) METALOG.add?= cat -l >> ${METALOG} .endif distribution: .if !defined(DESTDIR) @echo "set DESTDIR before running \"make ${.TARGET}\"" @false .endif cd ${.CURDIR}; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${BIN1} ${DESTDIR}/etc; \ cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; .if ${MK_SERVICESDB} != "no" cd ${.CURDIR}; \ services_mkdb ${CAP_MKDB_ENDIAN} -q -o ${DESTDIR}/var/db/services.db \ ${DESTDIR}/etc/services; .endif -.if ${MK_BSNMP} != "no" - cd ${.CURDIR}; \ - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ - snmpd.config ${DESTDIR}/etc; -.endif .if ${MK_TCSH} == "no" sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd .endif pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd .if defined(NO_ROOT) ( \ echo "./etc/login.conf.db type=file mode=0644 uname=root gname=wheel"; \ echo "./etc/passwd type=file mode=0644 uname=root gname=wheel"; \ echo "./etc/pwd.db type=file mode=0644 uname=root gname=wheel"; \ echo "./etc/spwd.db type=file mode=0600 uname=root gname=wheel"; \ echo "./var/db/services.db type=file mode=0644 uname=root gname=wheel"; \ ) | ${METALOG.add} .endif .if ${MK_BLUETOOTH} != "no" ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install .endif ${_+_}cd ${.CURDIR}/cron.d; ${MAKE} install ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install ${_+_}cd ${.CURDIR}/devd; ${MAKE} install ${_+_}cd ${.CURDIR}/gss; ${MAKE} install ${_+_}cd ${.CURDIR}/mtree; ${MAKE} install ${_+_}cd ${.CURDIR}/newsyslog.conf.d; ${MAKE} install .if ${MK_NTP} != "no" ${_+_}cd ${.CURDIR}/ntp; ${MAKE} install .endif ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install ${_+_}cd ${SRCTOP}/share/termcap; ${MAKE} etc-termcap ${_+_}cd ${.CURDIR}/syslog.d; ${MAKE} install ${_+_}cd ${SRCTOP}/usr.sbin/rmt; ${MAKE} etc-rmt ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install .if ${MK_UNBOUND} != "no" if [ ! -e ${DESTDIR}/etc/unbound ]; then \ ${INSTALL_SYMLINK} ../var/unbound ${DESTDIR}/etc/unbound; \ fi .endif .if ${MK_SENDMAIL} != "no" ${_+_}cd ${.CURDIR}/sendmail; ${MAKE} distribution .endif .if ${MK_OPENSSH} != "no" cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${SSH} ${DESTDIR}/etc/ssh .endif .if ${MK_OPENSSL} != "no" cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${SSL} ${DESTDIR}/etc/ssl .endif .if ${MK_KERBEROS} != "no" cd ${.CURDIR}/root; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ dot.k5login ${DESTDIR}/root/.k5login; .endif cd ${.CURDIR}/root; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ dot.profile ${DESTDIR}/root/.profile; \ rm -f ${DESTDIR}/.profile; \ ${INSTALL_LINK} ${DESTDIR}/root/.profile ${DESTDIR}/.profile .if ${MK_TCSH} != "no" cd ${.CURDIR}/root; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ dot.cshrc ${DESTDIR}/root/.cshrc; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ dot.login ${DESTDIR}/root/.login; \ rm -f ${DESTDIR}/.cshrc; \ ${INSTALL_LINK} ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc .endif .if ${MK_MAIL} != "no" cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${ETCMAIL} ${DESTDIR}/etc/mail if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \ ! -f ${DESTDIR}/etc/aliases ]; then \ ${INSTALL_SYMLINK} mail/aliases ${DESTDIR}/etc/aliases; \ fi .endif .if ${MK_LOCATE} != "no" ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \ ${DESTDIR}/var/db/locate.database .endif cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ ${FREEBSD} ${DESTDIR}/ .if ${MK_BOOT} != "no" .if exists(${SRCTOP}/sys/${MACHINE}/conf/GENERIC.hints) ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ ${SRCTOP}/sys/${MACHINE}/conf/GENERIC.hints \ ${DESTDIR}/boot/device.hints .endif .endif .if ${MK_NIS} == "no" sed -i "" -e 's/.*_compat:/# &/' -e 's/compat$$/files/' \ ${DESTDIR}/etc/nsswitch.conf .endif MTREE_CMD?= mtree MTREES= mtree/BSD.root.dist / \ mtree/BSD.var.dist /var \ mtree/BSD.usr.dist /usr \ mtree/BSD.include.dist /usr/include \ mtree/BSD.debug.dist /usr/lib .if ${MK_LIB32} != "no" MTREES+= mtree/BSD.lib32.dist /usr MTREES+= mtree/BSD.lib32.dist /usr/lib/debug/usr .endif .if ${MK_LIBSOFT} != "no" MTREES+= mtree/BSD.libsoft.dist /usr MTREES+= mtree/BSD.libsoft.dist /usr/lib/debug/usr .endif .if ${MK_TESTS} != "no" MTREES+= mtree/BSD.tests.dist ${TESTSBASE} MTREES+= mtree/BSD.tests.dist /usr/lib/debug/${TESTSBASE} .endif .if ${MK_SENDMAIL} != "no" MTREES+= mtree/BSD.sendmail.dist / .endif .for mtree in ${LOCAL_MTREE} MTREES+= ../${mtree} / .endfor # Clean up some directories that where mistakenly created as files that # should not have been as part of the nvi update in r281994. # This should be removed after 11.0-RELEASE. DISTRIB_CLEANUP_SHARE_FILES= ${SHAREDIR}/doc/usd/10.exref ${SHAREDIR}/doc/usd/11.edit DISTRIB_CLEANUP_SHARE_FILES+= ${SHAREDIR}/doc/usd/12.vi ${SHAREDIR}/doc/usd/13.viref distrib-cleanup: .PHONY for file in ${DISTRIB_CLEANUP_SHARE_FILES}; do \ if [ -f ${DESTDIR}/$${file} ]; then \ rm -f ${DESTDIR}/$${file}; \ fi; \ done distrib-dirs: ${MTREES:N/*} distrib-cleanup .PHONY @set ${MTREES}; \ while test $$# -ge 2; do \ m=${.CURDIR}/$$1; \ shift; \ d=${DESTDIR}$$1; \ shift; \ test -d $$d || mkdir -p $$d; \ ${ECHO} ${MTREE_CMD} -deU ${MTREE_FSCHG} \ ${MTREE_FOLLOWS_SYMLINKS} -f $$m -p $$d; \ ${MTREE_FILTER} $$m | \ ${MTREE_CMD} -deU ${MTREE_FSCHG} ${MTREE_FOLLOWS_SYMLINKS} \ -p $$d; \ done; true .if defined(NO_ROOT) @set ${MTREES}; \ while test $$# -ge 2; do \ m=${.CURDIR}/$$1; \ shift; \ d=$$1; \ test "$$d" == "/" && d=""; \ d=${DISTBASE}$$d; \ shift; \ test -d ${DESTDIR}/$$d || mkdir -p ${DESTDIR}/$$d; \ ${ECHO} "${MTREE_CMD:N-W} -C -f $$m -K all | " \ "sed s#^\.#.$$d# | ${METALOG.add}" ; \ ${MTREE_FILTER} $$m | \ ${MTREE_CMD:N-W} -C -K all | sed s#^\.#.$$d# | \ ${METALOG.add} ; \ done; true .endif .if ${MK_NLS} != "no" set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \ while [ $$# -gt 0 ] ; do \ ${INSTALL_SYMLINK} "$$2" "${DESTDIR}${SHAREDIR}/nls/$$1"; \ shift; shift; \ done .endif etc-examples-install: ${META_DEPS} cd ${.CURDIR}; ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 \ ${BIN1} ${BIN2} nsmb.conf opieaccess \ ${DESTDIR}${SHAREDIR}/examples/etc etc-examples: etc-examples-install ${_+_}cd ${.CURDIR}/defaults; \ ${MAKE} ${${MK_STAGING} == "yes":?all:install} \ DESTDIR=${DESTDIR}${SHAREDIR}/examples .include .if ${MK_INSTALL_AS_USER} == "yes" && ${_uid} != 0 MTREE_FILTER= sed -e 's,\([gu]\)name=,\1id=,g' \ -e 's,\(uid=\)[^ ]* ,\1${_uid} ,' \ -e 's,\(gid=\)[^ ]* ,\1${_gid} ,' \ -e 's,\(uid=\)[^ ]*$$,\1${_uid},' \ -e 's,\(gid=\)[^ ]*$$,\1${_gid},' .else MTREE_FILTER= cat .if !defined(NO_FSCHG) MTREE_FSCHG= -i .endif .endif Index: head/usr.sbin/bsnmpd/bsnmpd/Makefile =================================================================== --- head/usr.sbin/bsnmpd/bsnmpd/Makefile (revision 337624) +++ head/usr.sbin/bsnmpd/bsnmpd/Makefile (revision 337625) @@ -1,153 +1,155 @@ # $FreeBSD$ # # Author: Harti Brandt .include CONTRIB=${SRCTOP}/contrib/bsnmp .PATH: ${CONTRIB}/snmpd +CONFS= snmpd.config +CONFSMODE= 600 PROG= bsnmpd SRCS= main.c action.c config.c export.c trap.c trans_udp.c trans_lsock.c SRCS+= oid.h tree.c tree.h XSYM= snmpMIB begemotSnmpdModuleTable begemotSnmpd begemotTrapSinkTable \ sysUpTime snmpTrapOID coldStart authenticationFailure \ begemotSnmpdTransUdp begemotSnmpdTransLsock begemotSnmpdLocalPortTable \ freeBSD freeBSDVersion CLEANFILES= oid.h tree.c tree.h MAN= bsnmpd.1 snmpmod.3 MLINKS+= snmpmod.3 FIND_OBJECT_INT.3 MLINKS+= snmpmod.3 FIND_OBJECT_INT_LINK.3 MLINKS+= snmpmod.3 FIND_OBJECT_INT_LINK_INDEX.3 MLINKS+= snmpmod.3 FIND_OBJECT_OID.3 MLINKS+= snmpmod.3 FIND_OBJECT_OID_LINK.3 MLINKS+= snmpmod.3 FIND_OBJECT_OID_LINK_INDEX.3 MLINKS+= snmpmod.3 INSERT_OBJECT_INT.3 MLINKS+= snmpmod.3 INSERT_OBJECT_INT_LINK.3 MLINKS+= snmpmod.3 INSERT_OBJECT_INT_LINK_INDEX.3 MLINKS+= snmpmod.3 INSERT_OBJECT_OID.3 MLINKS+= snmpmod.3 INSERT_OBJECT_OID_LINK.3 MLINKS+= snmpmod.3 INSERT_OBJECT_OID_LINK_INDEX.3 MLINKS+= snmpmod.3 NEXT_OBJECT_INT.3 MLINKS+= snmpmod.3 NEXT_OBJECT_INT_LINK.3 MLINKS+= snmpmod.3 NEXT_OBJECT_INT_LINK_INDEX.3 MLINKS+= snmpmod.3 NEXT_OBJECT_OID.3 MLINKS+= snmpmod.3 NEXT_OBJECT_OID_LINK.3 MLINKS+= snmpmod.3 NEXT_OBJECT_OID_LINK_INDEX.3 MLINKS+= snmpmod.3 bsnmpd_get_target_stats.3 MLINKS+= snmpmod.3 bsnmpd_get_usm_stats.3 MLINKS+= snmpmod.3 bsnmpd_reset_usm_stats.3 MLINKS+= snmpmod.3 buf_alloc.3 MLINKS+= snmpmod.3 buf_size.3 MLINKS+= snmpmod.3 comm_define.3 MLINKS+= snmpmod.3 community.3 MLINKS+= snmpmod.3 fd_deselect.3 MLINKS+= snmpmod.3 fd_resume.3 MLINKS+= snmpmod.3 fd_select.3 MLINKS+= snmpmod.3 fd_suspend.3 MLINKS+= snmpmod.3 get_ticks.3 MLINKS+= snmpmod.3 index_append.3 MLINKS+= snmpmod.3 index_append_off.3 MLINKS+= snmpmod.3 index_compare.3 MLINKS+= snmpmod.3 index_compare_off.3 MLINKS+= snmpmod.3 index_decode.3 MLINKS+= snmpmod.3 ip_commit.3 MLINKS+= snmpmod.3 ip_get.3 MLINKS+= snmpmod.3 ip_rollback.3 MLINKS+= snmpmod.3 ip_save.3 MLINKS+= snmpmod.3 or_register.3 MLINKS+= snmpmod.3 or_unregister.3 MLINKS+= snmpmod.3 oid_commit.3 MLINKS+= snmpmod.3 oid_get.3 MLINKS+= snmpmod.3 oid_rollback.3 MLINKS+= snmpmod.3 oid_save.3 MLINKS+= snmpmod.3 oid_usmNotInTimeWindows.3 MLINKS+= snmpmod.3 oid_usmUnknownEngineIDs.3 MLINKS+= snmpmod.3 oid_zeroDotZero.3 MLINKS+= snmpmod.3 reqid_allocate.3 MLINKS+= snmpmod.3 reqid_base.3 MLINKS+= snmpmod.3 reqid_istype.3 MLINKS+= snmpmod.3 reqid_next.3 MLINKS+= snmpmod.3 reqid_type.3 MLINKS+= snmpmod.3 snmp_input_finish.3 MLINKS+= snmpmod.3 snmp_input_start.3 MLINKS+= snmpmod.3 snmp_output.3 MLINKS+= snmpmod.3 snmp_pdu_auth_access.3 MLINKS+= snmpmod.3 snmp_send_port.3 MLINKS+= snmpmod.3 snmp_send_trap.3 MLINKS+= snmpmod.3 snmpd_target_stat.3 MLINKS+= snmpmod.3 snmpd_usmstats.3 MLINKS+= snmpmod.3 start_tick.3 MLINKS+= snmpmod.3 string_commit.3 MLINKS+= snmpmod.3 string_free.3 MLINKS+= snmpmod.3 string_get.3 MLINKS+= snmpmod.3 string_get_max.3 MLINKS+= snmpmod.3 string_rollback.3 MLINKS+= snmpmod.3 string_save.3 MLINKS+= snmpmod.3 systemg.3 MLINKS+= snmpmod.3 this_tick.3 MLINKS+= snmpmod.3 timer_start.3 MLINKS+= snmpmod.3 timer_start_repeat.3 MLINKS+= snmpmod.3 timer_stop.3 MLINKS+= snmpmod.3 target_activate_address.3 MLINKS+= snmpmod.3 target_address.3 MLINKS+= snmpmod.3 target_delete_address.3 MLINKS+= snmpmod.3 target_delete_notify.3 MLINKS+= snmpmod.3 target_delete_param.3 MLINKS+= snmpmod.3 target_first_address.3 MLINKS+= snmpmod.3 target_first_notify.3 MLINKS+= snmpmod.3 target_first_param.3 MLINKS+= snmpmod.3 target_flush_all.3 MLINKS+= snmpmod.3 target_next_address.3 MLINKS+= snmpmod.3 target_next_notify.3 MLINKS+= snmpmod.3 target_next_param.3 MLINKS+= snmpmod.3 target_new_address.3 MLINKS+= snmpmod.3 target_new_notify.3 MLINKS+= snmpmod.3 target_new_param.3 MLINKS+= snmpmod.3 target_notify.3 MLINKS+= snmpmod.3 target_param.3 MLINKS+= snmpmod.3 usm_delete_user.3 MLINKS+= snmpmod.3 usm_find_user.3 MLINKS+= snmpmod.3 usm_first_user.3 MLINKS+= snmpmod.3 usm_flush_users.3 MLINKS+= snmpmod.3 usm_next_user.3 MLINKS+= snmpmod.3 usm_new_user.3 MLINKS+= snmpmod.3 usm_user.3 FILESGROUPS= BMIBS DEFS BMIBS= FOKUS-MIB.txt BEGEMOT-MIB.txt BEGEMOT-SNMPD.txt BMIBSDIR= ${SHAREDIR}/snmp/mibs DEFS= tree.def DEFSDIR= ${SHAREDIR}/snmp/defs CFLAGS+= -I${CONTRIB}/lib -I${CONTRIB}/snmpd -I. -DUSE_LIBBEGEMOT CFLAGS+= -DHAVE_STDINT_H -DHAVE_INTTYPES_H -DHAVE_ERR_H -DHAVE_STRLCPY LIBADD= begemot bsnmp LDFLAGS= -Wl,-export-dynamic .if ${MK_OPENSSL} != "no" CFLAGS+= -DHAVE_LIBCRYPTO .endif .if ${MK_TCP_WRAPPERS} != "no" CFLAGS+= -DUSE_TCPWRAPPERS LIBADD+= wrap .endif oid.h: tree.def Makefile gensnmptree -I${CONTRIB}/lib -e ${XSYM} < ${.ALLSRC:M*.def} > ${.TARGET} .ORDER: tree.c tree.h tree.h: .NOMETA tree.c tree.h: tree.def gensnmptree -I${CONTRIB}/lib -l -f < ${.ALLSRC} MANFILTER= sed -e 's%@MODPATH@%${LIBDIR}/%g' \ -e 's%@DEFPATH@%${DEFSDIR}/%g' \ -e 's%@MIBSPATH@%${BMIBSDIR}/%g' .include Index: head/usr.sbin/bsnmpd/bsnmpd/snmpd.config =================================================================== --- head/usr.sbin/bsnmpd/bsnmpd/snmpd.config (nonexistent) +++ head/usr.sbin/bsnmpd/bsnmpd/snmpd.config (revision 337625) @@ -0,0 +1,322 @@ +# $FreeBSD$ +# +# Example configuration file for bsnmpd(1). +# + +# +# Set some common variables +# +location := "Room 200" +contact := "sysmeister@example.com" +system := 1 # FreeBSD +traphost := localhost +trapport := 162 + +# +# Set the SNMP engine ID. +# +# The snmpEngineID object required from the SNMPv3 Framework. If not explicitly set via +# this configuration file, an ID is assigned based on the value of the +# kern.hostid variable +# engine := 0x80:0x10:0x08:0x10:0x80:0x25 +# snmpEngineID = $(engine) + +# Change this! +read := "public" +# Uncomment begemotSnmpdCommunityString.0.2 below that sets the community +# string to enable write access. +write := "geheim" +trap := "mytrap" + +# +# Declarations for SNMP-USER-BASED-SM-MIB authentication and privacy options +# + +NoAuthProtocol := 1.3.6.1.6.3.10.1.1.1 +HMACMD5AuthProtocol := 1.3.6.1.6.3.10.1.1.2 +HMACSHAAuthProtocol := 1.3.6.1.6.3.10.1.1.3 +NoPrivProtocol := 1.3.6.1.6.3.10.1.2.1 +DESPrivProtocol := 1.3.6.1.6.3.10.1.2.2 +AesCfb128Protocol := 1.3.6.1.6.3.10.1.2.4 + +# +# Enumerations from SNMP-FRAMEWORK-MIB +# + +# Security models +securityModelAny := 0 +securityModelSNMPv1 := 1 +securityModelSNMPv2c := 2 +securityModelUSM := 3 + +# Message Processing models +MPmodelSNMPv1 := 0 +MPmodelSNMPv2c := 1 +MPmodelSNMPv3 := 3 + +# Security levels +noAuthNoPriv := 1 +authNoPriv := 2 +authPriv := 3 + + +# SNMPv3 USM User definition +# +# The localized hex password for a user may be obtained by setting SNMPUSER, SNMPPASSWD, +# SNMPAUTH and SNMPPRIV environment variables to the desired parameters and invoking +# 'bsnmpget -v 3 -D -K -o verbose' against the running bsnmpd(1). For other +# usages refer to the bsnmpget(1) manual page. The following lines define a user "bsnmp" +# with a private password "bsnmptest", localized for the above engine ID. +# +#user1 := "bsnmp" +#user1passwd := 0x22:0x98:0x1a:0x6e:0x39:0x93:0x16:0x5e:0x6a:0x21:0x1b:0xd8:0xa9:0x81:0x31:0x05:0x16:0x33:0x38:0x60 + +# +# Configuration +# +%snmpd +begemotSnmpdDebugDumpPdus = 2 +begemotSnmpdDebugSyslogPri = 7 + +# +# Set the read and write communities. +# +# The default value of the community strings is NULL (note, that this is +# different from the empty string). This disables both read and write access. +# To enable read access only the read community string must be set. Setting +# the write community string enables both read and write access with that +# string. +# +# Be sure to understand the security implications of SNMPv2 - the community +# strings are readable on the wire! +# +begemotSnmpdCommunityString.0.1 = $(read) +# begemotSnmpdCommunityString.0.2 = $(write) +begemotSnmpdCommunityDisable = 1 + +# open standard SNMP ports +begemotSnmpdPortStatus.0.0.0.0.161 = 1 + +# open a unix domain socket +begemotSnmpdLocalPortStatus."/var/run/snmpd.sock" = 1 +begemotSnmpdLocalPortType."/var/run/snmpd.sock" = 4 + +# send traps to the traphost +begemotTrapSinkStatus.[$(traphost)].$(trapport) = 4 +begemotTrapSinkVersion.[$(traphost)].$(trapport) = 2 +begemotTrapSinkComm.[$(traphost)].$(trapport) = $(trap) + +sysContact = $(contact) +sysLocation = $(location) +sysObjectId = 1.3.6.1.4.1.12325.1.1.2.1.$(system) + +snmpEnableAuthenTraps = 2 + +# Uncomment `begemotSnmpdModulePath.".." = ".."' entries below to enable +# modules + +# +# Control configuration for the modules in the module specific sections, e.g. +# the "usm" module (begemotSnmpdModulePath."usm") can be controlled in the +# %usm specific section. You must uncomment the section specific header in +# order to use the enclosed variables, e.g. `usmUserStatus.$(engine).$(user1)` +# can only be used if %usm is uncommented. +# +# Modules are loaded in the order listed, so they must be before any +# dependent modules, e.g. "mibII" vs "bridge". +# + +# +# MIB-2 module +# +begemotSnmpdModulePath."mibII" = "/usr/lib/snmp_mibII.so" + +# +# Bridge module +# This requires the mibII module. +# +#begemotSnmpdModulePath."bridge" = "/usr/lib/snmp_bridge.so" + +# +# Host resources module +# This requires the mibII module. +# +#begemotSnmpdModulePath."hostres" = "/usr/lib/snmp_hostres.so" + +# +# LM75 Sensor module +# +#begemotSnmpdModulePath."lm75" = "/usr/lib/snmp_lm75.so" + +# +# Netgraph module +# +#begemotSnmpdModulePath."netgraph" = "/usr/lib/snmp_netgraph.so" + +# +# pf(4) module +# +#begemotSnmpdModulePath."pf" = "/usr/lib/snmp_pf.so" + +# +# SNMPv3 Notification Targets +# +# begemotSnmpdModulePath."target" = "/usr/lib/snmp_target.so" + +# +# SNMPv3 User-based security module - must be loaded for SNMPv3 USM +# +#begemotSnmpdModulePath."usm" = "/usr/lib/snmp_usm.so" + +# +# SNMPv3 View-based Access Control module +# +#begemotSnmpdModulePath."vacm" = "/usr/lib/snmp_vacm.so" + +# +# Wireless module +# This requires the mibII module. +# +#begemotSnmpdModulePath."wlan" = "/usr/lib/snmp_wlan.so" + +# +# SNMPv3 USM User definition. +# + +#%usm + +# +# The following block creates a user with name "bsnmp" and sets privacy +# and encryption options to SHA256 message digests and AES encryption +# for this user. +# +# usmUserStatus.$(engine).$(user1) = 5 +# usmUserAuthProtocol.$(engine).$(user1) = $(HMACSHAAuthProtocol) +# usmUserAuthKeyChange.$(engine).$(user1) = $(user1passwd) +# usmUserPrivProtocol.$(engine).$(user1) = $(AesCfb128Protocol) +# usmUserPrivKeyChange.$(engine).$(user1) = $(user1passwd) +# usmUserStatus.$(engine).$(user1) = 1 +# + +# +# The following block creates a user with name "public" with no authentication +# or encryption options. +# +# usmUserStatus.$(engine).$(read) = 5 +# usmUserAuthProtocol.$(engine).$(read) = $(NoAuthProtocol) +# usmUserPrivProtocol.$(engine).$(read) = $(NoPrivProtocol) +# usmUserStatus.$(engine).$(read) = 1 +# + +# +# Definition of view-based access control entries. +# +#%vacm + +# Definition of a SNMPv1 group +# vacmSecurityToGroupStatus.$(securityModelSNMPv1).$(read) = 4 +# vacmGroupName.$(securityModelSNMPv1).$(read) = $(read) + +# Definition of SNMPv2 group +# vacmSecurityToGroupStatus.$(securityModelSNMPv2c).$(write) = 4 +# vacmGroupName.$(securityModelSNMPv2c).$(write) = $(write) + +# Definition of SNMPv3 group with users "bsnmp" and "public" +# vacmSecurityToGroupStatus.$(securityModelUSM).$(user1) = 4 +# vacmGroupName.$(securityModelUSM).$(user1) = $(write) +# vacmSecurityToGroupStatus.$(securityModelUSM).$(read) = 4 +# vacmGroupName.$(securityModelUSM).$(read) = $(write) + +# +# The OID of the .iso.org.dod.internet subtree +# +# internetoid := 1.3.6.1 +# internetoidlen := 4 + +# +# Definitions of two views +# +# vacmViewTreeFamilyStatus."internet".$(internetoidlen).$(internetoid) = 4 +# vacmViewTreeFamilyStatus."restricted".$(internetoidlen).$(internetoid) = 4 + +# +# Access control +# + +# +# Read-only access for SNMPv1 users +# +# vacmAccessStatus.$(read)."".$(securityModelSNMPv1).$(noAuthNoPriv) = 4 +# vacmAccessReadViewName.$(read)."".$(securityModelSNMPv1).$(noAuthNoPriv) = "internet" + +# +# Read-write access for SNMPv2 users +# +# vacmAccessStatus.$(write)."".$(securityModelSNMPv2c).$(noAuthNoPriv) = 4 +# vacmAccessReadViewName.$(write)."".$(securityModelSNMPv2c).$(noAuthNoPriv) = "internet" +# vacmAccessWriteViewName.$(write)."".$(securityModelSNMPv2c).$(noAuthNoPriv) = "internet" + +# +# Read-write-notify access for SNMPv3 USM users with noAuthNoPriv +# +# vacmAccessStatus.$(write)."".3.$(noAuthNoPriv) = 4 +# vacmAccessReadViewName.$(write)."".$(securityModelUSM).$(noAuthNoPriv) = "internet" +# vacmAccessWriteViewName.$(write)."".$(securityModelUSM).$(noAuthNoPriv) = "internet" +# vacmAccessNotifyViewName.$(write)."".$(securityModelUSM).$(noAuthNoPriv) = "internet" + +# +#Read-write-notify access to restricted for SNMPv3 USM users with authPriv +# +# vacmAccessStatus.$(write)."".$(securityModelUSM).$(authPriv) = 4 +# vacmAccessReadViewName.$(write)."".$(securityModelUSM).$(authPriv) = "restricted" +# vacmAccessWriteViewName.$(write)."".$(securityModelUSM).$(authPriv) = "restricted" +# vacmAccessNotifyViewName.$(write)."".$(securityModelUSM).$(authPriv) = "restricted" + +#%target +# Send notifications to target tag "test" +# tag := "test" +# snmpNotifyRowStatus.$(tag) = 4 +# snmpNotifyTag.$(tag) = $(tag) + +# tagremote := "testremote" +# snmpNotifyRowStatus.$(tagremote) = 4 +# snmpNotifyTag.$(tagremote) = $(tagremote) + +# +# Specify the target parameters for the notifications - send with the credentials +# of user "bsnmp" +# +# snmpTargetParamsRowStatus.$(tag) = 5 +# snmpTargetParamsMPModel.$(tag) = $(MPmodelSNMPv3) +# snmpTargetParamsSecurityModel.$(tag) = $(securityModelUSM) +# snmpTargetParamsSecurityName.$(tag) = $(user1) +# snmpTargetParamsSecurityLevel.$(tag) = $(authPriv) +# snmpTargetParamsRowStatus.$(tag) = 1 + +# +# Define the notifications' target address - port 162 on localhost +# +# snmpTargetAddrRowStatus.$(tag) = 5 +# snmpTargetAddrTAddress.$(tag) = 0x7f:0x0:0x0:0x1:0x0:0xa2 +# snmpTargetAddrTagList.$(tag) = "test notification" +# snmpTargetAddrParams.$(tag) = $(tag) +# snmpTargetAddrRowStatus.$(tag) = 1 + +# +# Define the notifications' target address - port 162 on 10.0.0.1 +# +# snmpTargetAddrRowStatus.$(tagremote) = 5 +# snmpTargetAddrTAddress.$(tagremote) = 0x0a:0x00:0x00:0x1:0x0:0xa2 +# snmpTargetAddrTagList.$(tagremote) = $(tagremote) +# snmpTargetAddrParams.$(tagremote) = $(tag) +# snmpTargetAddrRowStatus.$(tagremote) = 1 + +# Force a polling rate for the 64-bit interface counters in case +# the automatic computation is wrong (which may be the case if an interface +# announces the wrong bit rate via its MIB). +#%mibII +#begemotIfForcePoll = 2000 + +#%netgraph +#begemotNgControlNodeName = "snmpd" + Property changes on: head/usr.sbin/bsnmpd/bsnmpd/snmpd.config ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property