diff options
author | James Morris <james.l.morris@oracle.com> | 2015-11-23 22:46:28 +1100 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2015-11-23 22:46:28 +1100 |
commit | ebd68df3f24b318d391d15c458d6f43f340ba36a (patch) | |
tree | f0277bc4b853abe5db1d30fa4e10b05bba7f2ac5 /security/keys/request_key.c | |
parent | e42852bf88144affc227884b62637118ba74b783 (diff) | |
parent | 1ec218373b8ebda821aec00bb156a9c94fad9cd4 (diff) | |
download | linux-ebd68df3f24b318d391d15c458d6f43f340ba36a.tar.gz linux-ebd68df3f24b318d391d15c458d6f43f340ba36a.tar.bz2 linux-ebd68df3f24b318d391d15c458d6f43f340ba36a.zip |
Sync to Linus v4.4-rc2 for LSM developers.
Diffstat (limited to 'security/keys/request_key.c')
-rw-r--r-- | security/keys/request_key.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/security/keys/request_key.c b/security/keys/request_key.c index 95d5cfc172c6..c7a117c9a8f3 100644 --- a/security/keys/request_key.c +++ b/security/keys/request_key.c @@ -440,6 +440,9 @@ static struct key *construct_key_and_link(struct keyring_search_context *ctx, kenter(""); + if (ctx->index_key.type == &key_type_keyring) + return ERR_PTR(-EPERM); + user = key_user_lookup(current_fsuid()); if (!user) return ERR_PTR(-ENOMEM); |