I wanted to impose limits onto my users using pam_limits module, so I put the following into /etc/security/limits.conf
* hard nproc 20
root hard nproc 240
someuser hard nproc 240
I want someuser to run max. 240 processes or threads. I use GDM as a login manager, which runs as root. I had to set the same limit on root, because otherwise root would run with nproc limited to 20, which would get inherited by someuser's session.
This configuration worked until I updated to baselayout-2 and openrc. After the upgrade the GNOME session would fail to start because of nproc limit set to 20. I found a workaround after some investigation and much help from http://blog.flameeyes.eu/2010/10/02/service-limits
Things started working again after having the following line added to limits.conf
nobody hard nproc 240
I believe start-stop-daemon should not pass the nobody user to PAM when the user is not set using the --user option. Instead it should use the user, that the program runs as (that would be root in this case).
(In reply to comment #0)
> I believe start-stop-daemon should not pass the nobody user to PAM when the
> user is not set using the --user option. Instead it should use the user, that
> the program runs as (that would be root in this case).
Which init.d script would that be?
(In reply to comment #1)
> Which init.d script would that be?
Sorry, I forgot to state that clearly. That's /etc/init.d/xdm with start-stop-daemon invoked from /etc/X11/startDM.sh
This bug is pretty ancient at this point, and I'm not sure I understand it.
If someone is still interested, please reopen.