[PATCH 1/2] trusted-key: allow overwriting the migratable flag

From: Roberto Sassu
Date: Wed Nov 02 2011 - 08:41:50 EST


The migratable should be modifiable during the key update() method. This
allows for example to update a migratable trusted key, wrapped by a TPM
key, to a a non-migratable one sealed under the SRK with a PCR set.

Signed-off-by: Roberto Sassu <roberto.sassu@xxxxxxxxx>
---
security/keys/trusted.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/security/keys/trusted.c b/security/keys/trusted.c
index 0c33e2e..8777015 100644
--- a/security/keys/trusted.c
+++ b/security/keys/trusted.c
@@ -1036,7 +1036,6 @@ static int trusted_update(struct key *key, const void *data, size_t datalen)
goto out;
}
/* copy old key values, and reseal with new pcrs */
- new_p->migratable = p->migratable;
new_p->key_len = p->key_len;
memcpy(new_p->key, p->key, p->key_len);
dump_payload(p);
--
1.7.6.4

Attachment: smime.p7s
Description: S/MIME cryptographic signature