diff options
Diffstat (limited to 'security/keys/permission.c')
-rw-r--r-- | security/keys/permission.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/security/keys/permission.c b/security/keys/permission.c index 03db073ba45c..e7f579c0eaf5 100644 --- a/security/keys/permission.c +++ b/security/keys/permission.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/security.h> | ||
13 | #include "internal.h" | 14 | #include "internal.h" |
14 | 15 | ||
15 | /*****************************************************************************/ | 16 | /*****************************************************************************/ |
@@ -63,7 +64,11 @@ use_these_perms: | |||
63 | 64 | ||
64 | kperm = kperm & perm & KEY_ALL; | 65 | kperm = kperm & perm & KEY_ALL; |
65 | 66 | ||
66 | return kperm == perm; | 67 | if (kperm != perm) |
68 | return -EACCES; | ||
69 | |||
70 | /* let LSM be the final arbiter */ | ||
71 | return security_key_permission(key_ref, context, perm); | ||
67 | 72 | ||
68 | } /* end key_task_permission() */ | 73 | } /* end key_task_permission() */ |
69 | 74 | ||