diff --git a/tboot.changes b/tboot.changes index 48a4291..da97e89 100644 --- a/tboot.changes +++ b/tboot.changes @@ -18,6 +18,8 @@ Wed Oct 10 15:31:57 UTC 2012 - meissner@suse.com new tboot cmdline option "min_ram=0xXXXXXX" Update test-patches/tpm-test.patch to fit in latest code. +- zlib patch upstreamed. + ------------------------------------------------------------------- Thu May 31 13:20:57 CEST 2012 - meissner@suse.de diff --git a/tboot.spec b/tboot.spec index a38cfb2..592fead 100644 --- a/tboot.spec +++ b/tboot.spec @@ -25,7 +25,6 @@ License: BSD-3-Clause Group: Productivity/Security Url: http://sourceforge.net/projects/tboot/ Source0: http://downloads.sourceforge.net/project/tboot/tboot/tboot-%{ver}.tar.gz -Patch0: zlib.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: openssl-devel BuildRequires: trousers-devel @@ -39,7 +38,6 @@ and verified launch of an OS kernel/VMM. %prep %setup -q -n %name-%ver -%patch0 -p1 %build export CFLAGS="$RPM_OPT_FLAGS" diff --git a/zlib.patch b/zlib.patch deleted file mode 100644 index 9cd3cd4..0000000 --- a/zlib.patch +++ /dev/null @@ -1,68 +0,0 @@ -Index: tboot-1.7.0/lcptools/mlehash.c -=================================================================== ---- tboot-1.7.0.orig/lcptools/mlehash.c -+++ tboot-1.7.0/lcptools/mlehash.c -@@ -233,8 +233,8 @@ static void print_dump(uint32_t s, uint3 - */ - static bool read_file(const char *filename, void **buffer, size_t *length) - { -- FILE *fcompressed = NULL; -- FILE *fdecompressed = NULL; -+ gzFile fcompressed = NULL; -+ FILE *fdecompressed = NULL; - struct stat filestat; - char tmpbuffer[1024]; - unsigned long i; -Index: tboot-1.7.0/tb_polgen/commands.c -=================================================================== ---- tboot-1.7.0.orig/tb_polgen/commands.c -+++ tboot-1.7.0/tb_polgen/commands.c -@@ -54,26 +54,31 @@ extern tb_policy_t *g_policy; - static bool hash_file(const char *filename, bool unzip, tb_hash_t *hash) - { - FILE *f; -+ gzFile gf; - static char buf[1024]; - EVP_MD_CTX ctx; - const EVP_MD *md; - int read_cnt; - -- if ( unzip ) -- f = gzopen(filename, "rb"); -- else -+ if ( unzip ) { -+ gf = gzopen(filename, "rb"); -+ if ( gf == NULL ) { -+ error_msg("File %s does not exist\n", filename); -+ return false; -+ } -+ } else { - f = fopen(filename, "rb"); -- -- if ( f == NULL ) { -- error_msg("File %s does not exist\n", filename); -- return false; -+ if ( f == NULL ) { -+ error_msg("File %s does not exist\n", filename); -+ return false; -+ } - } - - md = EVP_sha1(); - EVP_DigestInit(&ctx, md); - do { - if ( unzip ) -- read_cnt = gzread(f, buf, sizeof(buf)); -+ read_cnt = gzread(gf, buf, sizeof(buf)); - else - read_cnt = fread(buf, 1, sizeof(buf), f); - if ( read_cnt == 0 ) -@@ -84,7 +89,7 @@ static bool hash_file(const char *filena - EVP_DigestFinal(&ctx, hash->sha1, NULL); - - if ( unzip ) -- gzclose(f); -+ gzclose(gf); - else - fclose(f); -