Bug 1000780 - WINS name lookup fails from inside a Net-SNMP application
Summary: WINS name lookup fails from inside a Net-SNMP application
Keywords:
Status: CLOSED DUPLICATE of bug 913614
Alias: None
Product: Fedora
Classification: Fedora
Component: samba
Version: 19
Hardware: i686
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Guenther Deschner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-25 07:43 UTC by Bart Van Assche
Modified: 2013-09-17 09:39 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-09-17 09:39:37 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Bart Van Assche 2013-08-25 07:43:34 UTC
Description of problem:

A WINS name lookup fails if libnetsnmp.so is loaded - it causes an application exit with the error message "ERROR: memdup failed".

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

samba-winbind-clients-4.0.8-1.fc19.i686
Any Net-SNMP version.

How reproducible:

100%

Steps to Reproduce:
1. Edit /etc/nsswitch.conf. Change the "hosts: files dns" line into "hosts: files wins dns"
2. Download the Net-SNMP source code, build it and run its regression tests:
git clone git://git.code.sf.net/p/net-snmp/code net-snmp &&
cd net-snmp &&
./configure --with-defaults &&
make &&
rm -rf /tmp/snmp-test-* &&
make test

Actual results:

We failed these 1 tests:
  com2sec directive ( /home/bart/software/net-snmp/testing/fulltests/default/T070com2sec_simple )

cat /tmp/snmp-test-T070com2sec_simple-*/snmpd.log.stdout 
ERROR: memdup failed

Expected results:

Library functions to report memory allocation failures to the caller instead of calling exit(1).
All Net-SNMP regression tests pass.

Note: the root cause of this is probably that the libnss_wins function load_interfaces() calls memdup() and that the loader redirects this call to the Net-SNMP definition of memdup() instead of the libnss_wins version of memdup().

Comment 1 Bart Van Assche 2013-09-16 18:04:01 UTC
Probably the same issue as https://bugzilla.redhat.com/show_bug.cgi?id=913614.

Comment 2 Bart Van Assche 2013-09-16 18:05:18 UTC
Candidate fix: http://sourceforge.net/p/net-snmp/mailman/message/31405941/.

Comment 3 Guenther Deschner 2013-09-17 09:39:37 UTC
You're right, it's a duplicate.

*** This bug has been marked as a duplicate of bug 913614 ***


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