diff options
Diffstat (limited to 'security/keys/permission.c')
-rw-r--r-- | security/keys/permission.c | 4 |
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 @@ | |||
28 | * permissions bits or the LSM check. | 28 | * permissions bits or the LSM check. |
29 | */ | 29 | */ |
30 | int key_task_permission(const key_ref_t key_ref, const struct cred *cred, | 30 | int key_task_permission(const key_ref_t key_ref, const struct cred *cred, |
31 | key_perm_t perm) | 31 | unsigned perm) |
32 | { | 32 | { |
33 | struct key *key; | 33 | struct key *key; |
34 | key_perm_t kperm; | 34 | key_perm_t kperm; |
@@ -68,7 +68,7 @@ use_these_perms: | |||
68 | if (is_key_possessed(key_ref)) | 68 | if (is_key_possessed(key_ref)) |
69 | kperm |= key->perm >> 24; | 69 | kperm |= key->perm >> 24; |
70 | 70 | ||
71 | kperm = kperm & perm & KEY_ALL; | 71 | kperm = kperm & perm & KEY_NEED_ALL; |
72 | 72 | ||
73 | if (kperm != perm) | 73 | if (kperm != perm) |
74 | return -EACCES; | 74 | return -EACCES; |