Index: tpm.cc |
diff --git a/tpm.cc b/tpm.cc |
index 6183e7031628f48c022aabddc95789d899586c58..1efa15c57d68bac73148e49045d460883b01933a 100644 |
--- a/tpm.cc |
+++ b/tpm.cc |
@@ -568,7 +568,8 @@ bool Tpm::InitializeTpm(bool* OUT_took_ownership) { |
// If we can open the TPM with the default password, then we still need to |
// zero the SRK password and unrestrict it, then change the owner password. |
TSS_HTPM tpm_handle; |
- if (GetTpmWithAuth(context_handle_, default_owner_password, &tpm_handle) && |
+ if (!file_util::PathExists(FilePath(kTpmOwnedFile)) && |
+ GetTpmWithAuth(context_handle_, default_owner_password, &tpm_handle) && |
TestTpmAuth(tpm_handle)) { |
if (!ZeroSrkPassword(context_handle_, default_owner_password)) { |
LOG(ERROR) << "Couldn't zero SRK password"; |