summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2014-09-16 17:32:16 +0100
committerDavid Howells <dhowells@redhat.com>2014-09-16 17:32:16 +0100
commit68c45c7feaf1a8adebc6d9d77aa0a2018d974085 (patch)
tree3723e1d847b0626e07837db7c648ba63ade7e1a5 /security
parentac60ab4b4968b54fb5af20eac9dd78e36ad910c1 (diff)
parentcecf5d2e1208da512a4c951c24acd66c54a4d06c (diff)
downloadop-kernel-dev-68c45c7feaf1a8adebc6d9d77aa0a2018d974085.zip
op-kernel-dev-68c45c7feaf1a8adebc6d9d77aa0a2018d974085.tar.gz
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 e26f860..eff88a5 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;
}
OpenPOWER on IntegriCloud