head	1.19;
access;
symbols
	RELENG_2_2_8_RELEASE:1.15.2.2
	RELENG_2_2_7_RELEASE:1.15.2.2
	RELENG_2_2_6_RELEASE:1.15.2.2
	RELENG_2_2_5_RELEASE:1.15.2.1
	RELENG_2_2_2_RELEASE:1.15.2.1
	RELENG_2_2_1_RELEASE:1.15.2.1
	RELENG_2_2_0_RELEASE:1.15.2.1
	RELENG_2_2:1.15.0.2
	RELENG_2_2_BP:1.15
	BSD_4_4_Lite_crypt:1.1.1.1
	CSRG:1.1.1;
locks; strict;
comment	@# @;


1.19
date	97.10.03.09.49.27;	author markm;	state dead;
branches;
next	1.18;

1.18
date	97.02.22.14.38.43;	author peter;	state Exp;
branches;
next	1.17;

1.17
date	97.02.09.15.01.53;	author markm;	state Exp;
branches;
next	1.16;

1.16
date	97.01.14.05.42.56;	author jkh;	state Exp;
branches;
next	1.15;

1.15
date	96.06.05.22.48.03;	author nate;	state Exp;
branches
	1.15.2.1;
next	1.14;

1.14
date	96.04.23.05.18.42;	author pst;	state Exp;
branches;
next	1.13;

1.13
date	96.03.11.16.17.58;	author markm;	state Exp;
branches;
next	1.12;

1.12
date	96.03.09.13.26.21;	author ache;	state Exp;
branches;
next	1.11;

1.11
date	95.10.11.00.04.09;	author gibbs;	state Exp;
branches;
next	1.10;

1.10
date	95.09.16.03.04.10;	author gibbs;	state Exp;
branches;
next	1.9;

1.9
date	95.09.14.21.29.21;	author gibbs;	state Exp;
branches;
next	1.8;

1.8
date	95.08.05.19.10.25;	author ache;	state Exp;
branches;
next	1.7;

1.7
date	95.07.24.22.55.59;	author ache;	state Exp;
branches;
next	1.6;

1.6
date	95.07.24.22.01.01;	author ache;	state Exp;
branches;
next	1.5;

1.5
date	95.07.24.21.47.30;	author ache;	state Exp;
branches;
next	1.4;

1.4
date	95.07.24.21.12.57;	author ache;	state Exp;
branches;
next	1.3;

1.3
date	95.07.24.20.40.03;	author ache;	state Exp;
branches;
next	1.2;

1.2
date	95.07.20.11.39.51;	author pst;	state Exp;
branches;
next	1.1;

1.1
date	94.08.27.15.48.52;	author csgr;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	94.08.27.15.48.53;	author csgr;	state Exp;
branches
	1.1.1.1.6.1;
next	;

1.1.1.1.6.1
date	95.09.15.18.19.24;	author gibbs;	state Exp;
branches;
next	1.1.1.1.6.2;

1.1.1.1.6.2
date	95.09.16.03.13.38;	author gibbs;	state Exp;
branches;
next	1.1.1.1.6.3;

1.1.1.1.6.3
date	95.10.11.00.12.21;	author gibbs;	state Exp;
branches;
next	1.1.1.1.6.4;

1.1.1.1.6.4
date	95.10.29.06.55.03;	author davidg;	state Exp;
branches;
next	1.1.1.1.6.5;

1.1.1.1.6.5
date	96.06.21.17.29.14;	author markm;	state Exp;
branches;
next	1.1.1.1.6.6;

1.1.1.1.6.6
date	96.06.30.12.50.58;	author markm;	state Exp;
branches;
next	;

1.15.2.1
date	97.02.09.15.26.45;	author markm;	state Exp;
branches;
next	1.15.2.2;

1.15.2.2
date	98.02.18.13.22.30;	author markm;	state dead;
branches;
next	;


desc
@@


1.19
log
@*GULP* Punt this into the attic. It is no longer used.
@
text
@#
# Copyright (c) 1990 The Regents of the University of California.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
#    must display the following acknowledgement:
#	This product includes software developed by the University of
#	California, Berkeley and its contributors.
# 4. Neither the name of the University nor the names of its contributors
#    may be used to endorse or promote products derived from this software
#    without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
#	@@(#)Makefile	8.1 (Berkeley) 6/6/93
#	$Id: Makefile,v 1.18 1997/02/22 14:38:43 peter Exp $
#

