Assume RLIMIT_CPU 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:
parent
7a4906fc75
commit
891d8dbedd
@ -318,13 +318,11 @@ static int do_user_limits (const char *buf, const char *name)
|
||||
retval |= setrlimit_value (RLIMIT_STACK, pp, 1024);
|
||||
break;
|
||||
#endif
|
||||
#ifdef RLIMIT_CPU
|
||||
case 't':
|
||||
case 'T':
|
||||
/* RLIMIT_CPU - max CPU time (MIN) */
|
||||
retval |= setrlimit_value (RLIMIT_CPU, pp, 60);
|
||||
break;
|
||||
#endif
|
||||
#ifdef RLIMIT_NPROC
|
||||
case 'u':
|
||||
case 'U':
|
||||
|
@ -34,9 +34,7 @@ void pwd_init (void)
|
||||
rlim.rlim_cur = rlim.rlim_max = RLIM_INFINITY;
|
||||
setrlimit (RLIMIT_AS, &rlim);
|
||||
|
||||
#ifdef RLIMIT_CPU
|
||||
setrlimit (RLIMIT_CPU, &rlim);
|
||||
#endif
|
||||
#ifdef RLIMIT_DATA
|
||||
setrlimit (RLIMIT_DATA, &rlim);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user