1

In a linux system that is using the pam_limits module, but has nothing configured in /etc/security/limits.conf (or /etc/security/limits.d/*) how does pam_limits decided on what limits to implement?

1 Answers1

1

In linux it is set from PID=1 limits, by reading /proc/1/limits.

The pam_limits.c source (available at https://git.fedorahosted.org/cgit/linux-pam.git/tree/modules/pam_limits/pam_limits.c) shows in the init_limits() that for linux the parse_kernel_limits function is called, which opens /proc/1/limits and parses it for the the limits.

So the question becomes, how does PID=1 get it's limits. I haven't worked out the answer to that bit yet.