diff options
-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) | |||
639 | struct smack_known *skp = smk_of_current(); | 639 | struct smack_known *skp = smk_of_current(); |
640 | struct smack_onlycap *sop; | 640 | struct smack_onlycap *sop; |
641 | 641 | ||
642 | /* | ||
643 | * All kernel tasks are privileged | ||
644 | */ | ||
645 | if (unlikely(current->flags & PF_KTHREAD)) | ||
646 | return 1; | ||
647 | |||
642 | if (!capable(cap)) | 648 | if (!capable(cap)) |
643 | return 0; | 649 | return 0; |
644 | 650 | ||