summaryrefslogtreecommitdiffstats
path: root/fs/crypto
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2018-04-30 15:51:45 -0700
committerTheodore Ts'o <tytso@mit.edu>2018-05-20 16:21:04 -0400
commit1086c80c4d9144ff32741ddbca2fbb268a5de5f5 (patch)
treee609f6cefcb7b7053534f62acc2f741bbae0667f /fs/crypto
parente12ee6836a3fd3c6ebc9b2dc8a7974af592340d0 (diff)
downloadlinux-1086c80c4d9144ff32741ddbca2fbb268a5de5f5.tar.bz2
fscrypt: remove unnecessary check for non-logon key type
We're passing 'key_type_logon' to request_key(), so the found key is guaranteed to be of type "logon". Thus, there is no reason to check later that the key is really a "logon" key. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/crypto')
-rw-r--r--fs/crypto/keyinfo.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/crypto/keyinfo.c b/fs/crypto/keyinfo.c
index 0f6a65c6483b..0b48aa469453 100644
--- a/fs/crypto/keyinfo.c
+++ b/fs/crypto/keyinfo.c
@@ -89,12 +89,6 @@ static int validate_user_key(struct fscrypt_info *crypt_info,
return PTR_ERR(keyring_key);
down_read(&keyring_key->sem);
- if (keyring_key->type != &key_type_logon) {
- printk_once(KERN_WARNING
- "%s: key type must be logon\n", __func__);
- res = -ENOKEY;
- goto out;
- }
ukp = user_key_payload_locked(keyring_key);
if (!ukp) {
/* key was revoked before we acquired its semaphore */