Bug 1075932

Summary: NSS_WRAPPER_HOSTS doesn't work
Product: [Fedora] Fedora Reporter: David Spurek <dspurek>
Component: nss_wrapperAssignee: Andreas Schneider <asn>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: asn, dspurek, ebenes, jhrozek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: nss_wrapper-1.0.1-3.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-25 08:14:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Spurek 2014-03-13 08:53:32 UTC
Description of problem:
NSS_WRAPPER_HOSTS doesn't work


Version-Release number of selected component (if applicable):
nss_wrapper-1.0.1-2.fc20

How reproducible:


Steps to Reproduce:
1.echo "10.3.52.5 test.mydomain.com" >> hosts
2.LD_PRELOAD=libnss_wrapper.so NSS_WRAPPER_HOSTS=hosts getent hosts test.mydomain.com
3.LD_PRELOAD=libnss_wrapper.so NSS_WRAPPER_HOSTS=hosts getent hosts 10.3.52.5

Actual results:
a)getent hosts test.mydomain.com doesn't return any result
b)getent hosts 10.3.52.5 cause Segmentation fault

Expected results:


Additional info:

Comment 1 Andreas Schneider 2014-03-13 09:37:07 UTC
Awesome, getent doesn't have a NULL check if he->he_aliases is NULL, it always dereferences it.

Fix + test:

http://git.cryptomilk.org/projects/nss_wrapper.git/log/?h=fix

I will update the package soon.

Comment 2 Fedora Update System 2014-03-14 10:30:15 UTC
nss_wrapper-1.0.1-3.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/nss_wrapper-1.0.1-3.fc20

Comment 3 David Spurek 2014-03-14 12:03:57 UTC
Thank you for update but it still doesn't work correctly with fqdn (command returns nothing).
It works correctly with ip adresses now.


My results:
echo "10.3.52.5 test.mydomain.com" >> hosts
echo "fd00::5357:5f10 test.example.com" >> hosts

# ipv4
[root@rhel7 nss_wrapper]# LD_PRELOAD=libnss_wrapper.so NSS_WRAPPER_HOSTS=hosts getent hosts test.mydomain.com
[root@rhel7 nss_wrapper]# LD_PRELOAD=libnss_wrapper.so NSS_WRAPPER_HOSTS=hosts getent hosts 10.3.52.5
10.3.52.5       test.mydomain.com

#ipv6
[root@rhel7 nss_wrapper]# LD_PRELOAD=libnss_wrapper.so NSS_WRAPPER_HOSTS=hosts getent hosts test.example.com
[root@rhel7 nss_wrapper]# LD_PRELOAD=libnss_wrapper.so NSS_WRAPPER_HOSTS=hosts getent hosts fd00::5357:5f10
fd00::5357:5f10 test.example.com

Comment 4 Fedora Update System 2014-03-15 15:19:12 UTC
Package nss_wrapper-1.0.1-3.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing nss_wrapper-1.0.1-3.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-3921/nss_wrapper-1.0.1-3.fc20
then log in and leave karma (feedback).

Comment 6 Andreas Schneider 2014-03-20 10:57:38 UTC
Please open a new bug.

Comment 7 Fedora Update System 2014-03-25 08:14:09 UTC
nss_wrapper-1.0.1-3.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.