Skip to content

Commit

Permalink
KEYS: request_key_auth: Provide key preparsing
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Steve Dickson <[email protected]>
Acked-by: Jeff Layton <[email protected]>
  • Loading branch information
dhowells committed Jul 22, 2014
1 parent 5d19e20 commit f1dcde9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions security/keys/request_key_auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 *);
Expand All @@ -33,13 +35,24 @@ 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,
.destroy = request_key_auth_destroy,
.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.
*/
Expand Down

0 comments on commit f1dcde9

Please sign in to comment.