|
|
5c89e2 |
From 9c4a30c22725948537911dafa664d3741fd0249b Mon Sep 17 00:00:00 2001
|
|
|
5c89e2 |
From: Javier Martinez Canillas <javierm@redhat.com>
|
|
|
5c89e2 |
Date: Wed, 4 Jul 2018 16:04:15 +0200
|
|
|
5c89e2 |
Subject: [PATCH 1/1] tcti-dynamic: Make the tss2 device TCTI library SONAME
|
|
|
5c89e2 |
the default
|
|
|
5c89e2 |
|
|
|
5c89e2 |
The raw libtss2-tcti-device.so is only included in the development package
|
|
|
5c89e2 |
but the tpm2-abrmd tries to dynamically load this instead of the library's
|
|
|
5c89e2 |
SONAME which is included in the tpm2-tss package.
|
|
|
5c89e2 |
|
|
|
5c89e2 |
This was reported in [0] and partially fixed by the commit d2f0b2d1f0f
|
|
|
5c89e2 |
("tcti-util: Use proper SONAME for TCTI dlopen"). But I still needed these
|
|
|
5c89e2 |
changes so the tpm2-abrmd daemon could lookup the correct library name.
|
|
|
5c89e2 |
|
|
|
5c89e2 |
[0]: https://lists.01.org/pipermail/tpm2/2018-May/000700.html
|
|
|
5c89e2 |
|
|
|
5c89e2 |
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
|
|
|
5c89e2 |
---
|
|
|
5c89e2 |
man/tpm2-abrmd.8.in | 12 ++++++------
|
|
|
5c89e2 |
src/tabrmd.h | 2 +-
|
|
|
5c89e2 |
src/tcti-dynamic.c | 2 +-
|
|
|
5c89e2 |
src/tcti-dynamic.h | 2 +-
|
|
|
5c89e2 |
4 files changed, 9 insertions(+), 9 deletions(-)
|
|
|
5c89e2 |
|
|
|
5c89e2 |
diff --git a/man/tpm2-abrmd.8.in b/man/tpm2-abrmd.8.in
|
|
|
5c89e2 |
index c745a7e5eac..e02cbf44a16 100644
|
|
|
5c89e2 |
--- a/man/tpm2-abrmd.8.in
|
|
|
5c89e2 |
+++ b/man/tpm2-abrmd.8.in
|
|
|
5c89e2 |
@@ -25,7 +25,7 @@ is formatted as "tcti-name:tcti-conf" where:
|
|
|
5c89e2 |
.IP 'tcti-name'
|
|
|
5c89e2 |
The name of the TCTI library shared object file. Libraries are found using
|
|
|
5c89e2 |
the same algorithm as dlopen (3). If the TCTI library file name follows the
|
|
|
5c89e2 |
-naming convention: \fBlibtss2-tcti-<name>.so\fR where <name> is the name for
|
|
|
5c89e2 |
+naming convention: \fBlibtss2-tcti-<name>.so.0\fR where <name> is the name for
|
|
|
5c89e2 |
the TCTI, the value of \fB<name>\fR may be supplied in place of the full
|
|
|
5c89e2 |
library file name. See 'EXAMPLES' below.
|
|
|
5c89e2 |
.IP 'tcti-conf'
|
|
|
5c89e2 |
@@ -89,21 +89,21 @@ Execute daemon with default TCTI and provided config string:
|
|
|
5c89e2 |
This is equivalent to:
|
|
|
5c89e2 |
.B tpm2-abrmd --tcti="device:/dev/tpm0"
|
|
|
5c89e2 |
.br
|
|
|
5c89e2 |
-.B tpm2-abrmd --tcti="libtss2-tcti-device.so:/dev/tpm0"
|
|
|
5c89e2 |
+.B tpm2-abrmd --tcti="libtss2-tcti-device.so.0:/dev/tpm0"
|
|
|
5c89e2 |
.TP
|
|
|
5c89e2 |
Have daemon use Microsoft/IBM TPM2 Simulator tcti library
|
|
|
5c89e2 |
-'libtss2-tcti-mssim.so'.
|
|
|
5c89e2 |
+'libtss2-tcti-mssim.so.0'.
|
|
|
5c89e2 |
This connects to a TPM2 simulator via a TCP mssim.
|
|
|
5c89e2 |
.br
|
|
|
5c89e2 |
.B tpm2-abrmd --tcti="mssim"
|
|
|
5c89e2 |
.br
|
|
|
5c89e2 |
-.B tpm2-abrmd --tcti="libtss2-tcti-mssim.so"
|
|
|
5c89e2 |
+.B tpm2-abrmd --tcti="libtss2-tcti-mssim.so.0"
|
|
|
5c89e2 |
.TP
|
|
|
5c89e2 |
-Have daemon use tcti library 'libtss2-tcti-mssim.so' and config string
|
|
|
5c89e2 |
+Have daemon use tcti library 'libtss2-tcti-mssim.so.0' and config string
|
|
|
5c89e2 |
'tcp://127.0.0.1:5555':
|
|
|
5c89e2 |
.B tpm2-abrmd --tcti=mssim:tcp://127.0.0.1:5555"
|
|
|
5c89e2 |
.br
|
|
|
5c89e2 |
-.B tpm2-abrmd --tcti="libtss2-tcti-mssim.so:tcp://127.0.0.1:5555"
|
|
|
5c89e2 |
+.B tpm2-abrmd --tcti="libtss2-tcti-mssim.so.0:tcp://127.0.0.1:5555"
|
|
|
5c89e2 |
.SH AUTHOR
|
|
|
5c89e2 |
Philip Tricca <philip.b.tricca@intel.com>
|
|
|
5c89e2 |
.SH "SEE ALSO"
|
|
|
5c89e2 |
diff --git a/src/tabrmd.h b/src/tabrmd.h
|
|
|
5c89e2 |
index 7e0eb02b4ef..ed9d7dd063b 100644
|
|
|
5c89e2 |
--- a/src/tabrmd.h
|
|
|
5c89e2 |
+++ b/src/tabrmd.h
|
|
|
5c89e2 |
@@ -43,7 +43,7 @@
|
|
|
5c89e2 |
#define TABRMD_ENTROPY_SRC_DEFAULT "/dev/urandom"
|
|
|
5c89e2 |
#define TABRMD_SESSIONS_MAX_DEFAULT 4
|
|
|
5c89e2 |
#define TABRMD_SESSIONS_MAX 64
|
|
|
5c89e2 |
-#define TABRMD_TCTI_FILENAME_DEFAULT "libtss2-tcti-device.so"
|
|
|
5c89e2 |
+#define TABRMD_TCTI_FILENAME_DEFAULT "libtss2-tcti-device.so.0"
|
|
|
5c89e2 |
#define TABRMD_TCTI_CONF_DEFAULT NULL
|
|
|
5c89e2 |
#define TABRMD_TRANSIENT_MAX_DEFAULT 27
|
|
|
5c89e2 |
#define TABRMD_TRANSIENT_MAX 100
|
|
|
5c89e2 |
diff --git a/src/tcti-dynamic.c b/src/tcti-dynamic.c
|
|
|
5c89e2 |
index f3e0b6db694..852eb70b2ea 100644
|
|
|
5c89e2 |
--- a/src/tcti-dynamic.c
|
|
|
5c89e2 |
+++ b/src/tcti-dynamic.c
|
|
|
5c89e2 |
@@ -139,7 +139,7 @@ tcti_dynamic_class_init (TctiDynamicClass *klass)
|
|
|
5c89e2 |
g_param_spec_string ("file-name",
|
|
|
5c89e2 |
"TCTI library file",
|
|
|
5c89e2 |
"Library file containing TCTI implementation.",
|
|
|
5c89e2 |
- "libtss2-tcti-device.so",
|
|
|
5c89e2 |
+ "libtss2-tcti-device.so.0",
|
|
|
5c89e2 |
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
|
|
|
5c89e2 |
obj_properties[PROP_CONF_STR] =
|
|
|
5c89e2 |
g_param_spec_string ("conf-str",
|
|
|
5c89e2 |
diff --git a/src/tcti-dynamic.h b/src/tcti-dynamic.h
|
|
|
5c89e2 |
index 08691a66d58..2ed0eaea640 100644
|
|
|
5c89e2 |
--- a/src/tcti-dynamic.h
|
|
|
5c89e2 |
+++ b/src/tcti-dynamic.h
|
|
|
5c89e2 |
@@ -34,7 +34,7 @@
|
|
|
5c89e2 |
|
|
|
5c89e2 |
G_BEGIN_DECLS
|
|
|
5c89e2 |
|
|
|
5c89e2 |
-#define TCTI_DYNAMIC_DEFAULT_FILE_NAME "libtss2-tcti-device.so"
|
|
|
5c89e2 |
+#define TCTI_DYNAMIC_DEFAULT_FILE_NAME "libtss2-tcti-device.so.0"
|
|
|
5c89e2 |
#define TCTI_DYNAMIC_DEFAULT_CONF_STR "/dev/tpm0"
|
|
|
5c89e2 |
|
|
|
5c89e2 |
typedef struct _TctiDynamicClass {
|
|
|
5c89e2 |
--
|
|
|
5c89e2 |
2.17.1
|
|
|
5c89e2 |
|