Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 76104 - portmap hangs due to non-existent default user
Summary: portmap hangs due to non-existent default user
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Network Filesystems
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-29 19:03 UTC by Michael Wardle
Modified: 2004-12-30 16:50 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Wardle 2004-12-29 19:03:46 UTC
My system was hanging for over one minute at boot time when attempting to start services such as nfsmount or ypbind.

I discovered that portmap was hanging when it was started as it attempts to invoke itself as user "rpc", which, on my system, in turn was attempting to look up the user "rpc" in the "passwd" NIS map, as my system was configured to resolve users first from the local passwd database then the NIS passwd database using "passwd: files nis" in /etc/nsswitch.conf.  Clearly, NIS lookups would not be working at this time, as the portmapper had not yet started!

The portmap daemon, /usr/sbin/portmap, should be configured to run as a user that exists in a standard installation of Gentoo Linux such as bin or daemon (option 1) or the user "rpc" should be created by default in a standard installation of Gentoo Linux (option 2).

Reproducible: Always
Steps to Reproduce:
Comment 1 SpanKY gentoo-dev 2004-12-30 12:18:49 UTC
the portmap ebuild adds the rpc user
Comment 2 Michael Wardle 2004-12-30 15:23:56 UTC
Ironically it's applying Red Hat's rpc_user patch that inadvertently causes this nasty behavior in the first place!

I currently have portmap-5b-r8 yet I had to manually add the rpc user.  My system started out at Gentoo 2004.0 or 2004.1.  Why would I not have the rpc user if my currently installed version should create the rpc user?  Does the pkg_setup routine only get called on the first installation of a package?
Comment 3 SpanKY gentoo-dev 2004-12-30 16:17:34 UTC
yes

you're also running an outdated portmap
Comment 4 Michael Wardle 2004-12-30 16:31:34 UTC
I've just sync'd with 2004.3 and am performing an update world; -r9 is coming soon. :-)

If upgrading the package is insufficient to create the required user, then lots of other people are going to be bitten by the same bug. :-(

Is it possible to make this an action on every install (including upgrades)?
Comment 5 SpanKY gentoo-dev 2004-12-30 16:40:15 UTC
i interpreted your question wrong

pkg_setup is run everytime that ebuild is emerged
Comment 6 Michael Wardle 2004-12-30 16:50:04 UTC
In this case, it's a mystery why the "rpc" user wasn't created when I upgraded to -r8 some months ago.  Perhaps enewuser has only been recently made available and I had an older version of portage (or its libraries).

I notice a version of enewuser in eclass/eutils.eclass you wrote (found by Googling), but I'm not too sure how this gets sucked into portage and thus the ebuilds.