summaryrefslogtreecommitdiff
path: root/security/keys/permission.c
diff options
context:
space:
mode:
authorJames Morris <james.l.morris@oracle.com>2014-04-14 11:42:49 +1000
committerJames Morris <james.l.morris@oracle.com>2014-04-14 11:42:49 +1000
commitb13cebe70775e67323e1c2eff20e1cd174e430a4 (patch)
tree80e5775c2ce5c90bdef8a2ce487fb70a179217af /security/keys/permission.c
parentecd740c6f2f092b90b95fa35f757973589eaaca2 (diff)
parentfffea214abf66a8672cfd6697fae65e743e22f11 (diff)
Merge tag 'keys-20140314' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs into next
Diffstat (limited to 'security/keys/permission.c')
-rw-r--r--security/keys/permission.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/keys/permission.c b/security/keys/permission.c
index efcc0c855a0d..732cc0beffdf 100644
--- a/security/keys/permission.c
+++ b/security/keys/permission.c
@@ -28,7 +28,7 @@
* permissions bits or the LSM check.
*/
int key_task_permission(const key_ref_t key_ref, const struct cred *cred,
- key_perm_t perm)
+ unsigned perm)
{
struct key *key;
key_perm_t kperm;
@@ -68,7 +68,7 @@ use_these_perms:
if (is_key_possessed(key_ref))
kperm |= key->perm >> 24;
- kperm = kperm & perm & KEY_ALL;
+ kperm = kperm & perm & KEY_NEED_ALL;
if (kperm != perm)
return -EACCES;