From: David Howells <dhowells@redhat.com>
To: keyrings@linux-nfs.org
Cc: dhowells@redhat.com, linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 12/12] KEYS: request_key_auth: Provide key preparsing
Date: Thu, 20 Mar 2014 12:06:17 +0000 [thread overview]
Message-ID: <20140320120617.21635.96975.stgit@warthog.procyon.org.uk> (raw)
In-Reply-To: <20140320120428.21635.13071.stgit@warthog.procyon.org.uk>
Provide key preparsing for the request_key_auth key type so that we can make
preparsing mandatory. This does nothing as this type can only be set up
internally to the kernel.
Signed-off-by: David Howells <dhowells@redhat.com>
---
security/keys/request_key_auth.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/security/keys/request_key_auth.c b/security/keys/request_key_auth.c
index 7495a93b4b90..842e6f410d50 100644
--- a/security/keys/request_key_auth.c
+++ b/security/keys/request_key_auth.c
@@ -20,6 +20,8 @@
#include "internal.h"
#include <keys/user-type.h>
+static int request_key_auth_preparse(struct key_preparsed_payload *);
+static void request_key_auth_free_preparse(struct key_preparsed_payload *);
static int request_key_auth_instantiate(struct key *,
struct key_preparsed_payload *);
static void request_key_auth_describe(const struct key *, struct seq_file *);
@@ -33,6 +35,8 @@ static long request_key_auth_read(const struct key *, char __user *, size_t);
struct key_type key_type_request_key_auth = {
.name = ".request_key_auth",
.def_datalen = sizeof(struct request_key_auth),
+ .preparse = request_key_auth_preparse,
+ .free_preparse = request_key_auth_free_preparse,
.instantiate = request_key_auth_instantiate,
.describe = request_key_auth_describe,
.revoke = request_key_auth_revoke,
@@ -40,6 +44,15 @@ struct key_type key_type_request_key_auth = {
.read = request_key_auth_read,
};
+int request_key_auth_preparse(struct key_preparsed_payload *prep)
+{
+ return 0;
+}
+
+void request_key_auth_free_preparse(struct key_preparsed_payload *prep)
+{
+}
+
/*
* Instantiate a request-key authorisation key.
*/
prev parent reply other threads:[~2014-03-20 13:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-20 12:04 [PATCH 00/12] KEYS: Use preparsing in most key types David Howells
2014-03-20 12:04 ` [PATCH 01/12] KEYS: Provide a generic instantiation function David Howells
2014-03-20 12:04 ` [PATCH 02/12] KEYS: struct key_preparsed_payload should have two payload pointers David Howells
2014-03-20 12:04 ` [PATCH 03/12] KEYS: Allow expiry time to be set when preparsing a key David Howells
2014-03-20 12:05 ` [PATCH 04/12] KEYS: Call ->free_preparse() even after ->preparse() returns an error David Howells
2014-03-20 12:05 ` [PATCH 05/12] KEYS: user: Use key preparsing David Howells
2014-03-20 12:05 ` [PATCH 06/12] KEYS: Ceph: " David Howells
2014-03-20 12:05 ` [PATCH 07/12] KEYS: Ceph: Use user_match() David Howells
2014-03-20 12:05 ` [PATCH 08/12] KEYS: DNS: Use key preparsing David Howells
2014-03-20 12:05 ` [PATCH 09/12] KEYS: RxRPC: " David Howells
2014-03-20 12:05 ` [PATCH 10/12] KEYS: big_key: " David Howells
2014-03-20 12:06 ` [PATCH 11/12] KEYS: keyring: Provide " David Howells
2014-03-20 12:06 ` David Howells [this message]
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=20140320120617.21635.96975.stgit@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=keyrings@linux-nfs.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
all inboxes | Powered by JetHome®