summaryrefslogtreecommitdiff
path: root/secure
diff options
context:
space:
mode:
Diffstat (limited to 'secure')
-rw-r--r--secure/Makefile2
-rw-r--r--secure/Makefile.inc8
-rw-r--r--secure/lib/Makefile2
-rw-r--r--secure/lib/libtelnet/Makefile28
-rw-r--r--secure/libexec/Makefile6
-rw-r--r--secure/libexec/Makefile.inc4
-rw-r--r--secure/libexec/telnetd/Makefile22
-rw-r--r--secure/usr.bin/Makefile2
-rw-r--r--secure/usr.bin/telnet/Makefile16
9 files changed, 87 insertions, 3 deletions
diff --git a/secure/Makefile b/secure/Makefile
index 344ac6937f5a..2b78992b6608 100644
--- a/secure/Makefile
+++ b/secure/Makefile
@@ -6,7 +6,7 @@
MAINTAINER= markm
-SUBDIR= lib usr.bin
+SUBDIR= lib libexec usr.bin
SDIR= ${.CURDIR}/..
diff --git a/secure/Makefile.inc b/secure/Makefile.inc
index 885e72c51f26..673a94fb1446 100644
--- a/secure/Makefile.inc
+++ b/secure/Makefile.inc
@@ -2,6 +2,14 @@
DISTRIBUTION=des
+TELNETDIR= ${.CURDIR}/../../../crypto/telnet
+
+.if exists(${.OBJDIR}/../../lib/libtelnet)
+TELNETOBJDIR= ${.OBJDIR}/../../lib/libtelnet
+.else
+TELNETOBJDIR= ${.CURDIR}/../../lib/libtelnet
+.endif
+
.if exists(${.CURDIR}/../../lib/libcrypt/obj)
CRYPTOBJDIR= ${.CURDIR}/../../lib/libcrypt/obj
.else
diff --git a/secure/lib/Makefile b/secure/lib/Makefile
index ac9918835b2a..d194db8159e9 100644
--- a/secure/lib/Makefile
+++ b/secure/lib/Makefile
@@ -1,6 +1,6 @@
# $FreeBSD$
-SUBDIR= libcipher libdes
+SUBDIR= libcipher libdes libtelnet
.include <bsd.subdir.mk>
diff --git a/secure/lib/libtelnet/Makefile b/secure/lib/libtelnet/Makefile
new file mode 100644
index 000000000000..33e1ee5ad8c5
--- /dev/null
+++ b/secure/lib/libtelnet/Makefile
@@ -0,0 +1,28 @@
+# $FreeBSD$
+
+LIB= telnet
+
+SRCS= genget.c getent.c misc.c encrypt.c auth.c \
+ enc_des.c sra.c pk.c
+
+CFLAGS+= -DHAS_CGETENT -DENCRYPTION -DDES_ENCRYPTION -DAUTHENTICATION \
+ -DSRA -I${TELNETDIR} \
+
+NOPIC= yes
+
+INCLUDES= ${TELNETDIR}/arpa/telnet.h
+
+#
+# Before complaining about this, please *double-check* that you have
+# updated the ldconfig path in /etc/rc to include /usr/lib/compat that
+# was added in src/etc/rc rev 1.98.
+# This is so that `ld' will not continue to generate binaries linked
+# shared against libtelnet, so that in a future release we can move this
+# off to a compat dist (like compat22).
+#
+beforeinstall:
+ rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
+
+.include <bsd.lib.mk>
+
+.PATH: ${TELNETDIR}/libtelnet
diff --git a/secure/libexec/Makefile b/secure/libexec/Makefile
new file mode 100644
index 000000000000..5c5b4505e6a8
--- /dev/null
+++ b/secure/libexec/Makefile
@@ -0,0 +1,6 @@
+# $FreeBSD$
+
+SUBDIR= telnetd
+
+.include <bsd.subdir.mk>
+
diff --git a/secure/libexec/Makefile.inc b/secure/libexec/Makefile.inc
new file mode 100644
index 000000000000..4adbbf530d15
--- /dev/null
+++ b/secure/libexec/Makefile.inc
@@ -0,0 +1,4 @@
+# $FreeBSD$
+
+BINDIR= /usr/libexec
+.include "${.CURDIR}/../../Makefile.inc"
diff --git a/secure/libexec/telnetd/Makefile b/secure/libexec/telnetd/Makefile
new file mode 100644
index 000000000000..230e4e79bf53
--- /dev/null
+++ b/secure/libexec/telnetd/Makefile
@@ -0,0 +1,22 @@
+# $FreeBSD$
+
+# Do not define -DKLUDGELINEMODE, as it does not interact well with many
+# telnet implementations.
+
+PROG= telnetd
+MAN8= telnetd.8
+
+CFLAGS+= -DLINEMODE -DUSE_TERMIO -DDIAGNOSTICS -DOLD_ENVIRON \
+ -DENV_HACK -DAUTHENTICATION -DENCRYPTION \
+ -I${TELNETDIR}
+
+SRCS= global.c slc.c state.c sys_term.c telnetd.c \
+ termstat.c utility.c authenc.c
+
+DPADD= ${LIBUTIL} ${LIBTERMCAP} ${LIBTELNET} ${LIBDES} ${LIBMP} \
+ ${LIBCRYPT}
+LDADD= -lutil -ltermcap -L${TELNETOBJDIR} -ltelnet -ldes -lcrypt -lmp
+
+.include <bsd.prog.mk>
+
+.PATH: ${TELNETDIR}/telnetd
diff --git a/secure/usr.bin/Makefile b/secure/usr.bin/Makefile
index ee8fddf4625c..0b1fc8ac992e 100644
--- a/secure/usr.bin/Makefile
+++ b/secure/usr.bin/Makefile
@@ -1,6 +1,6 @@
# $FreeBSD$
-SUBDIR= bdes
+SUBDIR= bdes telnet
.include <bsd.subdir.mk>
diff --git a/secure/usr.bin/telnet/Makefile b/secure/usr.bin/telnet/Makefile
new file mode 100644
index 000000000000..b7683443d5a6
--- /dev/null
+++ b/secure/usr.bin/telnet/Makefile
@@ -0,0 +1,16 @@
+# $FreeBSD$
+
+PROG= telnet
+
+CFLAGS+= -DKLUDGELINEMODE -DUSE_TERMIO -DENV_HACK -DSKEY \
+ -DENCRYPTION -DAUTHENTICATION -I${TELNETDIR}
+
+SRCS= authenc.c commands.c main.c network.c ring.c sys_bsd.c \
+ telnet.c terminal.c tn3270.c utilities.c
+
+DPADD= ${LIBTERMCAP} ${LIBTELNET} ${LIBDES} ${LIBCRYPT} ${LIBMP}
+LDADD= -ltermcap -L${TELNETOBJDIR} -ltelnet -ldes -lcrypt -lmp
+
+.include <bsd.prog.mk>
+
+.PATH: ${TELNETDIR}/telnet