Bug 244784 - snmptrap does not search for mibs in default mib directory
snmptrap does not search for mibs in default mib directory
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: net-snmp (Show other bugs)
rawhide
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jan Safranek
:
Depends On: 199165
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-19 02:14 EDT by Jan Safranek
Modified: 2007-11-30 17:12 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-06-28 06:25:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jan Safranek 2007-06-19 02:14:40 EDT
+++ This bug was initially created as a clone of Bug #199165 +++

Description of problem:

  We publish our own MIB, in a separate directory.  According to snmpcmd(1), 
  I should be able to use this command to use our MIB, in addition to the
  default ones:

    env - snmptrap -M +/our/mib/dir ...

  However, the errors I get make it clear the default MIBs are not being read:

    Cannot find module (IP-MIB): At line 0 in (none)
    Cannot find module (IF-MIB): At line 0 in (none)
    Cannot find module (TCP-MIB): At line 0 in (none)
    Cannot find module (UDP-MIB): At line 0 in (none)
    Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none)

Version-Release number of selected component (if applicable):

  net-snmp-utils-5.1.2-11.EL4.6.i386.rpm


How reproducible:


Steps to Reproduce:
1. (see below)
2.
3.
  
Actual results:

    env - snmptrap -M +/our/mib/dir ...

  However, the errors I get make it clear the default MIBs are not being read:

    Cannot find module (IP-MIB): At line 0 in (none)
    Cannot find module (IF-MIB): At line 0 in (none)
    Cannot find module (TCP-MIB): At line 0 in (none)
    Cannot find module (UDP-MIB): At line 0 in (none)
    Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none)
    ...

Expected results:

  (no errors.)


Additional info:

   The manpage says, in part:

    -M DIRLIST
              Specifies a colon separated list of directories to  search  for
              MIBs.  This overrides the environment variable MIBDIRS.

              ...

              If  DIRLIST  has  a leading ’+’, then the given directories are
              added to the list of MIB directories.

              ...

              If no value is specified for the environment variable  MIBDIRS,
              then  the  command  will  still search a default mib directory   
                                     
              ....

              The  default  directory  is /usr/share/snmp/mibs.

  Using strace shows that the default directory is never looked at.

  Augmenting my invokation thusly gives me the result I want:

    env - snmptrap -M /usr/share/snmp/mibs:/our/mib/dir ...
Comment 1 Jan Safranek 2007-06-28 06:25:54 EDT
Fixed in net-snmp-5.4-15.fc8

Note You need to log in before you can comment on or make changes to this bug.