From 3ba508ff0c01bde99c45db7a6e228bf81d3c5a55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Sun, 5 May 2019 14:29:14 +0200 Subject: [PATCH] Remove patches applied in upstream tarball --- ...ke_unalignment_test_really_unaligned.patch | 47 ------------------- ...-4.4.5-remove_unneeded_union_keyword.patch | 22 --------- libxcrypt.spec | 2 - 3 files changed, 71 deletions(-) delete mode 100644 libxcrypt-4.4.5-make_unalignment_test_really_unaligned.patch delete mode 100644 libxcrypt-4.4.5-remove_unneeded_union_keyword.patch diff --git a/libxcrypt-4.4.5-make_unalignment_test_really_unaligned.patch b/libxcrypt-4.4.5-make_unalignment_test_really_unaligned.patch deleted file mode 100644 index 07a0df9..0000000 --- a/libxcrypt-4.4.5-make_unalignment_test_really_unaligned.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 9b2e9bd79cb91f50dd713899544423808f932b09 Mon Sep 17 00:00:00 2001 -From: Vitaly Chikunov -Date: Sat, 4 May 2019 21:19:06 +0300 -Subject: [PATCH] crypt-kat: Make unalignment test really unaligned. - -As noted and suggested by Solar. ---- - test/crypt-kat.c | 13 ++++++++----- - 1 file changed, 8 insertions(+), 5 deletions(-) - -diff --git a/test/crypt-kat.c b/test/crypt-kat.c -index 4402e24..19a79b1 100644 ---- a/test/crypt-kat.c -+++ b/test/crypt-kat.c -@@ -200,24 +200,27 @@ static void * - calc_hashes_crypt_r_rn (ARG_UNUSED (void *unused)) - { - char *hash; -- char pass[CRYPT_MAX_PASSPHRASE_SIZE]; -+ union { -+ char pass[CRYPT_MAX_PASSPHRASE_SIZE + 1]; -+ int aligned; -+ } u; - size_t i; - struct crypt_data data; - int status = 0; - - memset (&data, 0, sizeof data); -- memset (pass, 0, CRYPT_MAX_PASSPHRASE_SIZE); -+ memset (u.pass, 0, CRYPT_MAX_PASSPHRASE_SIZE + 1); - for (i = 0; i < ntests; i++) - { -- strncpy(pass + 1, tests[i].input, CRYPT_MAX_PASSPHRASE_SIZE - 1); -+ strncpy(u.pass + 1, tests[i].input, CRYPT_MAX_PASSPHRASE_SIZE); - printf("[%d]: %s %s\n", strlen(tests[i].input), tests[i].input, tests[i].salt); - errno = 0; -- hash = crypt_r (pass + 1, tests[i].salt, &data); -+ hash = crypt_r (u.pass + 1, tests[i].salt, &data); - status |= report_result ("crypt_r", hash, errno, &tests[i], - ENABLE_FAILURE_TOKENS); - - errno = 0; -- hash = crypt_rn (pass + 1, tests[i].salt, &data, (int)sizeof data); -+ hash = crypt_rn (u.pass + 1, tests[i].salt, &data, (int)sizeof data); - status |= report_result ("crypt_rn", hash, errno, &tests[i], false); - } - diff --git a/libxcrypt-4.4.5-remove_unneeded_union_keyword.patch b/libxcrypt-4.4.5-remove_unneeded_union_keyword.patch deleted file mode 100644 index 42f7187..0000000 --- a/libxcrypt-4.4.5-remove_unneeded_union_keyword.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 5cce1ebe4e8e303bab593af694c9d30c51cf5eb4 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= -Date: Sat, 4 May 2019 19:46:16 +0200 -Subject: [PATCH] alg-gost3411-2012-core: Remove unneeded union keyword. - ---- - lib/alg-gost3411-2012-core.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/alg-gost3411-2012-core.c b/lib/alg-gost3411-2012-core.c -index f508ba8..13bb493 100644 ---- a/lib/alg-gost3411-2012-core.c -+++ b/lib/alg-gost3411-2012-core.c -@@ -149,7 +149,7 @@ g(uint512_u *h, const uint512_u *N, const unsigned char *m) - static inline void - stage2(GOST34112012Context *CTX, const unsigned char *data) - { -- union uint512_u m; -+ uint512_u m; - - memcpy(&m, data, sizeof(m)); - g(&(CTX->h), &(CTX->N), (const unsigned char *)&m); diff --git a/libxcrypt.spec b/libxcrypt.spec index 8c0feba..2fb3a8c 100644 --- a/libxcrypt.spec +++ b/libxcrypt.spec @@ -152,8 +152,6 @@ URL: https://github.com/besser82/%{name} Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz # Patch 0000 - 2999: Backported patches from upstream. -Patch0000: %{url}/commit/5cce1ebe4e8e303bab593af694c9d30c51cf5eb4.patch#/%{name}-4.4.5-remove_unneeded_union_keyword.patch -Patch0001: %{url}/commit/9b2e9bd79cb91f50dd713899544423808f932b09.patch#/%{name}-4.4.5-make_unalignment_test_really_unaligned.patch # Patch 3000 - 5999: Backported patches from pull requests.