From: <no...@so...> - 2002-02-12 15:16:28
|
Bugs item #516389, was opened at 2002-02-12 03:41 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=112694&aid=516389&group_id=12694 Category: agent Group: None Status: Open Resolution: Fixed Priority: 2 Submitted By: Nobody/Anonymous (nobody) Assigned to: John Naylon (jbpn) Summary: ucd-snmp 4.2.3 libwrap support broken Initial Comment: grabbed ucd-snmp 4.2.3, configured and compiled on Linux with --libwrap (amongst other things) <snip> checking for tcpd.h... yes checking for TCP wrappers library -lwrap... no checking for yp_get_default_domain... no checking for yp_get_default_domain in -lnsl... yes checking for TCP wrappers library -lwrap linked with -lnsl... yes but after installing the binary TCP wrapper access does not seem to be working; I've disabled all access by a particular host, tried telnet'ing from that host to my server and got a 'connection refused' attempt. Then did a snmpwalk <host> public system and it retrieved the info just fine. ---------------------------------------------------------------------- >Comment By: John Naylon (jbpn) Date: 2002-02-12 07:16 Message: Logged In: YES user_id=93926 Duh, that serves me right for not testing before committing! Anyway, this should be fixed now. I've attached the diffs relative to 4.2.3 as before. John ---------------------------------------------------------------------- Comment By: Jan Just Keijser (janjust) Date: 2002-02-12 06:10 Message: Logged In: YES user_id=456204 Almost :-) I did a rm -rf ucd-snmp-4.2.3 tar xzvf ~/ucd-snmp-4.2.3.tar.gz cd ucd-snmp-4.2.3 patch -p1 < ~/conf.patch ./configure --disable-privacy --enable-static --enable-shared --with-sys-location="Unknown" --with-logfile="/var/log/snmpd.log" --with-persistent-directory="/var/ucd-snmp" --with-mib-modules="host" --with-libwrap --sysconfdir=/etc --without-openssl --with-sys-contact="root@localhost" make <snip> /bin/sh ../libtool --mode=link gcc -g -O2 -Dlinux -o snmpd snmpd.lo libucdagent.la libucdmibs.la -lwrap ../snmplib/libsnmp.la -ldl -ldb1 -lz -lpopt -lm -lelf gcc -g -O2 -Dlinux -o .libs/snmpd snmpd.o ./.libs/libucdagent.so ./.libs/libucdmibs.so -lwrap ../snmplib/.libs/libsnmp.so -ldl -ldb1 -lz /usr/lib/libpopt.so -lm -lelf -Wl,--rpath -Wl,/usr/local/lib /usr/bin/../lib/libwrap.a(hosts_access.o): In function `host_match': hosts_access.o(.text+0x400): undefined reference to `yp_get_default_domain' collect2: ld returned 1 exit status make[1]: *** [snmpd] Error 1 So the agent (snmpd) fails to link. This is a stupid RH 6.1 anomaly: you need to link against '-lwrap -lnsl' as is stated in the configure script. ---------------------------------------------------------------------- Comment By: John Naylon (jbpn) Date: 2002-02-12 05:36 Message: Logged In: YES user_id=93926 Ah, I see the problem. Thank you for spotting this bug; I have committed a fix to the CVS repository which will be in version 4.2.4 (due for release within the next week or so). I've attached the diffs between 4.2.3 and the now-current CVS branch head (for all the autoconf-related stuff) if you want to test it out (I would be grateful). ---------------------------------------------------------------------- Comment By: Jan Just Keijser (janjust) Date: 2002-02-12 05:05 Message: Logged In: YES user_id=456204 Checked the configure script: it does not write out the appropriate #define USE_LIBWRAP 1 line to config.h. I don't know what's the best way to fix it, though. Modified config.h manually, recompiled and it is now working OK. Now for the RPM spec file :-) ---------------------------------------------------------------------- Comment By: John Naylon (jbpn) Date: 2002-02-12 04:58 Message: Logged In: YES user_id=93926 Hmm. That sounds pretty bad. If you look at the log messages from snmpd, you should see either: Connection from <ip-address> or Connection from <ip-address> REFUSED Are you seeing these? Could you give your full configuration line? Does the problem persist if you explicitly deny access to snmpd to ALL? John ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=112694&aid=516389&group_id=12694 |