From 21b4fe120d613cfe765b78380a70d7026e30a41e Mon Sep 17 00:00:00 2001 From: Paul Traina Date: Wed, 7 Sep 1994 07:16:52 +0000 Subject: [PATCH] Remove static in front of declarations for des_setkey and des_cipher so that linking against -lcrypt (-ldescrypt) will give us the good versions instead of the stubs in libc. (These changes need to be made to the non-US version of libdescrypt too!) Allow building and support for bdes program. A bit more work still needs to be done on secure telnet. Submitted by: pst --- secure/Makefile | 4 ++-- secure/lib/libcrypt/crypt-des.c | 6 +++--- secure/lib/libcrypt/crypt.c | 6 +++--- secure/usr.bin/Makefile | 7 +++++++ secure/usr.bin/Makefile.inc | 3 +++ secure/usr.bin/bdes/Makefile | 5 +++++ 6 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 secure/usr.bin/Makefile create mode 100644 secure/usr.bin/Makefile.inc diff --git a/secure/Makefile b/secure/Makefile index 9df15e144193..a99f9d328f4d 100644 --- a/secure/Makefile +++ b/secure/Makefile @@ -1,6 +1,6 @@ -# $Id: Makefile,v 1.2 1994/08/08 17:49:22 csgr Exp $ +# $Id: Makefile,v 1.3 1994/08/12 21:02:17 csgr Exp $ -SUBDIR= lib +SUBDIR= lib usr.bin .include diff --git a/secure/lib/libcrypt/crypt-des.c b/secure/lib/libcrypt/crypt-des.c index 50199ce21e07..22f665c9b8f6 100644 --- a/secure/lib/libcrypt/crypt-des.c +++ b/secure/lib/libcrypt/crypt-des.c @@ -32,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: crypt.c,v 1.4 1994/05/01 08:16:38 g89r4222 Exp $ + * $Id: crypt.c,v 1.2 1994/08/08 17:28:52 csgr Exp $ * * This is an original implementation of the DES and the crypt(3) interfaces * by David Burren . @@ -362,7 +362,7 @@ setup_salt(long salt) } } -static int +int des_setkey(const char *key) { u_long k0, k1, rawkey0, rawkey1; @@ -559,7 +559,7 @@ do_des( u_long l_in, u_long r_in, u_long *l_out, u_long *r_out, int count) return(0); } -static int +int des_cipher(const char *in, char *out, long salt, int count) { u_long l_out, r_out, rawl, rawr; diff --git a/secure/lib/libcrypt/crypt.c b/secure/lib/libcrypt/crypt.c index 50199ce21e07..22f665c9b8f6 100644 --- a/secure/lib/libcrypt/crypt.c +++ b/secure/lib/libcrypt/crypt.c @@ -32,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: crypt.c,v 1.4 1994/05/01 08:16:38 g89r4222 Exp $ + * $Id: crypt.c,v 1.2 1994/08/08 17:28:52 csgr Exp $ * * This is an original implementation of the DES and the crypt(3) interfaces * by David Burren . @@ -362,7 +362,7 @@ setup_salt(long salt) } } -static int +int des_setkey(const char *key) { u_long k0, k1, rawkey0, rawkey1; @@ -559,7 +559,7 @@ do_des( u_long l_in, u_long r_in, u_long *l_out, u_long *r_out, int count) return(0); } -static int +int des_cipher(const char *in, char *out, long salt, int count) { u_long l_out, r_out, rawl, rawr; diff --git a/secure/usr.bin/Makefile b/secure/usr.bin/Makefile new file mode 100644 index 000000000000..a53973984a3e --- /dev/null +++ b/secure/usr.bin/Makefile @@ -0,0 +1,7 @@ +# $Id$ + +# XXX telnet still needs work +SUBDIR= bdes + +.include + diff --git a/secure/usr.bin/Makefile.inc b/secure/usr.bin/Makefile.inc new file mode 100644 index 000000000000..7883d4763d70 --- /dev/null +++ b/secure/usr.bin/Makefile.inc @@ -0,0 +1,3 @@ +# $Id$ + +BINDIR= /usr/bin diff --git a/secure/usr.bin/bdes/Makefile b/secure/usr.bin/bdes/Makefile index 9166f721c4b3..8aa71d45e815 100644 --- a/secure/usr.bin/bdes/Makefile +++ b/secure/usr.bin/bdes/Makefile @@ -1,5 +1,10 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 +# $Id$ PROG= bdes +SRCS= bdes.c + +LDADD+= -lcrypt +DPADD+= /usr/lib/libcrypt.a .include