summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2014-09-16 18:32:16 +0200
committerDavid Howells <dhowells@redhat.com>2014-09-16 18:32:16 +0200
commit68c45c7feaf1a8adebc6d9d77aa0a2018d974085 (patch)
tree3723e1d847b0626e07837db7c648ba63ade7e1a5 /security
parentMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/li... (diff)
parentPKCS#7: Fix the parser cleanup to drain parsed out X.509 certs (diff)
downloadlinux-68c45c7feaf1a8adebc6d9d77aa0a2018d974085.tar.xz
linux-68c45c7feaf1a8adebc6d9d77aa0a2018d974085.zip
Merge tag 'keys-fixes-20140916' into keys-next
Merge in keyrings fixes, at least some of which later patches depend on: (1) Reinstate the production of EPERM for key types beginning with '.' in requests from userspace. (2) Tidy up the cleanup of PKCS#7 message signed information blocks and fix a bug this made more obvious. Signed-off-by: David Howells <dhowells@redhat.coM>
Diffstat (limited to 'security')
-rw-r--r--security/keys/keyctl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c
index e26f860e5f2e..eff88a5f5d40 100644
--- a/security/keys/keyctl.c
+++ b/security/keys/keyctl.c
@@ -37,6 +37,8 @@ static int key_get_type_from_user(char *type,
return ret;
if (ret == 0 || ret >= len)
return -EINVAL;
+ if (type[0] == '.')
+ return -EPERM;
type[len - 1] = '\0';
return 0;
}