diff options
author | Marco S Hyman <marc@cvs.openbsd.org> | 1998-07-28 20:18:23 +0000 |
---|---|---|
committer | Marco S Hyman <marc@cvs.openbsd.org> | 1998-07-28 20:18:23 +0000 |
commit | 8f3983656c3207371a6cada05f56ae96a68a70ac (patch) | |
tree | 135130fbc213733d15408f46d94091058f6b762a /libexec | |
parent | 01f867649ff2cbd8930666da6d2aa0c9c45d22ec (diff) |
change getent/getstr to gtgettent/gtgetstr, the names now used
in libtelnet; add prototypes for both functions to ext.h
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/telnetd/ext.h | 7 | ||||
-rw-r--r-- | libexec/telnetd/sys_term.c | 9 | ||||
-rw-r--r-- | libexec/telnetd/telnetd.c | 13 |
3 files changed, 15 insertions, 14 deletions
diff --git a/libexec/telnetd/ext.h b/libexec/telnetd/ext.h index 21a5a62f92f..43836100773 100644 --- a/libexec/telnetd/ext.h +++ b/libexec/telnetd/ext.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ext.h,v 1.7 1998/07/23 17:55:50 deraadt Exp $ */ +/* $OpenBSD: ext.h,v 1.8 1998/07/28 20:18:19 marc Exp $ */ /* $NetBSD: ext.h,v 1.6 1996/02/28 20:38:13 thorpej Exp $ */ /* @@ -148,9 +148,12 @@ extern void tty_binaryin P((int)), tty_binaryout P((int)); +extern char* + gtgetstr P((char *, char **)); + extern int end_slc P((unsigned char **)), - getent P((char *, char *)), + gtgetent P((char *, char *)), getnpty P((void)), #ifndef convex getpty P((int *)), diff --git a/libexec/telnetd/sys_term.c b/libexec/telnetd/sys_term.c index 0887e9df0a0..5f28a8b4fda 100644 --- a/libexec/telnetd/sys_term.c +++ b/libexec/telnetd/sys_term.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_term.c,v 1.16 1998/07/23 17:55:51 deraadt Exp $ */ +/* $OpenBSD: sys_term.c,v 1.17 1998/07/28 20:18:20 marc Exp $ */ /* $NetBSD: sys_term.c,v 1.9 1996/03/20 04:25:53 tls Exp $ */ /* @@ -39,7 +39,7 @@ static char sccsid[] = "@(#)sys_term.c 8.4+1 (Berkeley) 5/30/95"; static char rcsid[] = "$NetBSD: sys_term.c,v 1.8 1996/02/28 20:38:21 thorpej Exp $"; #else -static char rcsid[] = "$OpenBSD: sys_term.c,v 1.16 1998/07/23 17:55:51 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: sys_term.c,v 1.17 1998/07/28 20:18:20 marc Exp $"; #endif #endif /* not lint */ @@ -1560,7 +1560,6 @@ start_login(host, autologin, name) register char **argv; char **addarg(); extern char *getenv(); - extern char *getstr(); extern char *gettyname; #define TABBUFSIZ 512 char defent[TABBUFSIZ]; @@ -1781,10 +1780,10 @@ start_login(host, autologin, name) if (pty > 2) close(pty); #endif - if (getent(defent, gettyname) == 1) { + if (gtgetent(defent, gettyname) == 1) { char *cp = defstrs; - loginprog = getstr("lo", &cp); + loginprog = gtgetstr("lo", &cp); } if (loginprog == NULL) loginprog = _PATH_LOGIN; diff --git a/libexec/telnetd/telnetd.c b/libexec/telnetd/telnetd.c index 9f0e6f07548..bab0c144d8d 100644 --- a/libexec/telnetd/telnetd.c +++ b/libexec/telnetd/telnetd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: telnetd.c,v 1.14 1998/07/27 18:28:20 millert Exp $ */ +/* $OpenBSD: telnetd.c,v 1.15 1998/07/28 20:18:22 marc Exp $ */ /* $NetBSD: telnetd.c,v 1.6 1996/03/20 04:25:57 tls Exp $ */ /* @@ -45,7 +45,7 @@ static char copyright[] = static char sccsid[] = "@(#)telnetd.c 8.4 (Berkeley) 5/30/95"; static char rcsid[] = "$NetBSD: telnetd.c,v 1.5 1996/02/28 20:38:23 thorpej Exp $"; #else -static char rcsid[] = "$OpenBSD: telnetd.c,v 1.14 1998/07/27 18:28:20 millert Exp $"; +static char rcsid[] = "$OpenBSD: telnetd.c,v 1.15 1998/07/28 20:18:22 marc Exp $"; #endif #endif /* not lint */ @@ -1135,13 +1135,12 @@ telnet(f, p, host) hostinfo = 0; #endif - if (getent(defent, gettyname) == 1) { - char *getstr(); + if (gtgetent(defent, gettyname) == 1) { char *cp=defstrs; - HE = getstr("he", &cp); - HN = getstr("hn", &cp); - IM = getstr("im", &cp); + HE = gtgetstr("he", &cp); + HN = gtgetstr("hn", &cp); + IM = gtgetstr("im", &cp); if (HN && *HN) { strncpy(host_name, HN, sizeof host_name - 1); host_name[sizeof host_name -1] = '\0'; |