Hello community,

here is the log from the commit of package dd_rescue for openSUSE:Leap:15.2 
checked in at 2020-06-04 16:01:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/dd_rescue (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.dd_rescue.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "dd_rescue"

Thu Jun  4 16:01:56 2020 rev:18 rq:810939 version:1.99.8

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/dd_rescue/dd_rescue.changes    2020-01-15 
14:51:58.117472029 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.dd_rescue.new.3606/dd_rescue.changes  
2020-06-04 16:03:31.527490539 +0200
@@ -1,0 +2,47 @@
+Wed May 13 06:30:40 UTC 2020 - Josef Möllers <[email protected]>
+
+- Dropped build dependency on libfallocate-devel as fallocate64 is
+  now in glibc and thus libfallocate is not required any more.
+  [dd_rescue.spec, jsc#SLE-11887]
+
+-------------------------------------------------------------------
+Mon Apr  6 09:17:38 UTC 2020 - Martin Liška <[email protected]>
+
+- Run tests with -fcommon in order to fix boo#1160261.
+
+-------------------------------------------------------------------
+Thu Sep 20 13:16:41 UTC 2018 - [email protected]
+
+- Avoid running dependency generation which can produce spurious errors
+- Use %license
+
+-------------------------------------------------------------------
+Sat May 12 12:06:29 CEST 2018 - [email protected]
+
+- ddr_1998-sysrandom.diff: Use getrandom() decl from sys/random.h.
+- ddr_1998-testhole.diff: Ensure we have a hole before testing hole
+  encryption (fixes bsc#1092758).
+- ddr_1998-ossl11-warn.diff: Avoid warn from memcpy to openssl-1.1
+  to EVPCTX* internals.
+
+-------------------------------------------------------------------
+Tue Apr 17 15:46:16 CEST 2018 - [email protected]
+
+- ddr_1998-alg-caseindep.diff:
+  * Use case-independent matching for algorithm names (hash, crypt).
+- ddr_1998-check-nofail-noxattr.diff:
+  * Make testsuite succeed for builds w/o xattr support. 
+
+-------------------------------------------------------------------
+Sun Dec  3 22:11:29 CET 2017 - [email protected]
+
+- Update to 1.99.8:
+  * Support openssl-1.1 (patch from Marcus Meissner), patch
+    dd_rescue-openssl11.patch has been merged and is thus dropped.
+  * cryptalgo->recycle to reuse crypto context (neeeded for openssl)
+  * Fix memleak in test_aes
+  * Use test_aes in check target to ensure all algorithms work
+  * Use std probe mech in test_aes, so we don't fail with SIGILL
+  * Fix build without openssl
+
+-------------------------------------------------------------------

Old:
----
  dd_rescue-1.99.7.tar.bz2
  dd_rescue-1.99.7.tar.bz2.asc
  dd_rescue-openssl11.patch

New:
----
  dd_rescue-1.99.8.tar.bz2
  dd_rescue-1.99.8.tar.bz2.asc
  ddr_1998-alg-caseindep.diff
  ddr_1998-check-nofail-noxattr.diff
  ddr_1998-ossl11-warn.diff
  ddr_1998-sysrandom.diff
  ddr_1998-testhole.diff

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

Other differences:
------------------
++++++ dd_rescue.spec ++++++
--- /var/tmp/diff_new_pack.MJNyeQ/_old  2020-06-04 16:03:31.995492105 +0200
+++ /var/tmp/diff_new_pack.MJNyeQ/_new  2020-06-04 16:03:31.999492119 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package dd_rescue
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,29 +12,32 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 Name:           dd_rescue
-Version:        1.99.7
+Version:        1.99.8
 Release:        0
 Summary:        Data copying in the presence of I/O Errors
-License:        GPL-2.0 or GPL-3.0
+License:        GPL-2.0-only OR GPL-3.0-only
 Group:          System/Base
-Url:            http://www.garloff.de/kurt/linux/ddrescue/
+URL:            http://www.garloff.de/kurt/linux/ddrescue/
 Source0:        
http://garloff.de/kurt/linux/ddrescue/%{name}-%{version}.tar.bz2
 Source1:        
http://garloff.de/kurt/linux/ddrescue/%{name}-%{version}.tar.bz2.asc
 Source2:        %{name}.keyring
 Source99:       %{name}.changes
-Patch0:         dd_rescue-openssl11.patch
+Patch1:         ddr_1998-alg-caseindep.diff
+Patch2:         ddr_1998-check-nofail-noxattr.diff
+Patch3:         ddr_1998-sysrandom.diff
+Patch4:         ddr_1998-testhole.diff
+Patch5:         ddr_1998-ossl11-warn.diff
 BuildRequires:  autoconf
 BuildRequires:  libattr-devel
-%if 0%{?is_opensuse}
-BuildRequires:  libfallocate-devel
-%endif
 BuildRequires:  lzo-devel
+%if 0%{?suse_version} >= 1200
 BuildRequires:  lzop
+%endif
 BuildRequires:  pkgconfig
 BuildRequires:  python
 Requires:       bc
@@ -46,7 +49,8 @@
 Provides:       ddrescue = %{version}
 Obsoletes:      ddrescue < %{version}
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-BuildRequires:  pkgconfig(libcrypto)
+#BuildRequires:  pkgconfig(libcrypto)
+BuildRequires:  libopenssl-devel
 
 %description
 dd_rescue helps when nothing else can: your disk has crashed and you
@@ -111,10 +115,11 @@
 
 %prep
 %setup -q
-if pkg-config --atleast-version=1.1.0 libssl; then
-%patch0 -p1
-fi
-
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
 # Remove build time references so build-compare can do its work
 FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{SOURCE99} '+%%H:%%M')
 FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{SOURCE99} '+%%b %%e %%Y')
@@ -125,6 +130,8 @@
 autoheader
 autoconf
 %configure
+# avoid running dependency generation step
+touch .dep
 make RPM_OPT_FLAGS="%{optflags}" LIBDIR=%{_libdir} LIB=%{_lib} %{?_smp_mflags}
 
 %install
@@ -135,11 +142,12 @@
 ln -sf %{_bindir}/dd_rescue %{buildroot}/bin
 
 %check
-make %{?_smp_mflags} check
+make %{?_smp_mflags} RPM_OPT_FLAGS="%{optflags} -fcommon" check
 
 %files
 %defattr(-,root,root,-)
-%doc COPYING README.dd_rescue TODO
+%doc README.dd_rescue TODO
+%license COPYING
 %{_bindir}/dd_rescue
 /bin/dd_rescue
 %{_libdir}/libddr_hash.so

++++++ dd_rescue-1.99.7.tar.bz2 -> dd_rescue-1.99.8.tar.bz2 ++++++
++++ 2331 lines of diff (skipped)


++++++ ddr_1998-alg-caseindep.diff ++++++
commit 604e57678ed50ee88ea20d82c98bf7ba53db76c1
Author: Kurt Garloff <[email protected]>
Date:   Thu Feb 8 10:41:25 2018 +0100

    Case insensitivity for crypt algos, help, debug.
    
    This makes it a bit easier to specify things correctly.

diff --git a/aes.c b/aes.c
index 33906b0..2784006 100644
--- a/aes.c
+++ b/aes.c
@@ -449,7 +449,7 @@ ciph_desc_t *findalg(ciph_desc_t* list, const char* nm, 
const char probe)
 {
        ciph_desc_t* alg = list;
        while (alg->name) {
-               if (!strcmp(alg->name, nm)) {
+               if (!strcasecmp(alg->name, nm)) {
                        if (!probe || !alg->probe)
                                return alg;
                        return (alg->probe()? NULL: alg);
diff --git a/libddr_crypt.c b/libddr_crypt.c
index 0d2e77f..1d9d4a0 100644
--- a/libddr_crypt.c
+++ b/libddr_crypt.c
@@ -158,7 +158,7 @@ int set_alg(crypt_state* state, const char* algnm)
                        FPLOG(FATAL, "Don't understand option (alg?) %s\n", 
algnm);
                return -1;
        }
-       if (!strcmp(algnm, "help")) {
+       if (!strcasecmp(algnm, "help")) {
                FPLOG(INFO, "Crypto algorithms:", NULL);
                ciph_desc_t *alg;
                for (alg = state->engine; alg->name != NULL; ++alg)
@@ -218,28 +218,28 @@ int crypt_plug_init(void **stat, char* param, int seq, 
const opt_t *opt)
                        param = next;
                        continue;
                }
-               if (!strcmp(param, "help")) {
+               if (!strcasecmp(param, "help")) {
                        FPLOG(INFO, "%s", crypt_help);
                        return -1;
-               } else if (!strcmp(param, "debug"))
+               } else if (!strcasecmp(param, "debug"))
                        state->debug = 1;
                else if (!strcmp(param, "encrypt") || !strcmp(param, "enc"))
                        state->enc = 1;
                else if (!strcmp(param, "decrypt") || !strcmp(param, "dec"))
                        state->enc = 0;
                else if (!memcmp(param, "engine=", 7)) {
-                       if (!strcmp(param+7, "aes_c"))
+                       if (!strcasecmp(param+7, "aes_c"))
                                state->engine = AES_C_Methods;
 #ifdef HAVE_AES_ARM64
-                       else if (!strcmp(param+7, "aesarm64"))
+                       else if (!strcasecmp(param+7, "aesarm64"))
                                state->engine = AES_ARM8_Methods;
 #endif
 #ifdef HAVE_AESNI
-                       else if (!strcmp(param+7, "aesni"))
+                       else if (!strcasecmp(param+7, "aesni"))
                                state->engine = AESNI_Methods;
 #endif
 #ifdef HAVE_LIBCRYPTO
-                       else if (!strcmp(param+7, "openssl"))
+                       else if (!strcasecmp(param+7, "openssl"))
                                state->engine = AES_OSSL_Methods;
 #endif
                        else {
@@ -257,11 +257,11 @@ int crypt_plug_init(void **stat, char* param, int seq, 
const opt_t *opt)
                else if (!memcmp(param, "alg=", 4))
                        err += set_alg(state, param+4);
                else if (!memcmp(param, "pad=", 4)) {
-                       if (!strcmp(param+4, "zero"))
+                       if (!strcasecmp(param+4, "zero"))
                                state->pad = PAD_ZERO;
-                       else if (!strcmp(param+4, "always"))
+                       else if (!strcasecmp(param+4, "always"))
                                state->pad = PAD_ALWAYS;
-                       else if (!strcmp(param+4, "asneeded"))
+                       else if (!strcasecmp(param+4, "asneeded"))
                                state->pad = PAD_ASNEEDED;
                        else {
                                FPLOG(FATAL, "Illegal padding %s: Specify 
zero/always/asneeded!\n",
@@ -401,8 +401,10 @@ int crypt_plug_init(void **stat, char* param, int seq, 
const opt_t *opt)
        }
        /* 1st: Set engine: Default: aesni/aes_c: Done */
        /* 2nd: Set alg: Already done if set explicitly */
-       if (!err && !state->alg)
+       if (!err && !state->alg) {
                state->alg = findalg(state->engine, "AES192-CTR", 0);
+               FPLOG(INFO, "Using default algorithm AES192-CTR\n", NULL);
+       }
        if (!state->alg)
                return -1;
 
diff --git a/libddr_hash.c b/libddr_hash.c
index 7c8cdf8..b6634ff 100644
--- a/libddr_hash.c
+++ b/libddr_hash.c
@@ -120,7 +120,7 @@ static loff_t readint(const char* const ptr)
 hashalg_t *get_hashalg(hash_state *state, const char* nm)
 {
        unsigned int i;
-       const char help = !strcmp(nm, "help");
+       const char help = !strcasecmp(nm, "help");
        if (help)
                FPLOG(INFO, "Supported algorithms:");
        for (i = 0; i < sizeof(hashes)/sizeof(hashalg_t); ++i) {
@@ -154,10 +154,10 @@ int hash_plug_init(void **stat, char* param, int seq, 
const opt_t *opt)
                char* next = strchr(param, ':');
                if (next)
                        *next++ = 0;
-               if (!strcmp(param, "help"))
+               if (!strcasecmp(param, "help"))
                        FPLOG(INFO, "%s", hash_help);
                
-               else if (!strcmp(param, "debug"))
+               else if (!strcasecmp(param, "debug"))
                        state->debug = 1;
                else if (!strcmp(param, "output"))
                        state->outfd = 1;
++++++ ddr_1998-check-nofail-noxattr.diff ++++++
commit 7944395ea224067e54f1a094ee91b20b93f5ef65
Author: Kurt Garloff <[email protected]>
Date:   Sun Apr 15 11:58:59 2018 +0200

    Avoid check fail if dd_rescue was built w/o xattr support.

diff --git a/Makefile b/Makefile
index 6c9f958..5d81353 100644
--- a/Makefile
+++ b/Makefile
@@ -63,6 +63,12 @@ else
   HAVE_OPENSSL=0
 endif
 
+ifeq ($(shell grep 'HAVE_ATTR_XATTR_H 1' config.h >/dev/null 2>&1 && echo 1), 
1)
+  HAVE_XATTR=1
+else
+  HAVE_XATTR=0
+endif
+
 ifeq ($(CC),wcl386)
   CFLAGS = "-ox -wx $(EXTRA_CFLAGS)"
   DEFINES = -dMISS_STRSIGNAL -dMISS_PREAD -dVERSION=\"$(VERSION)\" 
-d__COMPILER__="\"$(COMPILER)\""
@@ -493,15 +499,9 @@ check: $(TARGETS) find_nonzero md5 sha1 sha256 sha512 
fmt_no
        #if test $(HAVE_LZO) = 1; then $(MAKE) check_lzo_test; fi
        if test $(HAVE_LZO) = 1; then $(MAKE) check_lzo_fuzz; fi
        # Tests for libddr_null
-       $(VG) ./dd_rescue -L ./libddr_null.so=debug dd_rescue /dev/null
-       # Tests with hash set_xattr and chk_xattr (with fallback as not all 
filesystems support xattrs ...)
-       $(VG) ./dd_rescue -tL ./libddr_hash.so=sha256:set_xattr:fallback 
dd_rescue /tmp/dd_rescue
-       $(VG) ./dd_rescue -L ./libddr_hash.so=sha256:chk_xattr:fallback 
/tmp/dd_rescue /dev/null
-       rm -f /tmp/dd_rescue CHECKSUMS.sha256
-       # Tests with prepend and append
-       $(VG) ./dd_rescue -tL 
./libddr_hash.so=sha512:set_xattr:fallback:prepend=abc:append=xyz dd_rescue 
/tmp/dd_rescue
-       $(VG) ./dd_rescue  -L ./libddr_hash.so=sha512:chk_xattr:fallback 
/tmp/dd_rescue /dev/null && false || true
-       $(VG) ./dd_rescue  -L 
./libddr_hash.so=sha512:chk_xattr:fallback:prepend=abc:append=xyz 
/tmp/dd_rescue /dev/null
+       $(VG) ./dd_rescue  -L ./libddr_null.so=debug dd_rescue /dev/null
+       # Hash tests with set_xattr and chk_xattr
+       if test $(HAVE_XATTR) = 1; then $(MAKE) check_xattr_storehash; fi
        # Extra xattrs (should be preserved)
        #make check_xattr_copy
        # Tests with HMAC
@@ -514,6 +514,15 @@ check: $(TARGETS) find_nonzero md5 sha1 sha256 sha512 
fmt_no
        #$(MAKE) check_aes
        $(MAKE) check_crypt
 
+check_xattr_storehash: $(TARGETS)
+       # Tests with hash set_xattr and chk_xattr (with fallback as not all 
filesystems support xattrs ...)
+       $(VG) ./dd_rescue -tL ./libddr_hash.so=sha256:set_xattr:fallback 
dd_rescue /tmp/dd_rescue
+       $(VG) ./dd_rescue  -L ./libddr_hash.so=sha256:chk_xattr:fallback 
/tmp/dd_rescue /dev/null
+       rm -f /tmp/dd_rescue CHECKSUMS.sha256
+       # Tests with prepend and append
+       $(VG) ./dd_rescue -tL 
./libddr_hash.so=sha512:set_xattr:fallback:prepend=abc:append=xyz dd_rescue 
/tmp/dd_rescue
+       $(VG) ./dd_rescue  -L ./libddr_hash.so=sha512:chk_xattr:fallback 
/tmp/dd_rescue /dev/null && false || true
+       $(VG) ./dd_rescue  -L 
./libddr_hash.so=sha512:chk_xattr:fallback:prepend=abc:append=xyz 
/tmp/dd_rescue /dev/null
 
 # FIXME: This fails on filesystems without xattr support - disabled until we 
know how to handle this
 check_xattr_copy: $(TARGETS)
commit 919323921daed3afc339079378d1af58f0252840
Author: Kurt Garloff <[email protected]>
Date:   Sun Apr 15 17:04:03 2018 +0200

    Also avoid xattr usage in test_crypt.sh if not supported.

diff --git a/test_crypt.sh b/test_crypt.sh
index 0aef640..47f1fc9 100755
--- a/test_crypt.sh
+++ b/test_crypt.sh
@@ -170,10 +170,12 @@ done
 echo "*** Salt and XAttrs ***"
 # Use random numbers and write to binary file
 enc_dec_compare dd_rescue AES192-CTR saltgen pass=PWD_:pbkdf2:saltfile=SALT
-# Use random numbers and write to xattr, fall back to saltsfile
-enc_dec_compare dd_rescue AES192-CTR saltgen 
pass=PSWD:pbkdf2:saltxattr:sxfallback
-# Save key and IV to xattrs
-enc_dec_compare dd_rescue AES192-CTR keygen:ivgen 
keyxattr:kxfallb:ivxattr:ixfallb
+if grep 'define HAVE_ATTR_XATTR_H 1' config.h >/dev/null 2>&1 ; then
+  # Use random numbers and write to xattr, fall back to saltsfile
+  enc_dec_compare dd_rescue AES192-CTR saltgen 
pass=PSWD:pbkdf2:saltxattr:sxfallback
+  # Save key and IV to xattrs
+  enc_dec_compare dd_rescue AES192-CTR keygen:ivgen 
keyxattr:kxfallb:ivxattr:ixfallb
+fi
 
 HAVE_AESNI=`grep " sse4" /proc/cpuinfo 2>/dev/null | grep " aes " 2>/dev/null`
 HAVE_AESARM=`grep " pmull " /proc/cpuinfo 2>/dev/null`
++++++ ddr_1998-ossl11-warn.diff ++++++
commit fb27151be814b0bfbe05f81754f754c7ff8b14d7
Author: Kurt Garloff <[email protected]>
Date:   Sat May 12 09:57:23 2018 +0000

    Avoid compiler warnings.

diff --git a/aes_ossl11.c b/aes_ossl11.c
index b10f157..66cfbd4 100644
--- a/aes_ossl11.c
+++ b/aes_ossl11.c
@@ -101,8 +101,8 @@ int AES_OSSL_##BITCHAIN##_Encrypt(const unsigned char* ctx, 
unsigned int rounds,
        EVP_CIPHER_CTX **evpctx = (EVP_CIPHER_CTX**)ctx;        \
        EVP_CIPHER_CTX_set_padding(evpctx[0], DOPAD? pad: 0);   \
        if (IV) {                                               \
-               memcpy(EVP_CIPHER_CTX_original_iv(evpctx[0]), iv, 16);  \
-               memcpy(EVP_CIPHER_CTX_iv_noconst(evpctx[0]), iv, 16);   \
+               memcpy((void*)EVP_CIPHER_CTX_original_iv(evpctx[0]), iv, 16);   
\
+               memcpy((void*)EVP_CIPHER_CTX_iv_noconst(evpctx[0]), iv, 16);    
\
        }                                                       \
                if (DOPAD && !pad && (len&15)) {                        \
                ores = EVP_EncryptUpdate(evpctx[0], out, &olen, in, 
len-(len&15));      \
@@ -143,8 +143,8 @@ int AES_OSSL_##BITCHAIN##_Decrypt(const unsigned char* ctx, 
unsigned int rounds,
        EVP_CIPHER_CTX **evpctx = (EVP_CIPHER_CTX**)ctx;        \
        EVP_CIPHER_CTX_set_padding(evpctx[0], DOPAD && pad != 
PAD_ASNEEDED?pad:0);      \
        if (IV) {                                               \
-               memcpy(EVP_CIPHER_CTX_original_iv(evpctx[0]), iv, 16);  \
-               memcpy(EVP_CIPHER_CTX_iv_noconst(evpctx[0]), iv, 16);   \
+               memcpy((void*)EVP_CIPHER_CTX_original_iv(evpctx[0]), iv, 16);   
\
+               memcpy((void*)EVP_CIPHER_CTX_iv_noconst(evpctx[0]), iv, 16);    
\
        }                                                       \
        if (DOPAD && pad == PAD_ASNEEDED) {                     \
                int olen1;                                      \
@@ -310,10 +310,10 @@ int  AES_OSSL_##BITCHAIN##_EncryptX2(const unsigned char* 
ctx, unsigned int roun
        EVP_CIPHER_CTX_set_padding(evpctx[0], pad);             \
        EVP_CIPHER_CTX_set_padding(evpctx[1], 0);               \
        if (IV) {                                               \
-               memcpy(EVP_CIPHER_CTX_original_iv(evpctx[0]), iv, 16);  \
-               memcpy(EVP_CIPHER_CTX_iv_noconst(evpctx[0]), iv, 16);   \
-               memcpy(EVP_CIPHER_CTX_original_iv(evpctx[1]), iv, 16);  \
-               memcpy(EVP_CIPHER_CTX_iv_noconst(evpctx[1]), iv, 16);   \
+               memcpy((void*)EVP_CIPHER_CTX_original_iv(evpctx[0]), iv, 16);   
\
+               memcpy((void*)EVP_CIPHER_CTX_iv_noconst(evpctx[0]), iv, 16);    
\
+               memcpy((void*)EVP_CIPHER_CTX_original_iv(evpctx[1]), iv, 16);   
\
+               memcpy((void*)EVP_CIPHER_CTX_iv_noconst(evpctx[1]), iv, 16);    
\
        }                                                       \
                if (!pad && (len&15)) {                                 \
                ores = EVP_EncryptUpdate(evpctx[0], out, &olen, in, 
len-(len&15));      \
@@ -353,10 +353,10 @@ int  AES_OSSL_##BITCHAIN##_DecryptX2(const unsigned char* 
ctx, unsigned int roun
        EVP_CIPHER_CTX_set_padding(evpctx[1], 0);               \
        EVP_CIPHER_CTX_set_padding(evpctx[0], pad==PAD_ASNEEDED? 0: pad);       
\
        if (IV) {                                               \
-               memcpy(EVP_CIPHER_CTX_original_iv(evpctx[1]), iv, 16);  \
-               memcpy(EVP_CIPHER_CTX_iv_noconst(evpctx[1]), iv, 16);   \
-               memcpy(EVP_CIPHER_CTX_original_iv(evpctx[0]), iv, 16);  \
-               memcpy(EVP_CIPHER_CTX_iv_noconst(evpctx[0]), iv, 16);   \
+               memcpy((void*)EVP_CIPHER_CTX_original_iv(evpctx[1]), iv, 16);   
\
+               memcpy((void*)EVP_CIPHER_CTX_iv_noconst(evpctx[1]), iv, 16);    
\
+               memcpy((void*)EVP_CIPHER_CTX_original_iv(evpctx[0]), iv, 16);   
\
+               memcpy((void*)EVP_CIPHER_CTX_iv_noconst(evpctx[0]), iv, 16);    
\
        }                                                       \
        ores = EVP_DecryptUpdate(evpctx[1], out, &olen, in, rlen);      \
        assert(ores);                                           \
++++++ ddr_1998-sysrandom.diff ++++++
commit f31f00876bd7a1b6a64580138d5208f01dfa81ab
Author: Kurt Garloff <[email protected]>
Date:   Sat May 12 09:34:22 2018 +0000

    Use sys/random.h for getrandom() decl if present.

diff --git a/configure.in b/configure.in
index af1ef75..d9b6950 100644
--- a/configure.in
+++ b/configure.in
@@ -6,7 +6,7 @@ AC_C_INLINE
 AC_HEADER_STDC
 #AC_PROG_INSTALL
 #CFLAGS="$CFLAGS -DHAVE_CONFIG_H"
-AC_CHECK_HEADERS([fallocate.h dlfcn.h unistd.h attr/xattr.h sys/acl.h 
sys/ioctl.h endian.h linux/fs.h linux/fiemap.h stdint.h lzo/lzo1x.h 
openssl/evp.h linux/random.h malloc.h sched.h sys/statvfs.h])
+AC_CHECK_HEADERS([fallocate.h dlfcn.h unistd.h attr/xattr.h sys/acl.h 
sys/ioctl.h endian.h linux/fs.h linux/fiemap.h stdint.h lzo/lzo1x.h 
openssl/evp.h linux/random.h sys/random.h malloc.h sched.h sys/statvfs.h])
 AC_CHECK_FUNCS([ffs ffsl basename fallocate64 splice getopt_long open64 pread 
pread64 lseek64 stat64 posix_fadvise posix_fadvise64 __builtin_prefetch htobe64 
feof_unlocked getline getentropy getrandom posix_memalign valloc sched_yield 
fstatvfs __builtin_cpu_supports])
 AC_CHECK_LIB(dl,dlsym)
 AC_CHECK_LIB(fallocate,linux_fallocate64)
diff --git a/random.c b/random.c
index e558bed..9b2304c 100644
--- a/random.c
+++ b/random.c
@@ -22,6 +22,9 @@ typedef unsigned int __u32;
 #ifdef HAVE_LINUX_RANDOM_H
 #include <linux/random.h>
 #endif
+#ifdef HAVE_SYS_RANDOM_H
+#include <sys/random.h>
+#endif
 
 static void msleep(unsigned int msecs)
 {
++++++ ddr_1998-testhole.diff ++++++
commit 7f2ff6434586083747bc5d046e0207886025e684
Author: Kurt Garloff <[email protected]>
Date:   Sat May 12 09:54:45 2018 +0000

    Fix test case by ensuring there is a hole ...

diff --git a/test_crypt.sh b/test_crypt.sh
index 47f1fc9..62cf853 100755
--- a/test_crypt.sh
+++ b/test_crypt.sh
@@ -52,13 +52,20 @@ rm dd_rescue2
 
 # Holes (all), skiphole
 echo "*** Holes ***"
+# Produce file that consists of dd_rescue + hole + dd_rescue
 ./dd_rescue -qpt dd_rescue dd_rescue3
 ./dd_rescue -qS 512k dd_rescue dd_rescue3
+# Ensure there is a hole even if dd_rescue is long
+./dd_rescue -qS 384k -m 128k /dev/zero dd_rescue3
+# Test without and with skiphole
 enc_dec_compare_keys dd_rescue3 AES192-CTR keygen:ivgen "" "" "-qpt"
 enc_dec_compare_keys dd_rescue3 AES192-CTR keygen:ivgen skiphole "" "-qpt"
+# Store 384k-512k in cmp3
 ./dd_rescue -qt -s 384k -m 128k -S 0 dd_rescue3.cmp dd_rescue3.cmp3
+# Should be 128k of zeroes
 ./dd_rescue -qm 128k /dev/zero dd_rescue3.cmp2
 cmp dd_rescue3.cmp2 dd_rescue3.cmp3 || exit 4
+# Repeat test with reverse
 enc_dec_compare_keys dd_rescue3 AES192-CTR keygen:ivgen "" "" "-qptr"
 enc_dec_compare_keys dd_rescue3 AES192-CTR keygen:ivgen skiphole "" "-qptr"
 ./dd_rescue -qt -s 384k -m 128k -S 0 dd_rescue3.cmp dd_rescue3.cmp3

Reply via email to