On Wed, 2011-06-15 at 15:33 +0200, Thorsten Kukuk wrote:
On Thu, Mar 31, Kees Cook wrote:
> Since the kernel sets a number of dynamic rlimits based on the system
> properties (e.g. physical memory for nproc), these rlimits should be
> respected by PAM. Parse /proc/1/limits for the kernel-defined rlimits.
Ok, attached is a patch, where I fixed the syntax errors and I
added an "init_all" option. Means by default no behavior changes
against the current version. If admin specifies "init_all", the missing
limits will be set from the one of process with PId 1.
I'm just slightly opposed to the 'init_all' option name. Perhaps
something like 'reset_all' or 'reset_from_init' would better describe
the functionality?
Also the new functions should be #ifdef __linux__.
--
Tomas Mraz
No matter how far down the wrong road you've gone, turn back.
Turkish proverb