diff options
author | Hans Insulander <hin@cvs.openbsd.org> | 2003-05-14 01:46:52 +0000 |
---|---|---|
committer | Hans Insulander <hin@cvs.openbsd.org> | 2003-05-14 01:46:52 +0000 |
commit | 741afc51eec5b3a91ba4ec075951602e79d51ae5 (patch) | |
tree | d1c51f57e69db58353edb9a4f68e5039f5b899e0 | |
parent | b0c8958fa6357ca1847ee139b4753c4ad3639999 (diff) |
Get rid of libtelnet, it is compiled into the tree programs
(telnetd, telnet and tn3270) that use them instead.
This gets rid of a really hairy dependency between telnet and libtelnet.
ok millert@
-rw-r--r-- | lib/Makefile | 4 | ||||
-rw-r--r-- | lib/libtelnet/Makefile | 22 | ||||
-rw-r--r-- | libexec/telnetd/Makefile | 15 | ||||
-rw-r--r-- | libexec/telnetd/auth-proto.h (renamed from lib/libtelnet/auth-proto.h) | 2 | ||||
-rw-r--r-- | libexec/telnetd/auth.c (renamed from lib/libtelnet/auth.c) | 2 | ||||
-rw-r--r-- | libexec/telnetd/auth.h (renamed from lib/libtelnet/auth.h) | 2 | ||||
-rw-r--r-- | libexec/telnetd/enc-proto.h (renamed from lib/libtelnet/enc-proto.h) | 0 | ||||
-rw-r--r-- | libexec/telnetd/enc_des.c (renamed from lib/libtelnet/enc_des.c) | 2 | ||||
-rw-r--r-- | libexec/telnetd/encrypt.c (renamed from lib/libtelnet/encrypt.c) | 2 | ||||
-rw-r--r-- | libexec/telnetd/encrypt.h (renamed from lib/libtelnet/encrypt.h) | 2 | ||||
-rw-r--r-- | libexec/telnetd/genget.c (renamed from lib/libtelnet/genget.c) | 4 | ||||
-rw-r--r-- | libexec/telnetd/kerberos.c (renamed from lib/libtelnet/kerberos.c) | 2 | ||||
-rw-r--r-- | libexec/telnetd/kerberos5.c (renamed from lib/libtelnet/kerberos5.c) | 2 | ||||
-rw-r--r-- | libexec/telnetd/misc-proto.h (renamed from lib/libtelnet/misc-proto.h) | 2 | ||||
-rw-r--r-- | libexec/telnetd/misc.c (renamed from lib/libtelnet/misc.c) | 2 | ||||
-rw-r--r-- | libexec/telnetd/misc.h (renamed from lib/libtelnet/misc.h) | 2 | ||||
-rw-r--r-- | libexec/telnetd/telnetd.c | 6 | ||||
-rw-r--r-- | libexec/telnetd/telnetd.h | 6 | ||||
-rw-r--r-- | usr.bin/telnet/Makefile | 20 | ||||
-rw-r--r-- | usr.bin/telnet/getent.c (renamed from lib/libtelnet/getent.c) | 2 | ||||
-rw-r--r-- | usr.bin/telnet/telnet_locl.h | 10 | ||||
-rw-r--r-- | usr.bin/tn3270/tn3270/Makefile | 11 |
22 files changed, 54 insertions, 68 deletions
diff --git a/lib/Makefile b/lib/Makefile index 3105491150a..95775100fe7 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -1,9 +1,9 @@ -# $OpenBSD: Makefile,v 1.48 2003/01/14 20:04:44 marc Exp $ +# $OpenBSD: Makefile,v 1.49 2003/05/14 01:46:51 hin Exp $ # $NetBSD: Makefile,v 1.20.4.1 1996/06/14 17:22:38 cgd Exp $ SUBDIR= csu libarch libc libcom_err libcompat libcurses libcurses++ \ libdes libedit libevent libform libkeynote libkvm libl libm libmenu \ libocurses libossaudio libpanel libpcap libpthread libresolv librpcsvc \ - libskey libsectok libssl libtelnet libusbhid libutil libwrap liby libz + libskey libsectok libssl libusbhid libutil libwrap liby libz .include <bsd.subdir.mk> diff --git a/lib/libtelnet/Makefile b/lib/libtelnet/Makefile deleted file mode 100644 index d1a407c858a..00000000000 --- a/lib/libtelnet/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# from: @(#)Makefile 8.2 (Berkeley) 12/15/93 -# $OpenBSD: Makefile,v 1.6 2001/06/28 14:22:16 hin Exp $ -# $NetBSD: Makefile,v 1.6 1996/02/24 01:15:15 jtk Exp $ - -LIB= telnet -SRCS= auth.c encrypt.c genget.c getent.c misc.c - -CFLAGS+= -DHAS_CGETENT -Wall -Wno-unused - -.include <bsd.own.mk> # for KERBEROS - -.if (${KERBEROS:L} == "yes") -CFLAGS+= -DKRB4 -DAUTHENTICATION -DENCRYPTION -DDES_ENCRYPTION -SRCS+= kerberos.c enc_des.c -.endif - -.if (${KERBEROS5:L} == "yes") -CFLAGS+= -DKRB5 -DAUTHENTICATION -DENCRYPTION -DDES_ENCRYPTION -SRCS+= kerberos5.c -.endif - -.include <bsd.lib.mk> diff --git a/libexec/telnetd/Makefile b/libexec/telnetd/Makefile index af282f0b207..b9a8443ef2e 100644 --- a/libexec/telnetd/Makefile +++ b/libexec/telnetd/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.17 2002/03/05 00:09:32 deraadt Exp $ +# $OpenBSD: Makefile,v 1.18 2003/05/14 01:46:51 hin Exp $ # from: @(#)Makefile 8.2 (Berkeley) 12/15/93 # $NetBSD: Makefile,v 1.6 1996/02/24 01:22:12 jtk Exp $ @@ -6,22 +6,27 @@ PROG= telnetd CFLAGS+=-DLINEMODE -DKLUDGELINEMODE -DUSE_TERMIO -DDIAGNOSTICS CFLAGS+=-DOLD_ENVIRON -DENV_HACK -I${.CURDIR} -Wall -Werror +CFLAGS+= -DHAS_CGETENT -Wno-unused SRCS= authenc.c global.c slc.c state.c sys_term.c telnetd.c \ - termstat.c utility.c mini_inetd.c socket.c -DPADD= ${LIBUTIL} ${LIBCURSES} ${LIBTELNET} -LDADD+= -lutil -lcurses -ltelnet + termstat.c utility.c mini_inetd.c socket.c \ + auth.c encrypt.c genget.c misc.c +DPADD= ${LIBUTIL} ${LIBCURSES} +LDADD+= -lutil -lcurses MAN= telnetd.8 .include <bsd.own.mk> # for KERBEROS .if (${KERBEROS5:L} == "yes") +SRCS+= kerberos5.c enc_des.c LDADD+= -lkrb5 -lasn1 -lcrypto -lcom_err -lkafs +CFLAGS+= -DKRB5 -DAUTHENTICATION -DENCRYPTION -DDES_ENCRYPTION .endif .if (${KERBEROS:L} == "yes") -CFLAGS+=-DENCRYPTION -DAUTHENTICATION -DKRB4 -I${.CURDIR}/../../lib +CFLAGS+=-DENCRYPTION -DAUTHENTICATION -DKRB4 -DDES_ENCRYPTION LDADD+= -lkrb -lcrypto -ldes DPADD+= ${LIBDES} ${LIBKRB} +SRCS+= kerberos.c .endif .include <bsd.prog.mk> diff --git a/lib/libtelnet/auth-proto.h b/libexec/telnetd/auth-proto.h index 9899634ff00..fc159cf8be2 100644 --- a/lib/libtelnet/auth-proto.h +++ b/libexec/telnetd/auth-proto.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)auth-proto.h 8.1 (Berkeley) 6/4/93 - * $OpenBSD: auth-proto.h,v 1.4 2001/05/25 10:23:05 hin Exp $ + * $OpenBSD: auth-proto.h,v 1.1 2003/05/14 01:46:51 hin Exp $ * $NetBSD: auth-proto.h,v 1.5 1996/02/24 01:15:16 jtk Exp $ */ diff --git a/lib/libtelnet/auth.c b/libexec/telnetd/auth.c index ad22cdcd93d..6ed8393075b 100644 --- a/lib/libtelnet/auth.c +++ b/libexec/telnetd/auth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth.c,v 1.5 2002/03/22 13:49:27 hin Exp $ */ +/* $OpenBSD: auth.c,v 1.1 2003/05/14 01:46:51 hin Exp $ */ /*- * Copyright (c) 1991, 1993 diff --git a/lib/libtelnet/auth.h b/libexec/telnetd/auth.h index 58283b13a5f..b7c87116842 100644 --- a/lib/libtelnet/auth.h +++ b/libexec/telnetd/auth.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)auth.h 8.1 (Berkeley) 6/4/93 - * $OpenBSD: auth.h,v 1.4 2001/05/25 10:23:05 hin Exp $ + * $OpenBSD: auth.h,v 1.1 2003/05/14 01:46:51 hin Exp $ * $NetBSD: auth.h,v 1.5 1996/02/24 01:15:18 jtk Exp $ */ diff --git a/lib/libtelnet/enc-proto.h b/libexec/telnetd/enc-proto.h index 6fe5181e0de..6fe5181e0de 100644 --- a/lib/libtelnet/enc-proto.h +++ b/libexec/telnetd/enc-proto.h diff --git a/lib/libtelnet/enc_des.c b/libexec/telnetd/enc_des.c index 99fd4e62260..b69d18bc09a 100644 --- a/lib/libtelnet/enc_des.c +++ b/libexec/telnetd/enc_des.c @@ -1,4 +1,4 @@ -/* $OpenBSD: enc_des.c,v 1.2 2001/05/25 10:23:06 hin Exp $ */ +/* $OpenBSD: enc_des.c,v 1.1 2003/05/14 01:46:51 hin Exp $ */ /*- * Copyright (c) 1991, 1993 diff --git a/lib/libtelnet/encrypt.c b/libexec/telnetd/encrypt.c index 4aeaf93106d..bcda1bbbcdf 100644 --- a/lib/libtelnet/encrypt.c +++ b/libexec/telnetd/encrypt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: encrypt.c,v 1.7 2002/03/22 13:49:28 hin Exp $ */ +/* $OpenBSD: encrypt.c,v 1.1 2003/05/14 01:46:51 hin Exp $ */ /*- * Copyright (c) 1991, 1993 diff --git a/lib/libtelnet/encrypt.h b/libexec/telnetd/encrypt.h index d079644b111..ac55be9392a 100644 --- a/lib/libtelnet/encrypt.h +++ b/libexec/telnetd/encrypt.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)encrypt.h 8.1 (Berkeley) 6/4/93 - * $OpenBSD: encrypt.h,v 1.4 2001/05/25 10:23:06 hin Exp $ + * $OpenBSD: encrypt.h,v 1.1 2003/05/14 01:46:51 hin Exp $ * $NetBSD: encrypt.h,v 1.4 1996/02/24 01:15:20 jtk Exp $ */ diff --git a/lib/libtelnet/genget.c b/libexec/telnetd/genget.c index ea6c90c2a8a..ee740a1508f 100644 --- a/lib/libtelnet/genget.c +++ b/libexec/telnetd/genget.c @@ -1,4 +1,4 @@ -/* $OpenBSD: genget.c,v 1.5 2001/05/25 10:23:06 hin Exp $ */ +/* $OpenBSD: genget.c,v 1.1 2003/05/14 01:46:51 hin Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -36,7 +36,7 @@ #ifndef lint /* from: static char sccsid[] = "@(#)genget.c 8.2 (Berkeley) 5/30/95"; */ /* from: static char *rcsid = "$NetBSD: genget.c,v 1.5 1996/02/24 01:15:21 jtk Exp $"; */ -static char *rcsid = "$OpenBSD: genget.c,v 1.5 2001/05/25 10:23:06 hin Exp $"; +static char *rcsid = "$OpenBSD: genget.c,v 1.1 2003/05/14 01:46:51 hin Exp $"; #endif /* not lint */ /* $KTH: genget.c,v 1.6 1997/05/04 09:01:34 assar Exp $ */ diff --git a/lib/libtelnet/kerberos.c b/libexec/telnetd/kerberos.c index 144609f755b..15037144b1d 100644 --- a/lib/libtelnet/kerberos.c +++ b/libexec/telnetd/kerberos.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kerberos.c,v 1.10 2002/06/09 00:43:00 hin Exp $ */ +/* $OpenBSD: kerberos.c,v 1.1 2003/05/14 01:46:51 hin Exp $ */ /*- * Copyright (c) 1991, 1993 diff --git a/lib/libtelnet/kerberos5.c b/libexec/telnetd/kerberos5.c index 3e52fd2363a..30baa33b8ce 100644 --- a/lib/libtelnet/kerberos5.c +++ b/libexec/telnetd/kerberos5.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kerberos5.c,v 1.6 2003/05/11 04:17:42 hin Exp $ */ +/* $OpenBSD: kerberos5.c,v 1.1 2003/05/14 01:46:51 hin Exp $ */ /*- * Copyright (c) 1991, 1993 diff --git a/lib/libtelnet/misc-proto.h b/libexec/telnetd/misc-proto.h index a48222f27d1..2afafc0b9ec 100644 --- a/lib/libtelnet/misc-proto.h +++ b/libexec/telnetd/misc-proto.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)misc-proto.h 8.1 (Berkeley) 6/4/93 - * $OpenBSD: misc-proto.h,v 1.5 2001/07/02 14:42:55 millert Exp $ + * $OpenBSD: misc-proto.h,v 1.1 2003/05/14 01:46:51 hin Exp $ * $NetBSD: misc-proto.h,v 1.5 1996/02/24 01:15:23 jtk Exp $ */ diff --git a/lib/libtelnet/misc.c b/libexec/telnetd/misc.c index 3730c555cf6..8c5d99fb31c 100644 --- a/lib/libtelnet/misc.c +++ b/libexec/telnetd/misc.c @@ -34,7 +34,7 @@ #ifndef lint /* from: static char sccsid[] = "@(#)misc.c 8.1 (Berkeley) 6/4/93"; */ /* from: static char rcsid[] = "$NetBSD: misc.c,v 1.5 1996/02/24 01:15:25 jtk Exp $"; */ -static char rcsid[] = "$OpenBSD: misc.c,v 1.5 2001/06/29 21:21:46 millert Exp $"; +static char rcsid[] = "$OpenBSD: misc.c,v 1.1 2003/05/14 01:46:51 hin Exp $"; #endif /* not lint */ /* $KTH: misc.c,v 1.15 2000/01/25 23:24:58 assar Exp $ */ diff --git a/lib/libtelnet/misc.h b/libexec/telnetd/misc.h index 404333d34a9..25370b46aad 100644 --- a/lib/libtelnet/misc.h +++ b/libexec/telnetd/misc.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)misc.h 8.1 (Berkeley) 6/4/93 - * $OpenBSD: misc.h,v 1.3 2001/05/25 10:23:07 hin Exp $ + * $OpenBSD: misc.h,v 1.1 2003/05/14 01:46:51 hin Exp $ * $NetBSD: misc.h,v 1.4 1996/02/24 01:15:27 jtk Exp $ */ diff --git a/libexec/telnetd/telnetd.c b/libexec/telnetd/telnetd.c index 2713988ee66..701fd8e545e 100644 --- a/libexec/telnetd/telnetd.c +++ b/libexec/telnetd/telnetd.c @@ -362,14 +362,8 @@ main(int argc, char **argv) else port = htons(atoi(*argv)); } else { -#ifdef KRB5 - port = krb5_getportbyname (NULL, "telnet", "tcp", 23); -#elif defined(KRB4) - port = k_getportbyname("telnet", "tcp", htons(23)); -#else sp = getservbyname ("telnet", "tcp"); port = sp ? sp->s_port : htons(23); -#endif } mini_inetd (port); } else if (argc > 0) { diff --git a/libexec/telnetd/telnetd.h b/libexec/telnetd/telnetd.h index 8955fce4699..2726906d361 100644 --- a/libexec/telnetd/telnetd.h +++ b/libexec/telnetd/telnetd.h @@ -185,10 +185,10 @@ struct hostent *gethostbyname(const char *); #endif #ifdef AUTHENTICATION -#include <libtelnet/auth.h> -#include <libtelnet/misc.h> +#include <auth.h> +#include <misc.h> #ifdef ENCRYPTION -#include <libtelnet/encrypt.h> +#include <encrypt.h> #endif #endif diff --git a/usr.bin/telnet/Makefile b/usr.bin/telnet/Makefile index 7703cf4a459..0bde98a39f0 100644 --- a/usr.bin/telnet/Makefile +++ b/usr.bin/telnet/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.17 2002/05/11 00:20:20 espie Exp $ +# $OpenBSD: Makefile,v 1.18 2003/05/14 01:46:51 hin Exp $ # # Copyright (c) 1990 The Regents of the University of California. # All rights reserved. @@ -37,25 +37,31 @@ PROG= telnet CFLAGS+=-DKLUDGELINEMODE -DUSE_TERMIO -DENV_HACK -DSKEY -Dunix -CFLAGS+=-I${.CURDIR}/../../lib -LDADD+= -lcurses -ltelnet -DPADD= ${LIBCURSES} ${LIBTELNET} +CFLAGS+=-I${.CURDIR}/../../libexec/telnetd +CFLAGS+= -DHAS_CGETENT -Wall -Wno-unused +LDADD+= -lcurses +DPADD= ${LIBCURSES} SRCS= authenc.c commands.c main.c network.c ring.c sys_bsd.c telnet.c \ - terminal.c tn3270.c utilities.c + terminal.c tn3270.c utilities.c auth.c encrypt.c genget.c getent.c \ + misc.c + +.PATH: ${.CURDIR}/../../libexec/telnetd .include <bsd.own.mk> # for KERBEROS .if (${KERBEROS5:L} == "yes") -CFLAGS+=-DENCRYPTION -DAUTHENTICATION -DKRB5 +CFLAGS+=-DENCRYPTION -DAUTHENTICATION -DKRB5 -DDES_ENCRYPTION LDADD+= -lkrb5 -lasn1 -lcrypto -lcom_err -lkafs -ldes DPADD+= ${LIBKRB5} ${LIBASN1} ${LIBCRYPTO} ${LIBCOM_ERR} ${LIBKAFS} ${LIBDES} +SRCS+= kerberos5.c enc_des.c .endif .if (${KERBEROS:L} == "yes") -CFLAGS+=-DENCRYPTION -DAUTHENTICATION -DKRB4 +CFLAGS+=-DENCRYPTION -DAUTHENTICATION -DKRB4 -DDES_ENCRYPTION LDADD+= -lkrb -lcrypto -ldes DPADD+= ${LIBDES} ${LIBKRB} ${LIBDES} +SRCS+= kerberos.c .endif .include <bsd.prog.mk> diff --git a/lib/libtelnet/getent.c b/usr.bin/telnet/getent.c index 1048789dac7..a4285f11e01 100644 --- a/lib/libtelnet/getent.c +++ b/usr.bin/telnet/getent.c @@ -34,7 +34,7 @@ #ifndef lint /* from: static char sccsid[] = "@(#)getent.c 8.2 (Berkeley) 12/15/93"; */ /* from: static char *rcsid = "$NetBSD: getent.c,v 1.5 1996/02/24 01:15:22 jtk Exp $"; */ -static char *rcsid = "$OpenBSD: getent.c,v 1.4 2002/02/16 21:27:29 millert Exp $"; +static char *rcsid = "$OpenBSD: getent.c,v 1.1 2003/05/14 01:46:51 hin Exp $"; #endif /* not lint */ #include <stdlib.h> diff --git a/usr.bin/telnet/telnet_locl.h b/usr.bin/telnet/telnet_locl.h index fb29f5383a2..22b6e8c6a01 100644 --- a/usr.bin/telnet/telnet_locl.h +++ b/usr.bin/telnet/telnet_locl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: telnet_locl.h,v 1.2 1999/12/11 09:08:09 itojun Exp $ */ +/* $OpenBSD: telnet_locl.h,v 1.3 2003/05/14 01:46:51 hin Exp $ */ /* $KTH: telnet_locl.h,v 1.13 1997/11/03 21:37:55 assar Exp $ */ /* @@ -73,11 +73,11 @@ #include <arpa/telnet.h> #if defined(AUTHENTICATION) || defined(ENCRYPTION) -#include <libtelnet/auth.h> -#include <libtelnet/encrypt.h> +#include <auth.h> +#include <encrypt.h> #endif -#include <libtelnet/misc.h> -#include <libtelnet/misc-proto.h> +#include <misc.h> +#include <misc-proto.h> #define LINEMODE diff --git a/usr.bin/tn3270/tn3270/Makefile b/usr.bin/tn3270/tn3270/Makefile index 4b09e806615..d62b6b58ed4 100644 --- a/usr.bin/tn3270/tn3270/Makefile +++ b/usr.bin/tn3270/tn3270/Makefile @@ -1,12 +1,14 @@ -# $OpenBSD: Makefile,v 1.13 2000/10/11 19:28:02 millert Exp $ +# $OpenBSD: Makefile,v 1.14 2003/05/14 01:46:51 hin Exp $ .include "../../Makefile.inc" +.PATH: ${.CURDIR}/../../../libexec/telnetd + CFLAGS += -I${.CURDIR} -I. -CFLAGS +=-I${.CURDIR}/../../../lib +CFLAGS +=-I${.CURDIR}/../../../libexec/telnetd CFLAGS +=-I${.CURDIR}/../../telnet -LDADD += -lcurses -ltelnet -DPADD += ${LIBCURSES} ${LIBTELNET} +LDADD += -lcurses +DPADD += ${LIBCURSES} SRCS += apilib.c api_bsd.c api_exch.c asc_ebc.c astosc.c dctype.c SRCS += disp_asc.c ebc_disp.c @@ -15,6 +17,7 @@ SRCS += api.c function.c inbound.c oia.c options.c outbound.c SRCS += genbsubs.c globals.c system.c termout.c SRCS += commands.c main.c network.c ring.c sys_bsd.c telnet.c terminal.c SRCS += tn3270.c utilities.c +SRCS += auth.c encrypt.c genget.c misc.c # this and the dependency hacks below to make 'depend' target # work right... |