mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: rusty@rustcorp.com.au
Cc: keyrings@linux-nfs.org, jwboyer@redhat.com,
	linux-kernel@vger.kernel.org, dhowells@redhat.com,
	linux-security-module@vger.kernel.org, pjones@redhat.com,
	vgoyal@redhat.com
Subject: [PATCH 03/13] KEYS: Remove key_type::def_lookup_type
Date: Mon, 08 Sep 2014 16:37:36 +0100	[thread overview]
Message-ID: <20140908153736.28301.44913.stgit@warthog.procyon.org.uk> (raw)
In-Reply-To: <20140908153704.28301.41578.stgit@warthog.procyon.org.uk>

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>
---

 crypto/asymmetric_keys/asymmetric_type.c |    1 -
 crypto/asymmetric_keys/pkcs7_key_type.c  |    1 -
 include/linux/key-type.h                 |    3 ---
 security/keys/big_key.c                  |    1 -
 security/keys/user_defined.c             |    2 --
 5 files changed, 8 deletions(-)

diff --git a/crypto/asymmetric_keys/asymmetric_type.c b/crypto/asymmetric_keys/asymmetric_type.c
index f666b4e8d256..9d78ad7754d9 100644
--- a/crypto/asymmetric_keys/asymmetric_type.c
+++ b/crypto/asymmetric_keys/asymmetric_type.c
@@ -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);
 
diff --git a/crypto/asymmetric_keys/pkcs7_key_type.c b/crypto/asymmetric_keys/pkcs7_key_type.c
index 3de5fb011de0..d1faa1df1dec 100644
--- a/crypto/asymmetric_keys/pkcs7_key_type.c
+++ b/crypto/asymmetric_keys/pkcs7_key_type.c
@@ -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,
diff --git a/include/linux/key-type.h b/include/linux/key-type.h
index 8aba688a451a..bf93ea609273 100644
--- a/include/linux/key-type.h
+++ b/include/linux/key-type.h
@@ -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);
 
diff --git a/security/keys/big_key.c b/security/keys/big_key.c
index c2f91a0cf889..4045c13a761a 100644
--- a/security/keys/big_key.c
+++ b/security/keys/big_key.c
@@ -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,
diff --git a/security/keys/user_defined.c b/security/keys/user_defined.c
index ec8a56063b02..cd7e726e8646 100644
--- a/security/keys/user_defined.c
+++ b/security/keys/user_defined.c
@@ -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,


  parent reply	other threads:[~2014-09-08 15:37 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-08 15:37 [RFC][PATCH 00/13] MODSIGN: Use PKCS#7 for module signatures David Howells
2014-09-08 15:37 ` [PATCH 01/13] Provide a binary to hex conversion utility David Howells
2014-09-08 15:37 ` [PATCH 02/13] KEYS: Preparse match data David Howells
2014-09-08 15:37 ` David Howells [this message]
2014-09-08 15:37 ` [PATCH 04/13] KEYS: Remove key_type::match in favour of overriding default by match_preparse David Howells
2014-09-08 15:37 ` [PATCH 05/13] KEYS: Make the key matching functions return bool David Howells
2014-09-08 15:38 ` [PATCH 06/13] KEYS: Implement binary asymmetric key ID handling David Howells
2014-09-08 15:38 ` [PATCH 07/13] PKCS#7: Clean up the signed info freeing and fix the parser cleanup David Howells
2014-09-08 15:38 ` [PATCH 08/13] KEYS: Overhaul key identification when searching for asymmetric keys David Howells
2014-10-02 15:49   ` Dmitry Kasatkin
2014-10-02 16:04     ` Dmitry Kasatkin
2014-10-02 18:32       ` Dmitry Kasatkin
2014-10-02 18:38       ` Mimi Zohar
2014-10-03 12:20       ` David Howells
2014-10-03 12:22       ` David Howells
2014-10-03 12:13     ` David Howells
2014-10-03 12:25       ` Dmitry Kasatkin
2014-10-03 12:12   ` David Howells
2014-10-03 12:23     ` Dmitry Kasatkin
2014-09-08 15:38 ` [PATCH 09/13] PKCS#7: Better handling of unsupported crypto David Howells
2014-09-08 15:38 ` [PATCH 10/13] PKCS#7: Handle PKCS#7 messages that contain no X.509 certs David Howells
2014-09-08 15:39 ` [PATCH 11/13] PKCS#7: Allow detached data to be supplied for signature checking purposes David Howells
2014-09-08 15:39 ` [PATCH 12/13] MODSIGN: Provide a utility to append a PKCS#7 signature to a module David Howells
2014-09-08 15:39 ` [PATCH 13/13] MODSIGN: Use PKCS#7 messages as module signatures David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140908153736.28301.44913.stgit@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=jwboyer@redhat.com \
    --cc=keyrings@linux-nfs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=pjones@redhat.com \
    --cc=rusty@rustcorp.com.au \
    --cc=vgoyal@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®