summaryrefslogtreecommitdiffstats
path: root/include/keys
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2014-09-16 12:36:02 -0400
committerDavid Howells <dhowells@redhat.com>2014-09-16 12:36:02 -0400
commit462919591a1791e76042dc5c1e0148715df59beb (patch)
tree44a60ee5f08eab18b1a69f98d993f9a47a45fece /include/keys
parent53d91c5ce0cb8945b55e8bb54e551cabc51eb28d (diff)
KEYS: Preparse match data
Preparse the match data. This provides several advantages: (1) The preparser can reject invalid criteria up front. (2) The preparser can convert the criteria to binary data if necessary (the asymmetric key type really wants to do binary comparison of the key IDs). (3) The preparser can set the type of search to be performed. This means that it's not then a one-off setting in the key type. (4) The preparser can set an appropriate comparator function. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Vivek Goyal <vgoyal@redhat.com>
Diffstat (limited to 'include/keys')
-rw-r--r--include/keys/user-type.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/keys/user-type.h b/include/keys/user-type.h
index 3ab1873a4bfa..66d92af30e7c 100644
--- a/include/keys/user-type.h
+++ b/include/keys/user-type.h
@@ -36,11 +36,13 @@ extern struct key_type key_type_user;
36extern struct key_type key_type_logon; 36extern struct key_type key_type_logon;
37 37
38struct key_preparsed_payload; 38struct key_preparsed_payload;
39struct key_match_data;
39 40
40extern int user_preparse(struct key_preparsed_payload *prep); 41extern int user_preparse(struct key_preparsed_payload *prep);
41extern void user_free_preparse(struct key_preparsed_payload *prep); 42extern void user_free_preparse(struct key_preparsed_payload *prep);
42extern int user_update(struct key *key, struct key_preparsed_payload *prep); 43extern int user_update(struct key *key, struct key_preparsed_payload *prep);
43extern int user_match(const struct key *key, const void *criterion); 44extern int user_match(const struct key *key,
45 const struct key_match_data *match_data);
44extern void user_revoke(struct key *key); 46extern void user_revoke(struct key *key);
45extern void user_destroy(struct key *key); 47extern void user_destroy(struct key *key);
46extern void user_describe(const struct key *user, struct seq_file *m); 48extern void user_describe(const struct key *user, struct seq_file *m);