summaryrefslogtreecommitdiff
path: root/daemons
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1998-07-20 05:33:29 +0000
committerRoland McGrath <roland@gnu.org>1998-07-20 05:33:29 +0000
commit96ede9d1fff65478da2dca1f7580f4a86fd1eaa8 (patch)
tree797e26eab0e15b94850e41a73143da5275a8c8c0 /daemons
parenta8f077a4ab1ec978bd5e4ba61fad6859c2c5a207 (diff)
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
* getty.c: Include <string.h> for basename decl.
Diffstat (limited to 'daemons')
-rw-r--r--daemons/getty.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/daemons/getty.c b/daemons/getty.c
index 013c3e3a..ce073d5e 100644
--- a/daemons/getty.c
+++ b/daemons/getty.c
@@ -1,5 +1,5 @@
/* Stubby version of getty for Hurd
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1998 Free Software Foundation, Inc.
Written by Michael I. Bushnell, p/BSG.
This file is part of the GNU Hurd.
@@ -28,6 +28,7 @@
#include <error.h>
#include <sys/utsname.h>
#include <stdlib.h>
+#include <string.h>
/* XXX */
extern int login_tty (int);
@@ -62,7 +63,7 @@ main (int argc, char **argv)
char *arg;
openlog ("getty", LOG_ODELAY|LOG_CONS|LOG_PID, LOG_AUTH);
-
+
/* Nothing to do .... */
if (argc != 3)
{
@@ -76,12 +77,12 @@ main (int argc, char **argv)
tt = getttynam (argv[2]);
asprintf (&ttyname, "%s/%s", _PATH_DEV, argv[2]);
-
+
chown (ttyname, 0, 0);
chmod (ttyname, 0600);
revoke (ttyname);
sleep (2); /* leave DTR down for a bit */
-
+
do
{
tty = open (ttyname, O_RDWR);
@@ -97,7 +98,7 @@ main (int argc, char **argv)
print_banner (tty, ttyname);
login_tty (tty);
-
+
asprintf (&arg, "TERM=%s", tt ? tt->ty_type : "unknown");
if (tt && strcmp (tt->ty_type, "dialup") == 0)