projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
822ad64
)
keys: Timestamp new keys
author
David Howells
<dhowells@redhat.com>
Thu, 14 Feb 2019 16:20:37 +0000
(16:20 +0000)
committer
James Morris
<james.morris@microsoft.com>
Fri, 15 Feb 2019 22:12:09 +0000
(14:12 -0800)
Set the timestamp on new keys rather than leaving it unset.
Fixes:
31d5a79d7f3d
("KEYS: Do LRU discard in full keyrings")
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <james.morris@microsoft.com>
security/keys/key.c
patch
|
blob
|
blame
|
history
diff --git
a/security/keys/key.c
b/security/keys/key.c
index 0ec9322af4f93b998ac3069c0b472f3c9afebe33..696f1c092c508fbee1e1c0c7e713861eb4811ee5 100644
(file)
--- a/
security/keys/key.c
+++ b/
security/keys/key.c
@@
-297,6
+297,7
@@
struct key *key_alloc(struct key_type *type, const char *desc,
key->gid = gid;
key->perm = perm;
key->restrict_link = restrict_link;
+ key->last_used_at = ktime_get_real_seconds();
if (!(flags & KEY_ALLOC_NOT_IN_QUOTA))
key->flags |= 1 << KEY_FLAG_IN_QUOTA;