summaryrefslogtreecommitdiffstats
path: root/security/keys/key.c
diff options
context:
space:
mode:
authorJames Morris <james.l.morris@oracle.com>2015-12-26 06:06:53 +0100
committerJames Morris <james.l.morris@oracle.com>2015-12-26 06:06:53 +0100
commit3cb92fe48138d225b8d0ceedf148642f9103f841 (patch)
treecbb877002d9d39777be13df3876e05f2542da234 /security/keys/key.c
parentkeys, trusted: seal with a TPM2 authorization policy (diff)
parentIMA: policy can be updated zero times (diff)
downloadlinux-3cb92fe48138d225b8d0ceedf148642f9103f841.tar.xz
linux-3cb92fe48138d225b8d0ceedf148642f9103f841.zip
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity into next
Diffstat (limited to 'security/keys/key.c')
-rw-r--r--security/keys/key.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/security/keys/key.c b/security/keys/key.c
index ab7997ded725..09ef276c4bdc 100644
--- a/security/keys/key.c
+++ b/security/keys/key.c
@@ -429,8 +429,12 @@ static int __key_instantiate_and_link(struct key *key,
awaken = 1;
/* and link it into the destination keyring */
- if (keyring)
+ if (keyring) {
+ if (test_bit(KEY_FLAG_KEEP, &keyring->flags))
+ set_bit(KEY_FLAG_KEEP, &key->flags);
+
__key_link(key, _edit);
+ }
/* disable the authorisation key */
if (authkey)