KEYS: Add payload preparsing opportunity prior to key instantiate or update
[cascardo/linux.git] / security / keys / request_key_auth.c
index 60d4e3f..85730d5 100644 (file)
@@ -19,7 +19,8 @@
 #include <asm/uaccess.h>
 #include "internal.h"
 
-static int request_key_auth_instantiate(struct key *, const void *, size_t);
+static int request_key_auth_instantiate(struct key *,
+                                       struct key_preparsed_payload *);
 static void request_key_auth_describe(const struct key *, struct seq_file *);
 static void request_key_auth_revoke(struct key *);
 static void request_key_auth_destroy(struct key *);
@@ -42,10 +43,9 @@ struct key_type key_type_request_key_auth = {
  * Instantiate a request-key authorisation key.
  */
 static int request_key_auth_instantiate(struct key *key,
-                                       const void *data,
-                                       size_t datalen)
+                                       struct key_preparsed_payload *prep)
 {
-       key->payload.data = (struct request_key_auth *) data;
+       key->payload.data = (struct request_key_auth *)prep->data;
        return 0;
 }