]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
su: reset RLIMIT_AS too
authorKarel Zak <kzak@redhat.com>
Thu, 14 Oct 2021 08:28:59 +0000 (10:28 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 14 Oct 2021 08:28:59 +0000 (10:28 +0200)
Fixes: https://github.com/karelzak/util-linux/issues/1465
Signed-off-by: Karel Zak <kzak@redhat.com>
login-utils/runuser.1.adoc
login-utils/su-common.c
login-utils/su.1.adoc

index f2ca6fc326ca971d5d5d4619158b84e62f848534..fdce60300e8b8425af64b34953f26fc9fec53fbb 100644 (file)
@@ -28,7 +28,7 @@ For backward compatibility, *runuser* defaults to not changing the current direc
 
 Note that *runuser* in all cases use PAM (pam_getenvlist()) to do the final environment modification. Command-line options such as *--login* and *--preserve-environment* affect the environment before it is modified by PAM.
 
-Since version 2.38 *runuser* resets process resource limits RLIMIT_NICE and RLIMIT_RTPRIO to zero.
+Since version 2.38 *runuser* resets process resource limits RLIMIT_NICE, RLIMIT_RTPRIO, RLIMIT_FSIZE, RLIMIT_AS and RLIMIT_NOFILE.
 
 == OPTIONS
 
index 02687892ce62b95d9560f9c25f9f3057ead569cd..6b7ddeca75fb9b4b00168472bb5cd4e2ef9c46f1 100644 (file)
@@ -973,6 +973,7 @@ static void sanitize_prlimits(void)
        lm.rlim_cur = RLIM_INFINITY;
        lm.rlim_max = RLIM_INFINITY;
        setrlimit(RLIMIT_FSIZE, &lm);
+       setrlimit(RLIMIT_AS, &lm);
 
        /* reset soft limit only */
        getrlimit(RLIMIT_NOFILE, &lm);
index 9c9f772715162f269fcfeca7db227036b022f20f..b06adf948c0c639bbcf3a0a7fc8863a0096c1a84 100644 (file)
@@ -29,7 +29,7 @@ This version of *su* uses PAM for authentication, account and session management
 
 Note that *su* in all cases uses PAM (*pam_getenvlist*(3)) to do the final environment modification. Command-line options such as *--login* and *--preserve-environment* affect the environment before it is modified by PAM.
 
-Since version 2.38 *su* resets process resource limits RLIMIT_NICE, RLIMIT_RTPRIO, RLIMIT_FSIZE and RLIMIT_NOFILE.
+Since version 2.38 *su* resets process resource limits RLIMIT_NICE, RLIMIT_RTPRIO, RLIMIT_FSIZE, RLIMIT_AS and RLIMIT_NOFILE.
 
 == OPTIONS