PROG=	telnet

SRCS=	authenc.c commands.c main.c network.c ring.c sys_bsd.c telnet.c \
	terminal.c tn3270.c utilities.c

CFLAGS+=-DTERMCAP -DKLUDGELINEMODE -DUSE_TERMIO -DENV_HACK -DENCRYPTION
CFLAGS+=-DSKEY -I${.CURDIR}/../../lib
LDADD+= -L${TELNETOBJDIR} -ltermcap -ltelnet
DPADD+= ${TELNETOBJDIR}/libtelnet.a ${LIBTERMCAP}

.if exists(${DESTDIR}/usr/lib/libkrb.a) && (defined(MAKE_EBONES))
CFLAGS+=-DAUTHENTICATION -DKRB4
LDADD+= -ldes -lkrb
DPADD+= ${LIBDES} ${LIBKRB}
.endif

# Used only in krb4encpwd.c and rsaencpwd.c (libtelnet), not yet active
#LDADD+= -ldescrypt

.include <bsd.prog.mk>
@


1.18
log
@Revert $FreeBSD$ to $Id$
@
text
@d34 1
a34 1
#	$Id$
@


1.17
log
@Various buffer overrun fixes and other security enhancements.
Obtained from: PST's fixes to the non-secure telnet{d}
@
text
@d34 1
a34 1
#	$FreeBSD$
@


1.16
log
@Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
@
text
@d43 1
a43 1
CFLAGS+=-I${.CURDIR}/../../lib
@


1.15
log
@Bring in a change that got lost when we spammed over the CVS repository
to fix the mega-commits spamming.

pst         96/05/29 20:09:25

  Modified:    secure/usr.bin/telnet  Makefile main.c
  Log:
  Remove obsolete SOCKSv4 support

Submitted by:	pst
Obtained from:  A mirrored CVS repository that will disappear next SUP
@
text
@d34 1
a34 1
#	$Id: Makefile,v 1.14 1996/04/23 05:18:42 pst Exp $
@


1.15.2.1
log
@YAMFC (Security fixes and buffer overruns)
@
text
@d34 1
a34 1
#	$Id$
d43 1
a43 1
CFLAGS+=-DSKEY -I${.CURDIR}/../../lib
@


1.15.2.2
log
@Punt this into the attic. KerberosIV (KTH eBones) has been tagged into
the tree and the userland changes have been merged.
@
text
@d34 1
a34 1
#	$Id: Makefile,v 1.15.2.1 1997/02/09 15:26:45 markm Exp $
@


1.14
log
@Add support for socks
@
text
@d34 1
a34 1
#	$Id: Makefile,v 1.13 1996/03/11 16:17:58 markm Exp $
a54 7

.if defined(SOCKS)
CFLAGS+=-DSOCKS
CFLAGS+=-Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dlisten=Rlisten \
	-Daccept=Raccept -Drcmd=Rrcmd -Dbind=Rbind -Dselect=Rselect
LDADD+=	-lsocks
.endif
@


1.13
log
@Big clean-up job. Remove ancient and never-to-be used stuff.
The look much more like BSD Makefiles now.
@
text
@d34 1
a34 1
#	$Id$
d55 7
@


1.12
log
@Sense MAKE_EBONES, DESTDIR
SRCS cleanup
DPADD cleanup
@
text
@d34 1
d39 4
a42 2
CFLAGS+=-DTERMCAP -DKLUDGELINEMODE -DUSE_TERMIO
CFLAGS+=-DENV_HACK
d45 1
a45 3
DPADD+= ${TELNETOBJDIR}/libtelnet.a

#ifdef	ENCRYPTION
d47 2
a48 6
CFLAGS += -DENCRYPTION

.if exists(${DESTDIR}/usr/lib/libkrb.a) && (defined(MAKE_EBONES) \
	|| defined(MAKE_KERBEROS))
