]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
Assume RLIMIT_STACK is defined
authorAlejandro Colomar <alx@kernel.org>
Fri, 2 Dec 2022 21:57:47 +0000 (22:57 +0100)
committerSerge Hallyn <serge@hallyn.com>
Thu, 15 Dec 2022 22:22:05 +0000 (16:22 -0600)
It is required by POSIX.1-2001.

Cc: Christian Göttsche <cgzones@googlemail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
libmisc/limits.c
libmisc/pwd_init.c

index 81b56b645825dbb4871a88565cb85f5ae1826944..99518679e9d4cdd121befe65a3864adcdf0f4226 100644 (file)
@@ -305,13 +305,11 @@ static int do_user_limits (const char *buf, const char *name)
                        retval |= setrlimit_value (RLIMIT_RSS, pp, 1024);
                        break;
 #endif
-#ifdef RLIMIT_STACK
                case 's':
                case 'S':
                        /* RLIMIT_STACK - max stack size (KB) */
                        retval |= setrlimit_value (RLIMIT_STACK, pp, 1024);
                        break;
-#endif
                case 't':
                case 'T':
                        /* RLIMIT_CPU - max CPU time (MIN) */
index c7cffba346f9566eff4255c4a30b6f9d61726dbf..34940713c2693c9bb105d27191e8d34a6335b8ad 100644 (file)
@@ -41,9 +41,7 @@ void pwd_init (void)
 #ifdef RLIMIT_RSS
        setrlimit (RLIMIT_RSS, &rlim);
 #endif
-#ifdef RLIMIT_STACK
        setrlimit (RLIMIT_STACK, &rlim);
-#endif
 
        signal (SIGALRM, SIG_IGN);
        signal (SIGHUP, SIG_IGN);