summaryrefslogtreecommitdiff
path: root/daemons
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-07-01 21:55:50 +0000
committerMiles Bader <miles@gnu.org>1996-07-01 21:55:50 +0000
commitf361e55af15c4ad4d89d910ab4964aae60cb827c (patch)
tree73fe7afd47c77a68e7cd167cfe1fd90c8364739d /daemons
parentb4f5cdf8a2da9adc91750f4f858a809076bf72c9 (diff)
(main):
Don't time out hardwired lines. Print an error if exec fails.
Diffstat (limited to 'daemons')
-rw-r--r--daemons/getty.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/daemons/getty.c b/daemons/getty.c
index a7f4630d..0d545396 100644
--- a/daemons/getty.c
+++ b/daemons/getty.c
@@ -24,6 +24,8 @@
#include <stdio.h>
#include <fcntl.h>
#include <sys/stat.h>
+#include <errno.h>
+#include <error.h>
/* XXX */
extern int login_tty (int);
@@ -75,7 +77,13 @@ main (int argc, char **argv)
login_tty (tty);
asprintf (&arg, "TERM=%s", tt ? tt->ty_type : "unknown");
- execl (_PATH_LOGIN, "login", "-e", arg, 0);
-}
-
+ if (strcmp (tt->ty_type, "dialup") == 0)
+ /* Dialup lines time out (which is login's default). */
+ execl (_PATH_LOGIN, "login", "-e", arg, 0);
+ else
+ /* Hardwired lines don't. */
+ execl (_PATH_LOGIN, "login", "-e", arg, "-aNOAUTH_TIMEOUT", 0);
+
+ error (99, errno, "execl");
+}