diff options
author | brian <brian@FreeBSD.org> | 1999-03-09 22:04:44 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1999-03-09 22:04:44 +0000 |
commit | a9dd71bbfcf9fd163d84f827d57d24fa9edcda6a (patch) | |
tree | 150e5e36f85f0d26955d41c1ce344898ffff0b99 /libexec/getty | |
parent | 52c6e124b0c681782fc723ef5d34ca87d08256bc (diff) | |
download | FreeBSD-src-a9dd71bbfcf9fd163d84f827d57d24fa9edcda6a.zip FreeBSD-src-a9dd71bbfcf9fd163d84f827d57d24fa9edcda6a.tar.gz |
Set the CPU resource limit back to infinity before exec()ing PP.
PR: 10399
Diffstat (limited to 'libexec/getty')
-rw-r--r-- | libexec/getty/main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libexec/getty/main.c b/libexec/getty/main.c index 6d8f748..55fa1b6 100644 --- a/libexec/getty/main.c +++ b/libexec/getty/main.c @@ -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); |