[sudo-users] stack limit problem
Armin Kunaschik
megabreit at googlemail.com
Tue Jun 7 13:26:27 MDT 2016
Great! Thanks!
On Jun 7, 2016 21:06, "Todd C. Miller" <Todd.Miller at courtesan.com> wrote:
> It looks like this got broken when sudo switched to using 64-bit
> resource limits. I've just committed that following patch which
> will be in sudo 1.8.17.
>
> - todd
>
> diff -r 4ab85a46cf63 lib/util/aix.c
> --- a/lib/util/aix.c Mon Jun 06 10:07:58 2016 -0600
> +++ b/lib/util/aix.c Tue Jun 07 13:03:36 2016 -0600
> @@ -107,15 +107,21 @@
> continue;
> rlim.rlim_cur = val == -1 ? RLIM64_INFINITY : (rlim64_t)val *
> aix_limits[n].factor;
>
> - /* Set hard limit per AIX /etc/security/limits documentation.
> */
> + /* Set hard limit as per table in /etc/security/limits. */
> switch (aix_limits[n].resource) {
> case RLIMIT_CPU:
> case RLIMIT_FSIZE:
> rlim.rlim_max = rlim.rlim_cur;
> break;
> case RLIMIT_STACK:
> +#ifdef HAVE_SETRLIMIT64
> + rlim.rlim_max = 8388608ULL * aix_limits[n].factor;
> +#else
> rlim.rlim_max = RLIM_SAVED_MAX;
> +#endif
> break;
> + case RLIMIT_NOFILE:
> + rlim.rlim_max = 8196 * aix_limits[n].factor;
> default:
> rlim.rlim_max = RLIM64_INFINITY;
> break;
>
More information about the sudo-users
mailing list