Merge git://git.infradead.org/users/eparis/audit
[firefly-linux-kernel-4.4.55.git] / include / linux / key-type.h
index 8aba688a451a08a5f5fd6bba16870c6522cd3995..ff9f1d3942356ffd1f16ab777cb8c7ed201b35e8 100644 (file)
@@ -56,10 +56,12 @@ typedef int (*request_key_actor_t)(struct key_construction *key,
  * Preparsed matching criterion.
  */
 struct key_match_data {
-       /* Comparison function, defaults to type->match, but can be replaced by
-        * type->match_preparse(). */
-       int (*cmp)(const struct key *key,
-                  const struct key_match_data *match_data);
+       /* Comparison function, defaults to exact description match, but can be
+        * overridden by type->match_preparse().  Should return true if a match
+        * is found and false if not.
+        */
+       bool (*cmp)(const struct key *key,
+                   const struct key_match_data *match_data);
 
        const void      *raw_data;      /* Raw match data */
        void            *preparsed;     /* For ->match_preparse() to stash stuff */
@@ -81,9 +83,6 @@ struct key_type {
         */
        size_t def_datalen;
 
-       /* Default key search algorithm. */
-       unsigned def_lookup_type;
-
        /* vet a description */
        int (*vet_description)(const char *description);
 
@@ -116,10 +115,6 @@ struct key_type {
         */
        int (*match_preparse)(struct key_match_data *match_data);
 
-       /* match a key against a description */
-       int (*match)(const struct key *key,
-                    const struct key_match_data *match_data);
-
        /* Free preparsed match data (optional).  This should be supplied it
         * ->match_preparse() is supplied. */
        void (*match_free)(struct key_match_data *match_data);