void-linux / void-packages

The Void source packages collection
https://voidlinux.org
Other
2.47k stars 2.09k forks source link

Lightdm Ignores Limit Values #40305

Open BlindRepublic opened 1 year ago

BlindRepublic commented 1 year ago

Is this a new report?

Yes

System Info

Void 5.19.17_1 x86_64 GenuineIntel uptodate FFFFF

Package(s) Affected

pam-1.5.2_2 lightdm-1.32.0_2

Does a report exist for this bug with the project's home (upstream) and/or another distro?

No response

Expected behaviour

After setting up Lightdm and modifying /etc/security/limits.conf and restarting the system, the output of ulimit -Hn should be the same as that defined in the configuration file.

For example, mine has the following line for playing games with ESync:

elliot hard nofile 524288

So the output of ulimit -Hn would be: 524288

Actual behaviour

No matter what is written in /etc/security/limits.conf, the output of ulimit -Hn is just the default of 4096. According to this issue in 2020, this can be fixed by adding session required pam_limits.so to /etc/pam.d/lightdm. This should be enabled by default, but the issue was automatically closed due to inactivity.

Steps to reproduce

  1. Install and configure Lightdm
  2. Set limits in /etc/security/limits.conf
  3. Restart system
  4. Log in via Lightdm
  5. Run ulimit -Hn
bsduck commented 1 year ago

I can confirm that this problem which I reported in 2020 is still present.

This is really easy to fix, and should preferably be done upstream because /etc/pam.d/lightdm is provided by LightDM and I guess other non-systemd Linux distributions are similarly affected (I'll try on Alpine to compare).