Commit f1dcde91 authored by David Howells's avatar David Howells

KEYS: request_key_auth: Provide key preparsing

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: default avatarDavid Howells <dhowells@redhat.com>
Acked-by: default avatarSteve Dickson <steved@redhat.com>
Acked-by: default avatarJeff Layton <jlayton@primarydata.com>
parent 5d19e20b
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
#include "internal.h" #include "internal.h"
#include <keys/user-type.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 *, static int request_key_auth_instantiate(struct key *,
struct key_preparsed_payload *); struct key_preparsed_payload *);
static void request_key_auth_describe(const struct key *, struct seq_file *); 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); ...@@ -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 = { struct key_type key_type_request_key_auth = {
.name = ".request_key_auth", .name = ".request_key_auth",
.def_datalen = sizeof(struct 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, .instantiate = request_key_auth_instantiate,
.describe = request_key_auth_describe, .describe = request_key_auth_describe,
.revoke = request_key_auth_revoke, .revoke = request_key_auth_revoke,
...@@ -40,6 +44,15 @@ struct key_type key_type_request_key_auth = { ...@@ -40,6 +44,15 @@ struct key_type key_type_request_key_auth = {
.read = request_key_auth_read, .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. * Instantiate a request-key authorisation key.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment