Revert backward incompatible change that removes default object attributes

The tpm2-tools 3.1.0 release contains a backward incompatible change that
was introduced by commit e103bbf5117 ("objectattrs: clear before or'ing
in values"), that changed the way that object attributes were specified.

Before there were a set of default attributes and the user could specify
additional attributes to be used, but after the mentioned commit the user
must specify all attributes.

This is a user visible change that changes the tools semantics, so is not
a suitable change for a MINOR version number increment, according to the
Semantic Versioning document (https://semver.org) since it breaks rule 2:

2.MINOR version when you add functionality in a backwards-compatible manner

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
This commit is contained in:
Javier Martinez Canillas 2018-07-14 10:41:58 +02:00
parent d8e8b37b3c
commit 58cab6daaa
No known key found for this signature in database
GPG Key ID: C751E590D63F3D69
2 changed files with 49 additions and 1 deletions

View File

@ -0,0 +1,43 @@
From 1f3451ee7b046a590b6dfc20b6af010166670ff7 Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <javierm@redhat.com>
Date: Thu, 12 Jul 2018 19:50:26 +0200
Subject: [PATCH 1/1] Revert "objectattrs: clear before or'ing in values"
This reverts commit e103bbf5117b0b62b358fd15f18f848854fcb0ee.
The tpm2-tools 3.1.0 release contains a backward incompatible change that
was introduced by commit e103bbf5117 ("objectattrs: clear before or'ing
in values"), that changed the way that object attributes were specified.
Before there were a set of default attributes and the user could specify
additional attributes to be used, but after the mentioned commit the user
must specify all attributes.
This is a user visible change that changes the tools semantics, so is not
a suitable change for a MINOR version number increment, according to the
Semantic Versioning document (https://semver.org) since it breaks rule 2:
2.MINOR version when you add functionality in a backwards-compatible manner
Fixes: #1097
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
lib/tpm2_attr_util.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/lib/tpm2_attr_util.c b/lib/tpm2_attr_util.c
index d461a744c0d..e43d03f9e0a 100644
--- a/lib/tpm2_attr_util.c
+++ b/lib/tpm2_attr_util.c
@@ -501,7 +501,6 @@ bool tpm2_attr_util_nv_strtoattr(char *attribute_list, TPMA_NV *nvattrs) {
bool tpm2_attr_util_obj_strtoattr(char *attribute_list, TPMA_OBJECT *objattrs) {
- memset(objattrs, 0, sizeof(*objattrs));
return common_strtoattr(attribute_list, objattrs, obj_attr_table, ARRAY_LEN(obj_attr_table));
}
--
2.17.1

View File

@ -1,12 +1,14 @@
Name: tpm2-tools
Version: 3.1.1
Release: 2%{?dist}
Release: 3%{?dist}
Summary: A TPM2.0 testing tool build upon TPM2.0-TSS
License: BSD
URL: https://github.com/tpm2-software/tpm2-tools
Source0: https://github.com/tpm2-software/tpm2-tools/releases/download/%{version}/%{name}-%{version}.tar.gz
Patch0: Revert-objectattrs-clear-before-or-ing-in-values.patch
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: autoconf-archive
@ -44,6 +46,9 @@ tpm2-tools is a batch of testing tools for tpm2.0. It is based on tpm2-tss.
%{_mandir}/man1/tpm2_*.1.gz
%changelog
* Sat Jul 14 2018 Javier Martinez Canillas <javierm@redhat.com> - - 3.1.1-3
- Revert backward incompatible change that removes default object attributes
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild