Hello community,

here is the log from the commit of package libxcrypt for openSUSE:Factory
checked in at Fri Jul 29 09:54:10 CEST 2011.



--------
--- libxcrypt/libxcrypt.changes 2011-07-20 11:54:58.000000000 +0200
+++ /mounts/work_src_done/STABLE/libxcrypt/libxcrypt.changes    2011-07-27 
12:02:19.000000000 +0200
@@ -1,0 +2,6 @@
+Wed Jul 27 10:01:36 UTC 2011 - [email protected]
+
+- fix 2x and 2y modes
+- add libxcrypt-crypt_blowfish = 1.2 provides
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libxcrypt.spec ++++++
--- /var/tmp/diff_new_pack.RYlPwP/_old  2011-07-29 09:53:46.000000000 +0200
+++ /var/tmp/diff_new_pack.RYlPwP/_new  2011-07-29 09:53:46.000000000 +0200
@@ -27,7 +27,7 @@
 Obsoletes:      libxcrypt-64bit
 %endif
 Version:        3.0.4
-Release:        5
+Release:        7
 Summary:        Crypt Library for DES, MD5, Blowfish and others
 Source:         libxcrypt-%{version}.tar.bz2
 Url:            http://www.openwall.com/crypt/
@@ -38,6 +38,7 @@
 Patch1:         libxcrypt-3.0.4-blowfish-noasm.diff
 Patch2:         libxcrypt-3.0.4-blowfish-xcrypt.diff
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+Provides:       libxcrypt-crypt_blowfish = 1.2
 
 %description
 Libxcrypt is a replacement for libcrypt, which comes with the GNU C


++++++ libxcrypt-3.0.4-blowfish-xcrypt.diff ++++++
--- /var/tmp/diff_new_pack.RYlPwP/_old  2011-07-29 09:53:46.000000000 +0200
+++ /var/tmp/diff_new_pack.RYlPwP/_new  2011-07-29 09:53:46.000000000 +0200
@@ -10,27 +10,41 @@
  
  #include <errno.h>
  #ifndef __set_errno
-@@ -52,6 +53,9 @@
+@@ -52,6 +53,10 @@
  #define BF_SCALE                      0
  #endif
  
 +#include "xcrypt-plugin.h"
 +#define _crypt_blowfish_rn __crypt_r
++#include <dlfcn.h>
 +
  typedef unsigned int BF_word;
  typedef signed int BF_word_signed;
  
-@@ -887,3 +891,10 @@ char *_crypt_gensalt_blowfish_rn(const c
+@@ -887,3 +892,23 @@ char *_crypt_gensalt_blowfish_rn(const c
  
        return output;
  }
 +
-+char *__crypt_gensalt_r (unsigned long count, __const char *input, int size, 
char *output, int output_size)
++/* dirty hack */
++static const char* _find_prefix(const char* prefix)
 +{
-+      return _crypt_gensalt_blowfish_rn("$2a$", count, input, size, output, 
output_size);
++      Dl_info info;
++      if (dladdr(_find_prefix, &info) && strlen(info.dli_fname) > 8)
++      {
++          const char* sfx = info.dli_fname+strlen(info.dli_fname)-8;
++          if (!strncmp(sfx, "_2y.", 4))
++              prefix = "$2y$";
++          else if (!strncmp(sfx, "_2x.", 4))
++              prefix = "$2x$";
++      }
++      return prefix;
 +}
 +
-+
++char *__crypt_gensalt_r (unsigned long count, __const char *input, int size, 
char *output, int output_size)
++{
++      return _crypt_gensalt_blowfish_rn(_find_prefix("$2a$"), count, input, 
size, output, output_size);
++}
 Index: libxcrypt-3.0.4/plugins/blowfish/blowfish-test.c
 ===================================================================
 --- libxcrypt-3.0.4.orig/plugins/blowfish/blowfish-test.c
@@ -105,25 +119,15 @@
 ===================================================================
 --- libxcrypt-3.0.4.orig/plugins/blowfish/Makefile.am
 +++ libxcrypt-3.0.4/plugins/blowfish/Makefile.am
-@@ -25,5 +25,5 @@ libxcrypt_2a_la_SOURCES = crypt_blowfish
+@@ -25,5 +25,9 @@ libxcrypt_2a_la_SOURCES = crypt_blowfish
  
  noinst_PROGRAMS = blowfish-test
  
 -blowfish_test_CFLAGS = $(AM_CFLAGS) -DTEST_THREADS=10
+-blowfish_test_LDADD = libxcrypt_2a.la -lpthread
 +blowfish_test_CFLAGS = $(AM_CFLAGS) -DTEST -DTEST_THREADS=4 -DXCRYPT
- blowfish_test_LDADD = libxcrypt_2a.la -lpthread
-Index: libxcrypt-3.0.4/src/xcrypt.c
-===================================================================
---- libxcrypt-3.0.4.orig/src/xcrypt.c
-+++ libxcrypt-3.0.4/src/xcrypt.c
-@@ -42,6 +42,10 @@ get_plugin (const char *hash_id)
- {
-    struct plugin_t *ptr = plugins;
- 
-+   /* blowfish hack for CVE-2011-2483 */
-+   if (!strcmp(hash_id, "2x") || !strcmp(hash_id, "2y"))
-+       hash_id =  "2a";
-+
-    while (ptr)
-      {
-         if (strcmp (hash_id, ptr->id) == 0)
++blowfish_test_LDADD = libxcrypt_2a.la -ldl -lpthread
++
++install-data-local:
++      $(LN_S) libxcrypt_2a.so.1 $(DESTDIR)$(plugindir)/libxcrypt_2x.so.1
++      $(LN_S) libxcrypt_2a.so.1 $(DESTDIR)$(plugindir)/libxcrypt_2y.so.1


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to