diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2007-12-29 17:52:34 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2007-12-29 17:52:34 +0000 |
commit | 86d2ef9f49f45376fa6038159969e5f7a18ed4c0 (patch) | |
tree | 82c50c5f9f4d88289fd11865973093f92db6c8aa | |
parent | 28cba61034b3bbc04fc9f2e647372db9a4794e06 (diff) | |
download | xen-86d2ef9f49f45376fa6038159969e5f7a18ed4c0.tar.gz xen-86d2ef9f49f45376fa6038159969e5f7a18ed4c0.tar.bz2 xen-86d2ef9f49f45376fa6038159969e5f7a18ed4c0.zip |
vtpm: Fix GetCapabilityOwner function
GetCapabilityOwner function's behavior is different from that of a
real tpm device. By the difference, a TPM Manager in an HVM domain
could not detect whether TPM device has an owner or not.
Signed-off-by: Kouichi YASAKI <yasaki.kouichi@jp.fujitsu.com>
-rw-r--r-- | tools/vtpm/tpm_emulator.patch | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/vtpm/tpm_emulator.patch b/tools/vtpm/tpm_emulator.patch index 8cd439f725..c34c6650ed 100644 --- a/tools/vtpm/tpm_emulator.patch +++ b/tools/vtpm/tpm_emulator.patch @@ -547,6 +547,21 @@ diff -uprN orig/tpm_emulator-0.4/README tpm_emulator/README Installation -------------------------------------------------------------------------- The compilation and installation process uses the build environment for +diff -uprN orig/tpm_emulator-0.4/tpm/tpm_capability.c tpm_emulator/tpm/tpm_capability.c +--- orig/tpm_emulator-0.4/tpm/tpm_capability.c 2006-06-23 19:37:07.000000000 +0900 ++++ tpm_emulator/tpm/tpm_capability.c 2007-12-28 22:50:19.000000000 +0900 +@@ -701,7 +701,10 @@ TPM_RESULT TPM_GetCapabilityOwner(TPM_VE + TPM_RESULT res; + + info("TPM_GetCapabilityOwner()"); +- ++ ++ if (!tpmData.permanent.flags.owned) { ++ return TPM_NOSRK; ++ } + /* Verify owner authorization */ + res = tpm_verify_auth(auth1, tpmData.permanent.data.ownerAuth, TPM_KH_OWNER); + if (res != TPM_SUCCESS) return res; diff -uprN orig/tpm_emulator-0.4/tpm/tpm_cmd_handler.c tpm_emulator/tpm/tpm_cmd_handler.c --- orig/tpm_emulator-0.4/tpm/tpm_cmd_handler.c 2006-06-23 19:37:07.000000000 +0900 +++ tpm_emulator/tpm/tpm_cmd_handler.c 2007-09-12 20:23:00.000000000 +0900 |