summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorHans Insulander <hin@cvs.openbsd.org>2001-05-25 10:25:23 +0000
committerHans Insulander <hin@cvs.openbsd.org>2001-05-25 10:25:23 +0000
commit995a74a40d763acfcdf7d35c2451b7668840e6ab (patch)
tree61b8ac008db4451b55de099070183f9245d1c368 /libexec
parentdd9e896da481d498f32b58d839efdf947b25a2ff (diff)
KerberosV support from Heimdal.
Diffstat (limited to 'libexec')
-rw-r--r--libexec/telnetd/Makefile6
-rw-r--r--libexec/telnetd/authenc.c8
-rw-r--r--libexec/telnetd/ext.h4
-rw-r--r--libexec/telnetd/telnetd.c11
4 files changed, 17 insertions, 12 deletions
diff --git a/libexec/telnetd/Makefile b/libexec/telnetd/Makefile
index c9eb0505568..bea4d2776fa 100644
--- a/libexec/telnetd/Makefile
+++ b/libexec/telnetd/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.9 2000/10/10 15:14:54 millert Exp $
+# $OpenBSD: Makefile,v 1.10 2001/05/25 10:25:22 hin Exp $
# from: @(#)Makefile 8.2 (Berkeley) 12/15/93
# $NetBSD: Makefile,v 1.6 1996/02/24 01:22:12 jtk Exp $
@@ -20,4 +20,8 @@ LDADD+= -lkrb -ldes
DPADD+= ${LIBDES} ${LIBKRB}
.endif
+.if (${KERBEROS5:L} == "yes")
+LDADD+= -lkrb5
+.endif
+
.include <bsd.prog.mk>
diff --git a/libexec/telnetd/authenc.c b/libexec/telnetd/authenc.c
index f8e0b2d9ef2..c75844318f3 100644
--- a/libexec/telnetd/authenc.c
+++ b/libexec/telnetd/authenc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: authenc.c,v 1.3 1998/03/12 04:53:07 art Exp $ */
+/* $OpenBSD: authenc.c,v 1.4 2001/05/25 10:25:22 hin Exp $ */
/* $NetBSD: authenc.c,v 1.3 1996/02/28 20:38:08 thorpej Exp $ */
/*-
@@ -39,7 +39,7 @@
static char sccsid[] = "@(#)authenc.c 8.2 (Berkeley) 5/30/95";
static char rcsid[] = "$NetBSD: authenc.c,v 1.3 1996/02/28 20:38:08 thorpej Exp $";
#else
-static char rcsid[] = "$OpenBSD: authenc.c,v 1.3 1998/03/12 04:53:07 art Exp $";
+static char rcsid[] = "$OpenBSD: authenc.c,v 1.4 2001/05/25 10:25:22 hin Exp $";
#endif
#endif /* not lint */
@@ -48,7 +48,7 @@ static char rcsid[] = "$OpenBSD: authenc.c,v 1.3 1998/03/12 04:53:07 art Exp $";
#include <libtelnet/misc.h>
int
-net_write(str, len)
+telnet_net_write(str, len)
unsigned char *str;
int len;
{
@@ -81,7 +81,7 @@ telnet_spin()
char *
telnet_getenv(val)
- char *val;
+ const char *val;
{
extern char *getenv(const char *);
return(getenv(val));
diff --git a/libexec/telnetd/ext.h b/libexec/telnetd/ext.h
index 774902fc8c8..f44b69fa427 100644
--- a/libexec/telnetd/ext.h
+++ b/libexec/telnetd/ext.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext.h,v 1.9 2000/11/16 19:00:19 millert Exp $ */
+/* $OpenBSD: ext.h,v 1.10 2001/05/25 10:25:22 hin Exp $ */
/* $NetBSD: ext.h,v 1.6 1996/02/28 20:38:13 thorpej Exp $ */
/*
@@ -120,7 +120,7 @@ extern void
#ifdef DIAGNOSTICS
printoption P((char *, int)),
printdata P((char *, char *, int)),
- printsub P((char, unsigned char *, int)),
+ printsub P((int, unsigned char *, int)),
#endif
ptyflush P((void)),
putchr P((int)),
diff --git a/libexec/telnetd/telnetd.c b/libexec/telnetd/telnetd.c
index bf551d92bca..c7ce8900470 100644
--- a/libexec/telnetd/telnetd.c
+++ b/libexec/telnetd/telnetd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: telnetd.c,v 1.27 2000/11/16 19:00:19 millert Exp $ */
+/* $OpenBSD: telnetd.c,v 1.28 2001/05/25 10:25:22 hin 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.27 2000/11/16 19:00:19 millert Exp $";
+static char rcsid[] = "$OpenBSD: telnetd.c,v 1.28 2001/05/25 10:25:22 hin Exp $";
#endif
#endif /* not lint */
@@ -590,8 +590,9 @@ static unsigned char ttytype_sbbuf[] = {
};
int
-getterminaltype(name)
+getterminaltype(name, name_sz)
char *name;
+ size_t name_sz;
{
int retval = -1;
void _gettermname();
@@ -605,7 +606,7 @@ getterminaltype(name)
while (his_will_wont_is_changing(TELOPT_AUTHENTICATION))
ttloop();
if (his_state_is_will(TELOPT_AUTHENTICATION)) {
- retval = auth_wait(name);
+ retval = auth_wait(name, name_sz);
}
#endif
@@ -899,7 +900,7 @@ doit(who)
* get terminal type.
*/
*user_name = 0;
- level = getterminaltype(user_name);
+ level = getterminaltype(user_name, sizeof(user_name));
setenv("TERM", terminaltype ? terminaltype : "network", 1); /* XXX mem */
/*