NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/45805: telnet/telnetd with -DAUTHENTICATION -DENCRYPTION (rfc2941)



>Number:         45805
>Category:       bin
>Synopsis:       telnet/telnetd with -DAUTHENTICATION -DENCRYPTION (rfc2941)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 09 09:25:00 +0000 2012
>Originator:     Borodin Oleg
>Release:        NetBSD 5.1
>Organization:
Greenwood Corp.
>Environment:
NetBSD zeenet.home 5.1 NetBSD 5.1 (ZEE) #1: Sun Jan  8 22:29:40 EET 2012  
ziggi%zeenet.home@localhost:/usr/src/sys/arch/i386/compile/ZEE i386

>Description:

Build telnet/telnetd  with SRA/RSA/DES auth/enc (compilation option 
-DAUTHENTICATION -DENCRYPTION)

I cross tested, it work ok. 

# uname -a
FreeBSD zee.home 9.0-RC2 FreeBSD 9.0-RC2 #0 r227981: Sat Nov 26 00:27:21 FET 
2011     root%zee.home@localhost:/usr/obj/data/bsd9src/sys/ZEE2  i386

# telnet 192.168.55.12
Trying 192.168.55.12...
Connected to 192.168.55.12.
Escape character is '^]'.
Trying SRA secure login:
User (root): ziggi
Password: 
[ SRA accepts you ]

NetBSD/i386 (zeenet.home) (pts/4)

Last login: Mon Jan  9 12:29:06 2012 from zee on pts/4
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 5.1 (ZEE) #1: Sun Jan 8 22:29:40 EET 2012

bash$ 

>How-To-Repeat:

>Fix:
--- ./lib/libtelnet/Makefile.orig       2008-08-29 03:02:22.000000000 +0300
+++ ./lib/libtelnet/Makefile    2012-01-09 12:08:20.000000000 +0200
@@ -15,6 +15,12 @@
 CPPFLAGS+= -DHAS_CGETENT
 CPPFLAGS+= -I${.CURDIR}
 
+
+SRCS+=  enc_des.c
+CPPFLAGS+= -DENCRYPTION -DAUTHENTICATION
+CPPFLAGS+= -DDES_ENCRYPTION
+
+
 .if (${USE_KERBEROS} != "no")
 SRCS+= enc_des.c
 CPPFLAGS+= -DENCRYPTION -DAUTHENTICATION
@@ -34,6 +40,13 @@
 .for f in auth enc_des kerberos5 pk
 COPTS.${f}.c+=  -Wno-pointer-sign
 .endfor
+
+.else # USE_KERBEROS = no
+
+CPPFLAGS+= -DENCRYPTION -DAUTHENTICATION
+CPPFLAGS+= -DDES_ENCRYPTION
+SRCS+=  enc_des.c
+
 .endif
 
 .include <bsd.lib.mk>


--- ./libexec/telnetd/Makefile.orig     2006-03-20 06:03:23.000000000 +0200
+++ ./libexec/telnetd/Makefile  2012-01-09 12:13:33.000000000 +0200
@@ -34,6 +35,17 @@
 LDADD+=         -ldes -lcom_err -L${VERS} -lvers -lroken
 DPADD+=        ${LIBDES} ${LIBCOM_ERR} ${LIBROKEN}
 
+.else
+
+CPPFLAGS+= -DAUTHENTICATION -DENCRYPTION
+LDADD+= -lcrypto -lcrypt -ldes
+DPADD+= ${LIBCRYPTO} ${LIBCRYPT}
+
+.if (${USE_PAM} != "no")
+LDADD+= -lpam ${PAM_STATIC_LDADD}
+DPADD+= ${LIBPAM} ${PAM_STATIC_DPADD}
+.endif
+
 .endif
 
 .include <bsd.prog.mk>
--- ./usr.bin/telnet/Makefile.orig      2012-01-09 13:05:17.000000000 +0200
+++ ./usr.bin/telnet/Makefile   2012-01-09 12:11:52.000000000 +0200
@@ -73,6 +73,20 @@
 
 LDADD+= -ldes -lcom_err -lroken
 DPADD+=        ${LIBDES} ${LIBCOM_ERR} ${LIBROKEN}
+
+.else #USE_KERBEROS
+
+
+CPPFLAGS+= -DAUTHENTICATION -DENCRYPTION
+LDADD+= -lcrypto -lcrypt -ldes
+DPADD+= ${LIBCRYPTO} ${LIBCRYPT}
+
+.if (${USE_PAM} != "no")
+LDADD+= -lpam ${PAM_STATIC_LDADD}
+DPADD+= ${LIBPAM} ${PAM_STATIC_DPADD}
+.endif
+
+
 .endif




Home | Main Index | Thread Index | Old Index