Bug 1000780 - WINS name lookup fails from inside a Net-SNMP application
WINS name lookup fails from inside a Net-SNMP application
Status: CLOSED DUPLICATE of bug 913614
Product: Fedora
Classification: Fedora
Component: samba (Show other bugs)
19
i686 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Guenther Deschner
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-25 03:43 EDT by Bart Van Assche
Modified: 2013-09-17 05:39 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-17 05:39:37 EDT
Type: Bug
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 Bart Van Assche 2013-08-25 03:43:34 EDT
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 14:04:01 EDT
Probably the same issue as https://bugzilla.redhat.com/show_bug.cgi?id=913614.
Comment 2 Bart Van Assche 2013-09-16 14:05:18 EDT
Candidate fix: http://sourceforge.net/p/net-snmp/mailman/message/31405941/.
Comment 3 Guenther Deschner 2013-09-17 05:39:37 EDT
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.