Bug 447092 - restrict passwd database search to local files
restrict passwd database search to local files
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: rpcbind (Show other bugs)
9
All Linux
low Severity low
: ---
: ---
Assigned To: Steve Dickson
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-17 16:26 EDT by Ulrich Drepper
Modified: 2008-07-26 01:59 EDT (History)
0 users

See Also:
Fixed In Version: 0.1.4-16.fc9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-07-03 23:38:55 EDT
Type: ---
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 Ulrich Drepper 2008-05-17 16:26:14 EDT
Description of problem:
Due to an installation mistake (somehow rpm messed up) I ended up with an passwd
file which didn't have a rpc entry.  This meant that during startup the
getpwnam() call to determine the details for user rpc caused the normal process
for passwd lookups to be followed.  For me this meant after looking at
/etc/passwd the lookup tried to use NIS.  This of course deadlocked since as
part of the NIS lookup rpcbind has to be contacted.

The workaround is quite simple: use __nss_configure_lookup() to restrict the lookup.

Version-Release number of selected component (if applicable):
rpcbind-0.1.4-14.fc9

How reproducible:
always if you prepare

Steps to Reproduce:
1.remove rpc user from /etc/passwd
2.use "passwd: files nis" in /etc/nsswitch.conf
3.
  
Actual results:
hang

Expected results:
no hang, getpwnam() should return failure

Additional info:
Add a call like this at the beginning of the program:

  __nss_configure_lookup("passwd", "files");
Comment 1 Ulrich Drepper 2008-05-21 22:10:42 EDT
Also add

__nss_configure_lookup("services", "files);

On another system I had rpcbind hang in a lookup of a service.
Comment 2 Steve Dickson 2008-06-27 13:53:38 EDT
Fixed in rpcbind-0.1.4-15.fc9
Comment 3 Fedora Update System 2008-06-27 15:06:03 EDT
rpcbind-0.1.4-16.fc9 has been submitted as an update for Fedora 9
Comment 4 Fedora Update System 2008-06-28 18:14:37 EDT
rpcbind-0.1.4-16.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update rpcbind'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-5781
Comment 5 Fedora Update System 2008-07-03 23:38:50 EDT
rpcbind-0.1.4-16.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 6 Fedora Update System 2008-07-26 01:59:57 EDT
rpcbind-0.1.4-16.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

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