From: <no...@so...> - 2002-10-25 03:46:19
|
Bugs item #628424, was opened at 2002-10-25 03:46 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=628424&group_id=12694 Category: library Group: None Status: Open Resolution: None Priority: 5 Submitted By: Stefan Radman (sradman) Assigned to: Nobody/Anonymous (nobody) Summary: init_mib ignores mibdirs from snmp.conf Initial Comment: when defining "mibdirs" in snmp.conf et al, they are ignored. Instead, the compiled-in default mib search path is used. The bug is in mib.c:init_mib() and mib.c:netsnmp_read_mib_directory(). netsnmp_get_mib_directory ignores the confmibdir variable set by the handle_mibdirs_conf config handler when setting up It seems odd to me that initialization of the datastore is initiated by netsnmp_get_mib. I would rather do that in init_mib() As usual: patch attached ;-) Stefan ========================== $ snmptranslate -Dall .1 2>&1 | more ... starts off as expected ... trace: read_config(): read_config.c, 616 read_config: /home/ics/radman/.snmp/snmp.conf:5 0 examining: mibdirs +/ctbto/idc/cicn/snmp/mibs trace: run_config_handler(): read_config.c, 347 read_config: Found a parser. Calling it: mibdirs / +/ctbto/idc/cicn/snmp/mibs trace: handle_mibdirs_conf(): mib.c, 1998 read_config:initmib: using mibdirs: +/ctbto/idc/cicn/snmp/mibs ... but later ... callback: END calling callbacks for maj=0 min=3 (2 called) trace: netsnmp_get_mib_directory(): mib.c, 2289 trace: netsnmp_get_mib_directory(): mib.c, 2292 get_mib_directory: no mib directories set ... oops - that's true because nobody called netsnmp_set_mib_directory(confmibdir) before calling netsnmp_get_mib_directory !!! ... trace: netsnmp_get_mib_directory(): mib.c, 2297 get_mib_directory: no mib directories set by environment trace: netsnmp_set_mib_directory(): mib.c, 2242 trace: netsnmp_ds_set_string(): default_store.c, 145 netsnmp_ds_set_string: Setting 0:11 = "$HOME/.snmp/mibs:/opt/OSS/share/snmp/mibs" trace: netsnmp_get_mib_directory(): mib.c, 2310 get_mib_directory: mib directories set '$HOME/.snmp/mibs:/opt/OSS/share/snmp/mib s' trace: netsnmp_fixup_mib_directory(): mib.c, 2327 trace: netsnmp_fixup_mib_directory(): mib.c, 2329 fixup_mib_directory: mib directories '$HOME/.snmp/mibs:/opt/OSS/share/sn mp/mibs' trace: netsnmp_set_mib_directory(): mib.c, 2242 trace: netsnmp_ds_set_string(): default_store.c, 145 netsnmp_ds_set_string: Setting 0:11 = "/home/ics/radman/.snmp/mibs:/opt/OSS/share/ snmp/mibs" trace: netsnmp_get_mib_directory(): mib.c, 2289 trace: netsnmp_get_mib_directory(): mib.c, 2310 get_mib_directory: mib directories set '/home/ics/radman/.snmp/mibs:/opt/OSS/share /snmp/mibs' trace: init_mib(): mib.c, 2372 init_mib: Seen MIBDIRS: Looking in '/home/ics/radman/.snmp/mibs:/opt/OSS/share/ snmp/mibs' for mib dirs ... trace: add_mibdir(): parse.c, 4525 parse-mibs: Scanning directory /home/ics/radman/.snmp/mibs ... and doesn't find my mibs :-( ... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=628424&group_id=12694 |