KEYS: Remove key_type::def_lookup_type
authorDavid Howells <dhowells@redhat.com>
Tue, 16 Sep 2014 16:36:04 +0000 (17:36 +0100)
committerDavid Howells <dhowells@redhat.com>
Tue, 16 Sep 2014 16:36:04 +0000 (17:36 +0100)
Remove key_type::def_lookup_type as it's no longer used.  The information now
defaults to KEYRING_SEARCH_LOOKUP_DIRECT but may be overridden by
type->match_preparse().

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
crypto/asymmetric_keys/asymmetric_type.c
crypto/asymmetric_keys/pkcs7_key_type.c
include/linux/key-type.h
security/keys/big_key.c
security/keys/internal.h
security/keys/user_defined.c

index f666b4e8d25690544d07967f95ee18b935a0bbde..9d78ad7754d9aa13cf24ed9d70925d4e7c43495a 100644 (file)
@@ -228,7 +228,6 @@ struct key_type key_type_asymmetric = {
        .match_free     = asymmetric_key_match_free,
        .destroy        = asymmetric_key_destroy,
        .describe       = asymmetric_key_describe,
-       .def_lookup_type = KEYRING_SEARCH_LOOKUP_ITERATE,
 };
 EXPORT_SYMBOL_GPL(key_type_asymmetric);
 
index 3de5fb011de0b3b64e0dfde2b2c6d17c631dd3d1..d1faa1df1decdd24396d1be7fe507c64a1dcc7e4 100644 (file)
@@ -72,7 +72,6 @@ error:
  */
 static struct key_type key_type_pkcs7 = {
        .name                   = "pkcs7_test",
-       .def_lookup_type        = KEYRING_SEARCH_LOOKUP_DIRECT,
        .preparse               = pkcs7_preparse,
        .free_preparse          = user_free_preparse,
        .instantiate            = generic_key_instantiate,
index 8aba688a451a08a5f5fd6bba16870c6522cd3995..bf93ea6092738706871003c742b27cf12a96084b 100644 (file)
@@ -81,9 +81,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);
 
index c2f91a0cf8899cb0d8d69fd06ebcc05405cf45f7..4045c13a761a9f43ff8b46722e67968259c2f957 100644 (file)
@@ -33,7 +33,6 @@ MODULE_LICENSE("GPL");
  */
 struct key_type key_type_big_key = {
        .name                   = "big_key",
-       .def_lookup_type        = KEYRING_SEARCH_LOOKUP_DIRECT,
        .preparse               = big_key_preparse,
        .free_preparse          = big_key_free_preparse,
        .instantiate            = generic_key_instantiate,
index 805e60b0b87ebe8a90e934cd0aaa52efd24a1a1e..b47cc532be1e3b87f09f81d24b818ce4e8802753 100644 (file)
@@ -112,12 +112,11 @@ struct keyring_search_context {
        const struct cred       *cred;
        struct key_match_data   match_data;
        unsigned                flags;
-#define KEYRING_SEARCH_LOOKUP_TYPE     0x0001  /* [as type->def_lookup_type] */
-#define KEYRING_SEARCH_NO_STATE_CHECK  0x0002  /* Skip state checks */
-#define KEYRING_SEARCH_DO_STATE_CHECK  0x0004  /* Override NO_STATE_CHECK */
-#define KEYRING_SEARCH_NO_UPDATE_TIME  0x0008  /* Don't update times */
-#define KEYRING_SEARCH_NO_CHECK_PERM   0x0010  /* Don't check permissions */
-#define KEYRING_SEARCH_DETECT_TOO_DEEP 0x0020  /* Give an error on excessive depth */
+#define KEYRING_SEARCH_NO_STATE_CHECK  0x0001  /* Skip state checks */
+#define KEYRING_SEARCH_DO_STATE_CHECK  0x0002  /* Override NO_STATE_CHECK */
+#define KEYRING_SEARCH_NO_UPDATE_TIME  0x0004  /* Don't update times */
+#define KEYRING_SEARCH_NO_CHECK_PERM   0x0008  /* Don't check permissions */
+#define KEYRING_SEARCH_DETECT_TOO_DEEP 0x0010  /* Give an error on excessive depth */
 
        int (*iterator)(const void *object, void *iterator_data);
 
index ec8a56063b021278215e83352be0f3220ee7b10b..cd7e726e8646a79c8a016cdd9d8b4b0b81b0f59f 100644 (file)
@@ -26,7 +26,6 @@ static int logon_vet_description(const char *desc);
  */
 struct key_type key_type_user = {
        .name                   = "user",
-       .def_lookup_type        = KEYRING_SEARCH_LOOKUP_DIRECT,
        .preparse               = user_preparse,
        .free_preparse          = user_free_preparse,
        .instantiate            = generic_key_instantiate,
@@ -48,7 +47,6 @@ EXPORT_SYMBOL_GPL(key_type_user);
  */
 struct key_type key_type_logon = {
        .name                   = "logon",
-       .def_lookup_type        = KEYRING_SEARCH_LOOKUP_DIRECT,
        .preparse               = user_preparse,
        .free_preparse          = user_free_preparse,
        .instantiate            = generic_key_instantiate,