-Coders,

has anyone recently tried embedded perl in the agent with 5.1.2?
Even with a simple

        perl do "/path/to/perl_module.pl";

(i.e. with the example "hello world" script) in snmpd.conf, I get
a *weird* line in the log ("snmpd -Dperl"):

perl: initializing perl (/path/to/net-snmp-5.1.2/share/snmp/snmp_perl.pl)
starting perl_module.pl
perl_module.pl loaded ok
registering at netSnmp.999
: No such file or directory             <--- !!
NET-SNMP version 5.1.2

The ": No such file or directory" line actually contains binary data
before the column and the agent really tries to open a file with a
"random" name:

- --- strace snippet ---
8135 open("/usr/lib/perl5/site_perl/5.8.1/i586-linux-thread-multi/auto/NetSNMP/agent/agent.so", O_RDONLY) = 10
8135 read(10, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 \37\0\000"..., 512) = 512
8135 fstat64(10, {st_mode=S_IFREG|0555, st_size=51506, ...}) = 0 8135 old_mmap(NULL, 47340, PROT_READ|PROT_EXEC, MAP_PRIVATE, 10, 0) = 0x4062300
0 8135 old_mmap(0x4062e000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 10
, 0xa000) = 0x4062e000 8135 close(10) = 0
8135 read(9, "", 4096) = 0 8135 close(9) = 0
8135 read(8, "", 4096) = 0 8135 close(8) = 0
8135 munmap(0x40196000, 4096) = 0 8135 stat64("^[^H\'", 0xbfffe450) = -1 ENOENT (No such file or directory
) 8135 fstat64(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
8135 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40196000
8135 write(3, "\33\10\': No such file or directory\n", 31) = 31
- --- snap ---


Can anyone reproduce this?


+Thomas

--
Thomas Anders (thomas.anders at blue-cable.de)


------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ Net-snmp-coders mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to