CFLAGS+=-DAUTHENTICATION
CFLAGS+= -DKRB4
a52 8
#.if exists(${DESTDIR}/usr/lib/libkrb5.a) && (defined(MAKE_EBONES) \
#       || defined(MAKE_KERBEROS))
#CFLAGS+=-DAUTHENTICATION
#CFLAGS+= -DKRB5 -DFORWARD
#LDADD+= -ldes -lkrb5
#DPADD+= ${LIBDES}
#.endif

a55 12
#endif	/* ENCRYPTION */

DPADD+=  ${LIBTERMCAP}

SRCS=	authenc.c commands.c main.c network.c ring.c sys_bsd.c telnet.c \
	terminal.c tn3270.c utilities.c

# These are the sources that have encryption stuff in them.
CRYPT_SRC= authenc.c commands.c externs.h main.c network.c
CRYPT_SRC+= ring.c ring.h telnet.c terminal.c utilities.c Makefile
NOCRYPT_DIR=${.CURDIR}/Nocrypt

a56 17

nocrypt:
#ifdef	ENCRYPTION
	@@for i in ${CRYPT_SRC}; do \
	    if [ ! -d ${NOCRYPT_DIR} ]; then \
		echo Creating subdirectory ${NOCRYPT_DIR}; \
		mkdir ${NOCRYPT_DIR}; \
	    fi; \
	    echo ${NOCRYPT_DIR}/$$i; \
	    unifdef -UENCRYPTION ${.CURDIR}/$$i | \
		sed "s/ || defined(ENCRYPTION)//" > ${NOCRYPT_DIR}/$$i; \
	done

placeholder:
#else	/* ENCRYPTION */
	@@echo "Encryption code already removed."
#endif	/* ENCRYPTION */
@


1.11
log
@Remove MAKE_EBONES conditionals.  They were originally placed here because
of missing functionality in our libkrb which is no longer a problem.
@
text
@d46 1
a46 1
CFLAGS+=-DAUTHENTICATION -DENCRYPTION
d48 3
a50 1
.if exists(/usr/lib/libkrb.a)
d53 1
d56 7
a62 4
.if exists(/usr/lib/libkrb5.a)
CFLAGS+= -DKRB5 -DFORWARD
LDADD+=  -ldes -lkrb5
.endif
d69 1
a69 1
DPADD=	${LIBTERMCAP}
@


1.10
log
@Add TELNETOBJDIR and CRYPTOBJDIR for use in LDADD entries.  This makes
secure reference the libraries that were just build instead of in /usr/lib.
@
text
@a47 1
.ifdef MAKE_EBONES
a50 1
.endif
@


1.9
log
@Enable kerberosIV authentication/encryption conditionalized on MAKE_EBONES.
@
text
@d41 2
a42 1
LDADD+= -ltermcap -ltelnet
@


1.8
log
@Comment out LDADD+=-ldescrypt, it is not yet active due to
missng defines for krb4encpwd and rsaencpwd and missing rsa library too.
@
text
@a35 4
# This stuff need original libdes to run (new_rnd_key.c module),
# current eBones/des lib don't have it
# Kerberos4 stuff ifdefed by MAKE_KERBEROS (make.conf) because of it

d47 1
a47 1
.ifdef MAKE_KERBEROS
@


1.7
log
@Final cleanup pass through Makefiles, now this stuff
autodetect kerberos/eBones and work even with eBones,
but with reduced functionality (don't pick up des/krb stuff
in this case)
@
text
@d63 2
a64 1
LDADD+= -ldescrypt
@


1.6
log
@Add -ldescrypt, or wrong crypt version can be picked from libc
Reviewed by:
Submitted by:
Obtained from:
@
text
@a49 1
LDADD+= -ldescrypt
d54 1
a54 1
LDADD+= -lkrb -ldes
d60 1
a60 1
LDADD+=  -lkrb5 -ldes
d62 2
@


1.5
log
@Since this stuff not works with eBones, ifdef kerberos stuff
with MAKE_KERBEROS to allow other things to live
Reviewed by:
Submitted by:
Obtained from:
@
text
@d50 1
@


1.4
log
@Add comment about new_rnd_key.c module needed from original
libdes (and not present in eBones libdes)
@
text
@d38 1
d51 1
d54 2
a55 1
LDADD+= -lkrb
d60 1
a60 1
LDADD+=  -lkrb5
a61 2

