summaryrefslogtreecommitdiff
path: root/security/keys
diff options
context:
space:
mode:
authorAndrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>2021-03-04 20:26:33 +0000
committerAndrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>2021-03-04 20:26:33 +0000
commitd51b217cf87d055293c6264175436a28945cdc80 (patch)
tree4a8815cdcbab7dfd061ddacbf700312e1743f1a6 /security/keys
parent13155f4c5e198e91b853f830447e7786241a4540 (diff)
parent7f324ea75baa059ea126cddd4141198895880a69 (diff)
Merge tag 'v5.4.102' into 5.4-2.3.x-imx
This is the 5.4.102 stable release Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Diffstat (limited to 'security/keys')
-rw-r--r--security/keys/key.c2
-rw-r--r--security/keys/trusted.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/security/keys/key.c b/security/keys/key.c
index e9845d0d8d34..623fcb4094dd 100644
--- a/security/keys/key.c
+++ b/security/keys/key.c
@@ -302,6 +302,8 @@ struct key *key_alloc(struct key_type *type, const char *desc,
key->flags |= 1 << KEY_FLAG_BUILTIN;
if (flags & KEY_ALLOC_UID_KEYRING)
key->flags |= 1 << KEY_FLAG_UID_KEYRING;
+ if (flags & KEY_ALLOC_SET_KEEP)
+ key->flags |= 1 << KEY_FLAG_KEEP;
#ifdef KEY_DEBUGGING
key->magic = KEY_DEBUG_MAGIC;
diff --git a/security/keys/trusted.c b/security/keys/trusted.c
index 36afc29aecc3..92a14ab82f72 100644
--- a/security/keys/trusted.c
+++ b/security/keys/trusted.c
@@ -805,7 +805,7 @@ static int getoptions(char *c, struct trusted_key_payload *pay,
case Opt_migratable:
if (*args[0].from == '0')
pay->migratable = 0;
- else
+ else if (*args[0].from != '1')
return -EINVAL;
break;
case Opt_pcrlock: