[Pkg-shadow-devel] [PATCH] Add enforce limits to su.

Nicolas François nicolas.francois at centraliens.net
Fri Oct 12 21:36:39 UTC 2007

Hi Justin,

On Fri, Oct 12, 2007 at 03:11:59PM -0400, jsbronder at gmail.com wrote:
> First, let me extend my thanks to all of you for taking over upstream
> development.  Now I actually know who to email!
> Attached is a patch that adds a new command line option to su.  From the man
> page:
> -L, --enforce-limits
>   Enforce the limits in /etc/limits.
>   If PAM was enabled at compile time, this option has no effect.
> Currently when su'ing from root to another user, setup_limits() is never
> called.  Typically this is probably not a huge problem, but when you're
> su'ing to a user that has an increased real-time priority, it's nice to not
> have to call ulimit first.

Thanks for the patch.

Would it be OK to just enforce the limits from /etc/limits when the -, -l,
or --login options are specified and to keep the current behavior when no
options or when the -p, -m, or --preserve-environment.

PS: I'm not forgetting http://bugs.debian.org/442334

Kind Regards,

More information about the Pkg-shadow-devel mailing list