LDADD+= -ldes
@


1.3
log
@Fix dependances, typing errors, etc.
Note: this thing need original libdes not Eric Young libdes from eBones
Submitted by:
Obtained from:
@
text
@d36 3
@


1.2
log
@Update telnet to the 95.05.31 release.

Obtained from:	Dave Borman <dab@@cray.com>
@
text
@d41 1
d49 1
a49 1
LDADD+=	-lkrb -ldes
d52 1
a52 1
.if exists(/usr/lib/libkrb4.a)
d54 1
a54 1
LDADD+=  -lkrb5 -ldes
d57 2
a60 1
LDADD=	-ltermcap -ltelnet
@


1.1
log
@Initial revision
@
text
@d38 1
a38 1
CFLAGS+=-DTERMCAP -DKLUDGELINEMODE -DUSE_TERMIO #-DAUTHENTICATION -DENCRYPTION
d42 15
a56 1
#CFLAGS+= -DKRB4
a58 1
#LDADD+=	-lkrb -ldes
@


1.1.1.1
log
@The telnet version with encryption in in.
Reviewed by:	geoff.
@
text
@@


1.1.1.1.6.1
log
@Merge with HEAD.  Brings in new secure telnet suite + eBones fixes.
@
text
@d38 1
a38 1
CFLAGS+=-DTERMCAP -DKLUDGELINEMODE -DUSE_TERMIO
a40 1
LDADD+= -ltermcap -ltelnet
d42 1
a42 20
#ifdef	ENCRYPTION

CFLAGS+=-DAUTHENTICATION -DENCRYPTION

.ifdef MAKE_EBONES
.if exists(/usr/lib/libkrb.a)
CFLAGS+= -DKRB4
LDADD+= -ldes -lkrb
.endif
.endif

.if exists(/usr/lib/libkrb5.a)
CFLAGS+= -DKRB5 -DFORWARD
LDADD+=  -ldes -lkrb5
.endif

# Used only in krb4encpwd.c and rsaencpwd.c (libtelnet), not yet active
#LDADD+= -ldescrypt

#endif	/* ENCRYPTION */
d44 2
@


1.1.1.1.6.2
log
@Merge with Head:
Add TELNETOBJDIR and CRYPTOBJDIR for use in LDADD entries.  This makes
secure reference the libraries that were just built instead of in /usr/lib.
@
text
@d41 1
a41 2
LDADD+= -L${TELNETOBJDIR} -ltermcap -ltelnet
DPADD+= ${TELNETOBJDIR}/libtelnet.a
@


1.1.1.1.6.3
log
@Remove MAKE_EBONES conditionals.  Besides being wrong, this was what screwed
up secure telnet in the previous snapshots.
@
text
@d48 1
d52 1
@


1.1.1.1.6.4
log
@Put telnet, telnetd, and libtelnet in the krb distribution where they
belong. They should be actually moved in the source tree to be under
eBones, but I don't want to mess with that now. This should hopefully
fix the main problem people were having when they selected the "des"
distribution and not krb, but got the Kerberos version of telnet and
friends as a side effect.

Submitted by:	Justin Gibbs <gibbs>
@
text
@a36 1
DISTRIBUTION= krb
@


1.1.1.1.6.5
log
@Merge with HEAD
@
text
@a33 1
#	$Id$
d37 1
d39 2
a40 4
SRCS=	authenc.c commands.c main.c network.c ring.c sys_bsd.c telnet.c \
	terminal.c tn3270.c utilities.c

CFLAGS+=-DTERMCAP -DKLUDGELINEMODE -DUSE_TERMIO -DENV_HACK -DENCRYPTION
d43 3
a45 1
DPADD+= ${TELNETOBJDIR}/libtelnet.a ${LIBTERMCAP}
d47 4
a50 2
.if exists(${DESTDIR}/usr/lib/libkrb.a) && (defined(MAKE_EBONES))
CFLAGS+=-DAUTHENTICATION -DKRB4
d52 5
a56 1
DPADD+= ${LIBDES} ${LIBKRB}
d62 12
d75 17
@


1.1.1.1.6.6
log
@Make telnet part of the krb distribution
@
text
@a36 2
DISTRIBUTION=	krb

@
