-1 not a valid limit for nofile in limits.conf

Bug #613246 reported by Michael Schurter
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
pam (Ubuntu)
Triaged
Low
Unassigned
Declined for Maverick by Steve Langasek

Bug Description

The LIMITS.CONF(5) manual states:

  All items support the values -1, unlimited or infinity indicating no limit, except for priority and nice.

However, this line in limits.conf appears to have no affect:

  * - nofile -1

Whereas this line works as expected (sets ulimit -n to 100000):

  * - nofile 100000

Turning on debugging for pam_limits.so doesn't give any more indication that -1 is invalid for nofile:

  pam_limits(login:session): process_limit: processing - nofile -1 for DEFAULT

The same line is logged for valid limits:

  pam_limits(login:session): process_limit: processing - nofile 100000 for DEFAULT

The LIMITS.CONF(5) man page does stipulate:

  If a hard limit or soft limit of a resource is set to a valid value, but outside of the supported range of the local system, the system may reject the new limit or unexpected behavior may occur.

So it seems having pam_limits not apply isn't entirely undocumented, however it'd be nice if nofile & -1 were explicitly mentioned.

Steve Langasek (vorlon)
Changed in pam (Ubuntu):
status: New → Triaged
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.