Add two upstream patches with minor fixes
This commit is contained in:
parent
212efbeb18
commit
54f75f025e
27
libxcrypt-4.3.3-alg_sha512_make_PAD_const.patch
Normal file
27
libxcrypt-4.3.3-alg_sha512_make_PAD_const.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
From 5e9199f293473a0c14f836b3df8ecf6aeed1e315 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Zack Weinberg <zackw@panix.com>
|
||||||
|
Date: Mon, 12 Nov 2018 11:17:01 -0500
|
||||||
|
Subject: [PATCH] alg-sha512.c: Make PAD const.
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
This object is only ever read, not written, and the code expects it
|
||||||
|
won’t ever change.
|
||||||
|
---
|
||||||
|
alg-sha512.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/alg-sha512.c b/alg-sha512.c
|
||||||
|
index 8913da3..d3e83b3 100644
|
||||||
|
--- a/alg-sha512.c
|
||||||
|
+++ b/alg-sha512.c
|
||||||
|
@@ -204,7 +204,7 @@ SHA512_Transform(uint64_t * state, const unsigned char block[SHA512_BLOCK_LENGTH
|
||||||
|
state[i] += S[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
-static unsigned char PAD[SHA512_BLOCK_LENGTH] = {
|
||||||
|
+static const unsigned char PAD[SHA512_BLOCK_LENGTH] = {
|
||||||
|
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
36
libxcrypt-4.3.3-skip_bcrypt_test_if_not_enabled.patch
Normal file
36
libxcrypt-4.3.3-skip_bcrypt_test_if_not_enabled.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
From 65485d7891cfe50db941ab14e864bb485a54d71c Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
|
||||||
|
Date: Wed, 14 Nov 2018 11:44:08 +0100
|
||||||
|
Subject: [PATCH] Skip test-crypt-bcrypt, if no bcrypt method was enabled.
|
||||||
|
|
||||||
|
---
|
||||||
|
test-crypt-bcrypt.c | 12 ++++++++++++
|
||||||
|
1 file changed, 12 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/test-crypt-bcrypt.c b/test-crypt-bcrypt.c
|
||||||
|
index 9192530..947639f 100644
|
||||||
|
--- a/test-crypt-bcrypt.c
|
||||||
|
+++ b/test-crypt-bcrypt.c
|
||||||
|
@@ -20,6 +20,8 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
+#if INCLUDE_bcrypt || INCLUDE_bcrypt_a || INCLUDE_bcrypt_x || INCLUDE_bcrypt_y
|
||||||
|
+
|
||||||
|
static const char *tests[][3] =
|
||||||
|
{
|
||||||
|
#if INCLUDE_bcrypt_a
|
||||||
|
@@ -270,3 +272,13 @@ main (void)
|
||||||
|
free (data);
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+#else
|
||||||
|
+
|
||||||
|
+int
|
||||||
|
+main (void)
|
||||||
|
+{
|
||||||
|
+ return 77; /* UNSUPPORTED */
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#endif /* INCLUDE_bcrypt* */
|
@ -90,7 +90,7 @@ fi \
|
|||||||
|
|
||||||
Name: libxcrypt
|
Name: libxcrypt
|
||||||
Version: 4.3.3
|
Version: 4.3.3
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: Extended crypt library for DES, MD5, Blowfish and others
|
Summary: Extended crypt library for DES, MD5, Blowfish and others
|
||||||
|
|
||||||
# For explicit license breakdown, see the
|
# For explicit license breakdown, see the
|
||||||
@ -100,6 +100,8 @@ URL: https://github.com/besser82/%{name}
|
|||||||
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
# Patch 0001 - 3000: Backported patches from upstream.
|
# Patch 0001 - 3000: Backported patches from upstream.
|
||||||
|
Patch0001: %{url}/commit/5e9199f293473a0c14f836b3df8ecf6aeed1e315.patch#/%{name}-4.3.3-alg_sha512_make_PAD_const.patch
|
||||||
|
Patch0002: %{url}/commit/65485d7891cfe50db941ab14e864bb485a54d71c.patch#/%{name}-4.3.3-skip_bcrypt_test_if_not_enabled.patch
|
||||||
|
|
||||||
# Patch 3001 - 6000: Backported patches from pull requests.
|
# Patch 3001 - 6000: Backported patches from pull requests.
|
||||||
|
|
||||||
@ -347,6 +349,9 @@ done
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Nov 14 2018 Björn Esser <besser82@fedoraproject.org> - 4.3.3-3
|
||||||
|
- Add two upstream patches with minor fixes
|
||||||
|
|
||||||
* Tue Nov 13 2018 Björn Esser <besser82@fedoraproject.org> - 4.3.3-2
|
* Tue Nov 13 2018 Björn Esser <besser82@fedoraproject.org> - 4.3.3-2
|
||||||
- Add a patch to define crypt_gensalt_r as macro, so applications
|
- Add a patch to define crypt_gensalt_r as macro, so applications
|
||||||
link the identical crypt_gensalt_rn directly
|
link the identical crypt_gensalt_rn directly
|
||||||
|
Loading…
Reference in New Issue
Block a user