Assume RLIMIT_DATA is defined

It is required by POSIX.1-2001.

Cc: Christian Göttsche <cgzones@googlemail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
Alejandro Colomar 2022-12-02 22:53:45 +01:00 committed by Serge Hallyn
parent 891d8dbedd
commit 91adf3b8bb
2 changed files with 0 additions and 4 deletions

View File

@ -249,13 +249,11 @@ static int do_user_limits (const char *buf, const char *name)
/* RLIMIT_CORE - max core file size (KB) */ /* RLIMIT_CORE - max core file size (KB) */
retval |= setrlimit_value (RLIMIT_CORE, pp, 1024); retval |= setrlimit_value (RLIMIT_CORE, pp, 1024);
break; break;
#ifdef RLIMIT_DATA
case 'd': case 'd':
case 'D': case 'D':
/* RLIMIT_DATA - max data size (KB) */ /* RLIMIT_DATA - max data size (KB) */
retval |= setrlimit_value (RLIMIT_DATA, pp, 1024); retval |= setrlimit_value (RLIMIT_DATA, pp, 1024);
break; break;
#endif
#ifdef RLIMIT_FSIZE #ifdef RLIMIT_FSIZE
case 'f': case 'f':
case 'F': case 'F':

View File

@ -35,9 +35,7 @@ void pwd_init (void)
setrlimit (RLIMIT_AS, &rlim); setrlimit (RLIMIT_AS, &rlim);
setrlimit (RLIMIT_CPU, &rlim); setrlimit (RLIMIT_CPU, &rlim);
#ifdef RLIMIT_DATA
setrlimit (RLIMIT_DATA, &rlim); setrlimit (RLIMIT_DATA, &rlim);
#endif
#ifdef RLIMIT_FSIZE #ifdef RLIMIT_FSIZE
setrlimit (RLIMIT_FSIZE, &rlim); setrlimit (RLIMIT_FSIZE, &rlim);
#endif #endif