-diff -u glibc-2.1.2/crypt/sysdeps/unix/Makefile glibc-2.1.2.gemma/crypt/sysdeps/unix/Makefile
---- glibc-2.1.2/crypt/sysdeps/unix/Makefile Sat Oct 9 11:30:25 1999
-+++ glibc-2.1.2.gemma/crypt/sysdeps/unix/Makefile Sat Oct 9 11:30:15 1999
-@@ -1,4 +1,4 @@
- ifeq ($(subdir),md5-crypt)
--libcrypt-routines += crypt crypt_util
--dont_distribute += crypt.c crypt_util.c
-+libcrypt-routines += arc4random bcrypt blowfish crypt crypt_util
-+dont_distribute += arc4random bcrypt blowfish crypt.c crypt_util.c
- endif
-diff -u glibc-2.1.2/crypt/sysdeps/unix/crypt-entry.c glibc-2.1.2.gemma/crypt/sysdeps/unix/crypt-entry.c
---- glibc-2.1.2/crypt/sysdeps/unix/crypt-entry.c Sat Oct 9 11:22:25 1999
-+++ glibc-2.1.2.gemma/crypt/sysdeps/unix/crypt-entry.c Sat Oct 9 11:25:35 1999
-@@ -45,6 +45,8 @@
- #include "crypt.h"
- #include "crypt-private.h"
-
-+#include "blowfish.h"
-+
- /* Prototypes for local functions. */
- #if __STDC__ - 0
- #ifndef __GNU_LIBRARY__
-@@ -61,6 +63,7 @@
- replacement. This is meant to be the same as for other MD5 based
- encryption implementations. */
- static const char md5_salt_prefix[] = "$1$";
-+static const char blowfish_salt_prefix[] = "$2";
+diff -urN glibc-2.1.91.orig/crypt/Makefile glibc-2.1.91/crypt/Makefile
+--- glibc-2.1.91.orig/crypt/Makefile Wed Jun 14 05:49:02 2000
++++ glibc-2.1.91/crypt/Makefile Sat Jul 15 00:58:39 2000
+@@ -28,7 +28,7 @@
+ extra-libs := libcrypt
+ extra-libs-others := $(extra-libs)
- /* For use by the old, non-reentrant routines (crypt/encrypt/setkey) */
- extern struct crypt_data _ufc_foobar;
-@@ -84,6 +87,10 @@
- if (strncmp (md5_salt_prefix, salt, sizeof (md5_salt_prefix) - 1) == 0)
- return __md5_crypt_r (key, salt, (char *) data,
- sizeof (struct crypt_data));
-+
-+ /* Try to find out whether we have to use Blowfish encryption replacement. */
-+ if (strncmp (blowfish_salt_prefix, salt, sizeof (blowfish_salt_prefix) - 1) == 0)
-+ return bcrypt (key, salt);
- #endif
+-libcrypt-routines := crypt-entry md5-crypt md5 crypt crypt_util
++libcrypt-routines := crypt-entry md5-crypt md5 arc4random bcrypt blowfish crypt crypt_util
- /*
-@@ -126,6 +133,8 @@
- /* Try to find out whether we have to use MD5 encryption replacement. */
- if (strncmp (md5_salt_prefix, salt, sizeof (md5_salt_prefix) - 1) == 0)
- return __md5_crypt (key, salt);
-+ if (strncmp (blowfish_salt_prefix, salt, sizeof (blowfish_salt_prefix) - 1) == 0)
-+ return bcrypt (key, salt);
- #endif
+ tests = cert md5test md5c-test
- return __crypt_r (key, salt, &_ufc_foobar);
-diff -u --new-file glibc-2.1.2/crypt/sysdeps/unix/arc4random.c glibc-2.1.2.gemma/crypt/sysdeps/unix/arc4random.c
---- glibc-2.1.2/crypt/sysdeps/unix/arc4random.c Wed Jul 28 21:09:53 1999
-+++ glibc-2.1.2.gemma/crypt/sysdeps/unix/arc4random.c Thu Oct 7 07:30:58 1999
+diff -urN glibc-2.1.91.orig/crypt/arc4random.c glibc-2.1.91/crypt/arc4random.c
+--- glibc-2.1.91.orig/crypt/arc4random.c Thu Jan 1 01:00:00 1970
++++ glibc-2.1.91/crypt/arc4random.c Sat Jul 15 00:56:30 2000
@@ -0,0 +1,174 @@
+/*
+ * Arc4 random number generator for OpenBSD.
+ printf("%qd cycles\n", v);
+}
+#endif
-diff -u --new-file glibc-2.1.2/crypt/sysdeps/unix/bcrypt.c glibc-2.1.2.gemma/crypt/sysdeps/unix/bcrypt.c
---- glibc-2.1.2/crypt/sysdeps/unix/bcrypt.c Wed Jul 28 21:09:53 1999
-+++ glibc-2.1.2.gemma/crypt/sysdeps/unix/bcrypt.c Thu Oct 7 07:34:26 1999
+diff -urN glibc-2.1.91.orig/crypt/bcrypt.c glibc-2.1.91/crypt/bcrypt.c
+--- glibc-2.1.91.orig/crypt/bcrypt.c Thu Jan 1 01:00:00 1970
++++ glibc-2.1.91/crypt/bcrypt.c Sat Jul 15 00:56:30 2000
@@ -0,0 +1,360 @@
+/*
+ * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
+ printf("Passwd entry: %s\n", p);
+}
+#endif
-diff -u --new-file glibc-2.1.2/crypt/sysdeps/unix/blf.h glibc-2.1.2.gemma/crypt/sysdeps/unix/blf.h
---- glibc-2.1.2/crypt/sysdeps/unix/blf.h Wed Jul 28 21:09:53 1999
-+++ glibc-2.1.2.gemma/crypt/sysdeps/unix/blf.h Thu Oct 7 07:31:52 1999
+diff -urN glibc-2.1.91.orig/crypt/blf.h glibc-2.1.91/crypt/blf.h
+--- glibc-2.1.91.orig/crypt/blf.h Thu Jan 1 01:00:00 1970
++++ glibc-2.1.91/crypt/blf.h Sat Jul 15 00:56:30 2000
@@ -0,0 +1,80 @@
+/*
+ * Blowfish - a fast block cipher designed by Bruce Schneier
+u_int32_t Blowfish_stream2word __P((const u_int8_t *, u_int16_t , u_int16_t *));
+
+#endif
-diff -u --new-file glibc-2.1.2/crypt/sysdeps/unix/blowfish.c glibc-2.1.2.gemma/crypt/sysdeps/unix/blowfish.c
---- glibc-2.1.2/crypt/sysdeps/unix/blowfish.c Wed Jul 28 21:09:53 1999
-+++ glibc-2.1.2.gemma/crypt/sysdeps/unix/blowfish.c Thu Oct 7 07:33:18 1999
+diff -urN glibc-2.1.91.orig/crypt/blowfish.c glibc-2.1.91/crypt/blowfish.c
+--- glibc-2.1.91.orig/crypt/blowfish.c Thu Jan 1 01:00:00 1970
++++ glibc-2.1.91/crypt/blowfish.c Sat Jul 15 00:56:30 2000
@@ -0,0 +1,773 @@
+/*
+ * Blowfish block cipher for OpenBSD
+ report(data2, 2);
+}
+#endif
-diff -u --new-file glibc-2.1.2/crypt/sysdeps/unix/blowfish.h glibc-2.1.2.gemma/crypt/sysdeps/unix/blowfish.h
---- glibc-2.1.2/crypt/sysdeps/unix/blowfish.h Wed Jul 28 21:09:53 1999
-+++ glibc-2.1.2.gemma/crypt/sysdeps/unix/blowfish.h Wed Oct 6 14:31:10 1999
+diff -urN glibc-2.1.91.orig/crypt/blowfish.h glibc-2.1.91/crypt/blowfish.h
+--- glibc-2.1.91.orig/crypt/blowfish.h Thu Jan 1 01:00:00 1970
++++ glibc-2.1.91/crypt/blowfish.h Sat Jul 15 00:56:30 2000
@@ -0,0 +1,10 @@
+
+#ifndef BLOWFISH_H
+char *bcrypt_gensalt(u_int8_t log_rounds);
+
+#endif /* BLOWFISH_H */
-diff -u glibc-2.1.2/sysdeps/generic/crypt-entry.c glibc-2.1.2.gemma/sysdeps/generic/crypt-entry.c
---- glibc-2.1.2/sysdeps/generic/crypt-entry.c Sat Oct 9 17:41:58 1999
-+++ glibc-2.1.2.gemma/sysdeps/generic/crypt-entry.c Sat Oct 9 17:54:52 1999
-@@ -21,13 +21,17 @@
- #include <crypt.h>
- #include <errno.h>
- #include <string.h>
--
-+#include <sys/types.h>
+diff -urN glibc-2.1.91.orig/crypt/crypt-entry.c glibc-2.1.91/crypt/crypt-entry.c
+--- glibc-2.1.91.orig/crypt/crypt-entry.c Sat Mar 4 01:47:30 2000
++++ glibc-2.1.91/crypt/crypt-entry.c Sat Jul 15 00:56:30 2000
+@@ -45,6 +45,8 @@
+ #include "crypt.h"
+ #include "crypt-private.h"
- /* Define our magic string to mark salt for MD5 encryption
++#include "blowfish.h"
++
+ /* Prototypes for local functions. */
+ #if __STDC__ - 0
+ #ifndef __GNU_LIBRARY__
+@@ -61,6 +63,7 @@
replacement. This is meant to be the same as for other MD5 based
encryption implementations. */
static const char md5_salt_prefix[] = "$1$";
-
-+/* Define our magic string to mark salt for Blowfish encryption
-+ replacement. This is meant to be the same as for other Blowfish based
-+ encryption implementations. */
+static const char blowfish_salt_prefix[] = "$2";
- /* Prototypes for the MD5 encryption replacement functions. */
- extern char *__md5_crypt_r (const char *key, const char *salt, char *buffer,
-@@ -37,6 +41,10 @@
- extern char *__crypt_r (const char *key, const char *salt,
- struct crypt_data *__restrict data);
-
-+/* Prototypes for the Blowfish encryption replacement functions. */
-+char *bcrypt(const char *key, const char *salt);
-+char *bcrypt_gensalt(u_int8_t log_rounds);
+ /* For use by the old, non-reentrant routines (crypt/encrypt/setkey) */
+ extern struct crypt_data _ufc_foobar;
+@@ -84,6 +87,10 @@
+ if (strncmp (md5_salt_prefix, salt, sizeof (md5_salt_prefix) - 1) == 0)
+ return __md5_crypt_r (key, salt, (char *) data,
+ sizeof (struct crypt_data));
+
- /* We recognize an intended call of the MD5 crypt replacement function
- by the first 3 characters of the salt string. If they match the
- MD5 magic string we want MD5 encryption replacement. */
-@@ -65,6 +73,8 @@
- {
++ /* Try to find out whether we have to use Blowfish encryption replacement. */
++ if (strncmp (blowfish_salt_prefix, salt, sizeof (blowfish_salt_prefix) - 1) == 0)
++ return bcrypt (key, salt);
+ #endif
+
+ /*
+@@ -126,6 +133,8 @@
+ /* Try to find out whether we have to use MD5 encryption replacement. */
if (strncmp (md5_salt_prefix, salt, sizeof (md5_salt_prefix) - 1) == 0)
return __md5_crypt (key, salt);
+ if (strncmp (blowfish_salt_prefix, salt, sizeof (blowfish_salt_prefix) - 1) == 0)
+ return bcrypt (key, salt);
+ #endif
- /* We don't have DES encryption. */
- __set_errno (EOPNOTSUPP);
+ return __crypt_r (key, salt, &_ufc_foobar);