diff options
| author | James Morris <james.l.morris@oracle.com> | 2015-08-11 11:18:53 +1000 |
|---|---|---|
| committer | James Morris <james.l.morris@oracle.com> | 2015-08-11 11:18:53 +1000 |
| commit | 5ab16579020edb79e215b401399f88c7e07fdaf9 (patch) | |
| tree | 5fdb2e49d543af7de6b129d6c87abb1967000a6b /security/smack/smack_access.c | |
| parent | 459c15e53cf7e4e88a78ecfb109af5a267c5500a (diff) | |
| parent | 41a2d5751616e38d1e293e3cb35a6e2bc7a03473 (diff) | |
Merge branch 'smack-for-4.3' of https://github.com/cschaufler/smack-next into next
Diffstat (limited to 'security/smack/smack_access.c')
| -rw-r--r-- | security/smack/smack_access.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/security/smack/smack_access.c b/security/smack/smack_access.c index 00f6b38bffbd..bc1053fb5d1d 100644 --- a/security/smack/smack_access.c +++ b/security/smack/smack_access.c @@ -639,6 +639,12 @@ int smack_privileged(int cap) struct smack_known *skp = smk_of_current(); struct smack_onlycap *sop; + /* + * All kernel tasks are privileged + */ + if (unlikely(current->flags & PF_KTHREAD)) + return 1; + if (!capable(cap)) return 0; |
