mirror of
https://github.com/freebsd/freebsd-src
synced 2024-11-05 18:22:52 +00:00
Set the CPU resource limit back to infinity before exec()ing PP.
PR: 10399
This commit is contained in:
parent
9509885927
commit
23bc058463
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=44615
1 changed files with 4 additions and 1 deletions
|
@ -42,7 +42,7 @@ static const char copyright[] =
|
|||
static char sccsid[] = "@(#)from: main.c 8.1 (Berkeley) 6/20/93";
|
||||
#endif
|
||||
static const char rcsid[] =
|
||||
"$Id: main.c,v 1.22 1997/11/21 07:43:50 charnier Exp $";
|
||||
"$Id: main.c,v 1.23 1998/10/08 23:14:02 jkh Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -351,6 +351,9 @@ main(argc, argv)
|
|||
if ((rval = getname()) == 2) {
|
||||
oflush();
|
||||
alarm(0);
|
||||
limit.rlim_max = RLIM_INFINITY;
|
||||
limit.rlim_cur = RLIM_INFINITY;
|
||||
(void)setrlimit(RLIMIT_CPU, &limit);
|
||||
execle(PP, "ppplogin", ttyn, (char *) 0, env);
|
||||
syslog(LOG_ERR, "%s: %m", PP);
|
||||
exit(1);
|
||||
|
|
Loading…
Reference in a new issue