From: David Howells <dhowells@redhat.com>
To: jmorris@namei.org
Cc: linux-security-module@vger.kernel.org, keyrings@vger.kernel.org,
dhowells@redhat.com, ebiggers@kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 4/4] keys: Timestamp new keys
Date: Thu, 14 Feb 2019 16:20:37 +0000 [thread overview]
Message-ID: <155016123488.8115.7213459410629624800.stgit@warthog.procyon.org.uk> (raw)
In-Reply-To: <155016118572.8115.3243711127043478822.stgit@warthog.procyon.org.uk>
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>
---
security/keys/key.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/security/keys/key.c b/security/keys/key.c
index 0ec9322af4f9..696f1c092c50 100644
--- 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;
next prev parent reply other threads:[~2019-02-14 16:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-14 16:19 [PATCH 0/4] keys: Miscellaneous fixes David Howells
2019-02-14 16:20 ` [PATCH 1/4] KEYS: allow reaching the keys quotas exactly David Howells
2019-02-14 16:20 ` [PATCH 2/4] assoc_array: Fix shortcut creation David Howells
2019-02-14 16:20 ` [PATCH 3/4] keys: Fix dependency loop between construction record and auth key David Howells
2019-02-14 16:20 ` David Howells [this message]
2019-02-14 19:01 ` [PATCH 0/4] keys: Miscellaneous fixes James Morris
2019-02-15 16:54 ` David Howells
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=155016123488.8115.7213459410629624800.stgit@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=ebiggers@kernel.org \
--cc=jmorris@namei.org \
--cc=keyrings@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).