Hello community,
here is the log from the commit of package libxcrypt for openSUSE:Factory
checked in at Mon Nov 16 10:00:14 CET 2009.
--------
--- libxcrypt/libxcrypt.changes 2009-07-10 21:18:56.000000000 +0200
+++ /mounts/work_src_done/STABLE/libxcrypt/libxcrypt.changes 2009-11-15 13:49:31.000000000 +0100
@@ -1,0 +2,7 @@
+Fri Oct 30 09:42:37 CET 2009 - kukuk@suse.de
+
+- Update to version 3.0.3:
+ - Fix memory leak [bnc#547893]
+ - Fix compiler warnings [bnc#440134]
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
libxcrypt-3.0.2.tar.bz2
New:
----
libxcrypt-3.0.3.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libxcrypt.spec ++++++
--- /var/tmp/diff_new_pack.ZALcm6/_old 2009-11-16 09:57:30.000000000 +0100
+++ /var/tmp/diff_new_pack.ZALcm6/_new 2009-11-16 09:57:30.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package libxcrypt (Version 3.0.2)
+# spec file for package libxcrypt (Version 3.0.3)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -22,13 +22,12 @@
License: LGPL v2.1 or later ; Public Domain, Freeware
Group: System/Libraries
AutoReqProv: on
-# bug437293
+# bnc#437293
%ifarch ppc64
Obsoletes: libxcrypt-64bit
%endif
-#
-Version: 3.0.2
-Release: 2
+Version: 3.0.3
+Release: 1
Summary: Crypt Library for DES, MD5, Blowfish and others
Source: libxcrypt-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -46,11 +45,10 @@
Group: Development/Libraries/C and C++
Requires: libxcrypt = %{version}
AutoReqProv: on
-# bug437293
+# bnc#437293
%ifarch ppc64
Obsoletes: libxcrypt-devel-64bit
%endif
-#
%description devel
libxcrypt is a replacement for libcrypt, which comes with the GNU C
++++++ libxcrypt-3.0.2.tar.bz2 -> libxcrypt-3.0.3.tar.bz2 ++++++
++++ 60765 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libxcrypt-3.0.2/ChangeLog new/libxcrypt-3.0.3/ChangeLog
--- old/libxcrypt-3.0.2/ChangeLog 2008-07-16 14:30:29.000000000 +0200
+++ new/libxcrypt-3.0.3/ChangeLog 2009-10-30 09:22:43.000000000 +0100
@@ -1,3 +1,22 @@
+2009-10-29 Thorsten Kukuk
+
+ * release version 3.0.3
+
+ * src/xcrypt.c (__xcrypt_gensalt_r): Fix memory leak [bnc#547893].
+
+2008-11-04 Thorsten Kukuk
+
+ * plugins/blowfish/blowfish-test.c (run): Fix compiler
+ warnings [bnc#440134].
+
+2008-09-28 Thorsten Kukuk
+
+ * src/xcrypt-private.h: Add prototype for _xcrypt_gensalt_sha256_rn
+ and _xcrypt_gensalt_sha512_rn.
+ * src/crypt_gensalt.c: Add new gensalt functions.
+ * src/xcrypt.c: Use gensalt functions for sha512 and sha256.
+ * src/gensalt-test.c: Enable test cases for sha256 and sha512.
+
2008-07-16 Thorsten Kukuk
* release version 3.0.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libxcrypt-3.0.2/config.h.in new/libxcrypt-3.0.3/config.h.in
--- old/libxcrypt-3.0.2/config.h.in 2008-07-16 14:31:07.000000000 +0200
+++ new/libxcrypt-3.0.3/config.h.in 2009-10-29 14:25:01.000000000 +0100
@@ -84,6 +84,10 @@
/* Define to 1 if `vfork' works. */
#undef HAVE_WORKING_VFORK
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#undef LT_OBJDIR
+
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libxcrypt-3.0.2/configure.in new/libxcrypt-3.0.3/configure.in
--- old/libxcrypt-3.0.2/configure.in 2008-07-16 14:30:29.000000000 +0200
+++ new/libxcrypt-3.0.3/configure.in 2008-09-29 11:50:19.000000000 +0200
@@ -1,5 +1,5 @@
# Process this file with autoconf to produce a configure script.
-AC_INIT(xcrypt, 3.0.2, http://www.suse.de/feedback, libxcrypt)
+AC_INIT(xcrypt, 3.0.3, http://www.suse.de/feedback, libxcrypt)
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/xcrypt.h])
AM_CONFIG_HEADER([config.h])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libxcrypt-3.0.2/NEWS new/libxcrypt-3.0.3/NEWS
--- old/libxcrypt-3.0.2/NEWS 2008-07-16 14:30:29.000000000 +0200
+++ new/libxcrypt-3.0.3/NEWS 2009-10-30 08:55:49.000000000 +0100
@@ -5,6 +5,10 @@
Please send bug reports, questions and suggestions to .
+Version 3.0.3
+* Fix memory leak
+* Fix compiler warnings
+
Version 3.0.2
* Fix generating salts for MD5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libxcrypt-3.0.2/plugins/blowfish/blowfish-test.c new/libxcrypt-3.0.3/plugins/blowfish/blowfish-test.c
--- old/libxcrypt-3.0.2/plugins/blowfish/blowfish-test.c 2007-10-30 10:42:31.000000000 +0100
+++ new/libxcrypt-3.0.3/plugins/blowfish/blowfish-test.c 2008-11-04 10:50:55.000000000 +0100
@@ -1,3 +1,4 @@
+
/*
* Written by Solar Designer and placed in the public domain.
* See crypt_blowfish.c for more information.
@@ -38,7 +39,7 @@
static volatile sig_atomic_t running;
-static void handle_timer(int signum)
+static void handle_timer(int signum __attribute__((unused)))
{
running = 0;
}
@@ -53,7 +54,7 @@
do {
if (strcmp(__crypt_r(tests[i].pw, tests[i].hash, (char *)&data, size),
tests[i].hash)) {
- printf("%d: FAILED (__crypt_r/%l/%lu)\n",
+ printf("%ld: FAILED (__crypt_r/%d/%lu)\n",
(long)((char *)arg - (char *)0), i, count);
return NULL;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libxcrypt-3.0.2/plugins/blowfish/Makefile.am new/libxcrypt-3.0.3/plugins/blowfish/Makefile.am
--- old/libxcrypt-3.0.2/plugins/blowfish/Makefile.am 2007-10-25 15:17:11.000000000 +0200
+++ new/libxcrypt-3.0.3/plugins/blowfish/Makefile.am 2008-11-04 10:47:38.000000000 +0100
@@ -25,5 +25,5 @@
noinst_PROGRAMS = blowfish-test
-blowfish_test_CFLAGS = -DTEST_THREADS=10
+blowfish_test_CFLAGS = $(AM_CFLAGS) -DTEST_THREADS=10
blowfish_test_LDADD = libxcrypt_2a.la -lpthread
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libxcrypt-3.0.2/src/crypt_gensalt.c new/libxcrypt-3.0.3/src/crypt_gensalt.c
--- old/libxcrypt-3.0.2/src/crypt_gensalt.c 2007-10-25 15:17:46.000000000 +0200
+++ new/libxcrypt-3.0.3/src/crypt_gensalt.c 2008-09-29 11:49:14.000000000 +0200
@@ -8,6 +8,8 @@
*/
#include
+#include
+#include
#include
#ifndef __set_errno
@@ -75,39 +77,173 @@
return output;
}
-char *_xcrypt_gensalt_md5_rn(unsigned long count,
- __CONST char *input, int size, char *output, int output_size)
+char *
+_xcrypt_gensalt_md5_rn (unsigned long count __attribute__((unused)),
+ const char *input, int size,
+ char *output, int output_size)
{
- unsigned long value;
+ unsigned long value;
- if (size < 3 || output_size < 3 + 4 + 1 || (count && count != 1000)) {
- if (output_size > 0) output[0] = '\0';
- __set_errno((output_size < 3 + 4 + 1) ? ERANGE : EINVAL);
- return NULL;
+ if (size < 3 || output_size < 3 + 4 + 1)
+ {
+ if (output_size > 0)
+ output[0] = '\0';
+ errno = ERANGE;
+ return NULL;
+ }
+
+ output[0] = '$';
+ output[1] = '1';
+ output[2] = '$';
+ value = (unsigned long)(unsigned char)input[0] |
+ ((unsigned long)(unsigned char)input[1] << 8) |
+ ((unsigned long)(unsigned char)input[2] << 16);
+ output[3] = _xcrypt_itoa64[value & 0x3f];
+ output[4] = _xcrypt_itoa64[(value >> 6) & 0x3f];
+ output[5] = _xcrypt_itoa64[(value >> 12) & 0x3f];
+ output[6] = _xcrypt_itoa64[(value >> 18) & 0x3f];
+ output[7] = '\0';
+
+ if (size >= 6 && output_size >= 3 + 4 + 4 + 1) {
+ value = (unsigned long)(unsigned char)input[3] |
+ ((unsigned long)(unsigned char)input[4] << 8) |
+ ((unsigned long)(unsigned char)input[5] << 16);
+ output[7] = _xcrypt_itoa64[value & 0x3f];
+ output[8] = _xcrypt_itoa64[(value >> 6) & 0x3f];
+ output[9] = _xcrypt_itoa64[(value >> 12) & 0x3f];
+ output[10] = _xcrypt_itoa64[(value >> 18) & 0x3f];
+ output[11] = '\0';
+ }
+
+ return output;
+}
+
+char *
+_xcrypt_gensalt_sha256_rn (unsigned long count, const char *input, int size,
+ char *output, int output_size)
+{
+ unsigned long value;
+ char *buf;
+ char buf2[12];
+
+ if (count > 0)
+ {
+ if (asprintf (&buf, "$5$rounds=%ld$", count) < 0)
+ {
+ if (output_size > 0)
+ output[0] = '\0';
+ errno = ENOMEM;
+ return NULL;
+ }
+ }
+ else
+ {
+ if (asprintf (&buf, "$5$") < 0)
+ {
+ if (output_size > 0)
+ output[0] = '\0';
+ errno = ENOMEM;
+ return NULL;
}
+ }
- output[0] = '$';
- output[1] = '1';
- output[2] = '$';
- value = (unsigned long)(unsigned char)input[0] |
- ((unsigned long)(unsigned char)input[1] << 8) |
- ((unsigned long)(unsigned char)input[2] << 16);
- output[3] = _xcrypt_itoa64[value & 0x3f];
- output[4] = _xcrypt_itoa64[(value >> 6) & 0x3f];
- output[5] = _xcrypt_itoa64[(value >> 12) & 0x3f];
- output[6] = _xcrypt_itoa64[(value >> 18) & 0x3f];
- output[7] = '\0';
-
- if (size >= 6 && output_size >= 3 + 4 + 4 + 1) {
- value = (unsigned long)(unsigned char)input[3] |
- ((unsigned long)(unsigned char)input[4] << 8) |
- ((unsigned long)(unsigned char)input[5] << 16);
- output[7] = _xcrypt_itoa64[value & 0x3f];
- output[8] = _xcrypt_itoa64[(value >> 6) & 0x3f];
- output[9] = _xcrypt_itoa64[(value >> 12) & 0x3f];
- output[10] = _xcrypt_itoa64[(value >> 18) & 0x3f];
- output[11] = '\0';
+ if (size < 3 || output_size < (int)strlen (buf) + 4 + 1)
+ {
+ free (buf);
+ if (output_size > 0)
+ output[0] = '\0';
+ errno = ERANGE;
+ return NULL;
+ }
+
+ value = (unsigned long)(unsigned char)input[0] |
+ ((unsigned long)(unsigned char)input[1] << 8) |
+ ((unsigned long)(unsigned char)input[2] << 16);
+ buf2[0] = _xcrypt_itoa64[value & 0x3f];
+ buf2[1] = _xcrypt_itoa64[(value >> 6) & 0x3f];
+ buf2[2] = _xcrypt_itoa64[(value >> 12) & 0x3f];
+ buf2[3] = _xcrypt_itoa64[(value >> 18) & 0x3f];
+ buf2[4] = '\0';
+
+ if (size >= 6 && output_size >= (int)strlen (buf) + 4 + 4 + 1)
+ {
+ value = (unsigned long)(unsigned char)input[3] |
+ ((unsigned long)(unsigned char)input[4] << 8) |
+ ((unsigned long)(unsigned char)input[5] << 16);
+ buf2[4] = _xcrypt_itoa64[value & 0x3f];
+ buf2[5] = _xcrypt_itoa64[(value >> 6) & 0x3f];
+ buf2[6] = _xcrypt_itoa64[(value >> 12) & 0x3f];
+ buf2[7] = _xcrypt_itoa64[(value >> 18) & 0x3f];
+ buf2[8] = '\0';
+ }
+
+ snprintf (output, output_size, "%s%s", buf, buf2);
+ free (buf);
+
+ return output;
+}
+
+char *
+_xcrypt_gensalt_sha512_rn (unsigned long count, const char *input, int size,
+ char *output, int output_size)
+{
+ unsigned long value;
+ char *buf;
+ char buf2[12];
+
+ if (count > 0)
+ {
+ if (asprintf (&buf, "$6$rounds=%ld$", count) < 0)
+ {
+ if (output_size > 0)
+ output[0] = '\0';
+ errno = ENOMEM;
+ return NULL;
+ }
+ }
+ else
+ {
+ if (asprintf (&buf, "$6$") < 0)
+ {
+ if (output_size > 0)
+ output[0] = '\0';
+ errno = ENOMEM;
+ return NULL;
}
+ }
- return output;
+ if (size < 3 || output_size < (int)strlen (buf) + 4 + 1)
+ {
+ free (buf);
+ if (output_size > 0)
+ output[0] = '\0';
+ __set_errno(ERANGE);
+ return NULL;
+ }
+
+ value = (unsigned long)(unsigned char)input[0] |
+ ((unsigned long)(unsigned char)input[1] << 8) |
+ ((unsigned long)(unsigned char)input[2] << 16);
+ buf2[0] = _xcrypt_itoa64[value & 0x3f];
+ buf2[1] = _xcrypt_itoa64[(value >> 6) & 0x3f];
+ buf2[2] = _xcrypt_itoa64[(value >> 12) & 0x3f];
+ buf2[3] = _xcrypt_itoa64[(value >> 18) & 0x3f];
+ buf2[4] = '\0';
+
+ if (size >= 6 && output_size >= (int)strlen (buf) + 4 + 4 + 1)
+ {
+ value = (unsigned long)(unsigned char)input[3] |
+ ((unsigned long)(unsigned char)input[4] << 8) |
+ ((unsigned long)(unsigned char)input[5] << 16);
+ buf2[4] = _xcrypt_itoa64[value & 0x3f];
+ buf2[5] = _xcrypt_itoa64[(value >> 6) & 0x3f];
+ buf2[6] = _xcrypt_itoa64[(value >> 12) & 0x3f];
+ buf2[7] = _xcrypt_itoa64[(value >> 18) & 0x3f];
+ buf2[8] = '\0';
+ }
+
+ snprintf (output, output_size, "%s%s", buf, buf2);
+ free (buf);
+
+ return output;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libxcrypt-3.0.2/src/gensalt-test.c new/libxcrypt-3.0.3/src/gensalt-test.c
--- old/libxcrypt-3.0.2/src/gensalt-test.c 2008-07-16 14:21:19.000000000 +0200
+++ new/libxcrypt-3.0.3/src/gensalt-test.c 2008-09-29 11:49:14.000000000 +0200
@@ -83,7 +83,7 @@
}
static char *salt_input[] =
- { "", "$1$", "$2a$" /*, "$5$", "$6$" */ };
+ { "", "$1$", "$2a$" , "$5$", "$6$" };
int
main(void)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libxcrypt-3.0.2/src/xcrypt.c new/libxcrypt-3.0.3/src/xcrypt.c
--- old/libxcrypt-3.0.2/src/xcrypt.c 2008-07-16 14:30:30.000000000 +0200
+++ new/libxcrypt-3.0.3/src/xcrypt.c 2009-10-29 10:04:16.000000000 +0100
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007, 2008 Thorsten Kukuk
+/* Copyright (C) 2007, 2008, 2009 Thorsten Kukuk
Author: Thorsten Kukuk
This program is free software; you can redistribute it and/or modify
@@ -195,11 +195,17 @@
{
if (hash_id[0] == '1') /* Special case: MD5 */
use = _xcrypt_gensalt_md5_rn;
+ else if (hash_id[0] == '5') /* sha256 */
+ use = _xcrypt_gensalt_sha256_rn;
+ else if (hash_id[0] == '6') /* sha512 */
+ use = _xcrypt_gensalt_sha512_rn;
else
use = _xcrypt_gensalt_traditional_rn;
}
else
use = plugin->gensalt_r;
+
+ free (hash_id);
}
else if (prefix[0] == '_')
use = _xcrypt_gensalt_extended_rn;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libxcrypt-3.0.2/src/xcrypt-private.h new/libxcrypt-3.0.3/src/xcrypt-private.h
--- old/libxcrypt-3.0.2/src/xcrypt-private.h 2007-10-30 10:47:49.000000000 +0100
+++ new/libxcrypt-3.0.3/src/xcrypt-private.h 2008-09-28 01:09:49.000000000 +0200
@@ -29,6 +29,14 @@
char *output, int output_size);
extern char *_xcrypt_gensalt_md5_rn (unsigned long count, __const char *input,
int size, char *output, int output_size);
+extern char *_xcrypt_gensalt_sha256_rn (unsigned long count,
+ __const char *input,
+ int size, char *output,
+ int output_size);
+extern char *_xcrypt_gensalt_sha512_rn (unsigned long count,
+ __const char *input,
+ int size, char *output,
+ int output_size);
extern struct crypt_data _ufc_foobar;
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org