Merge branch 'smack-for-4.3' of https://github.com/cschaufler/smack-next into next

This change “Merge branch ‘smack-for-4.3’ of https://github.com/cschaufler/smack-next into next” in Linux kernel is authored by James Morris <james.l.morris [at] oracle.com> on Tue Aug 11 11:18:53 2015 +1000.

Merge branch 'smack-for-4.3' of https://github.com/cschaufler/smack-next into next

This Linux change may have been applied to various maintained Linux releases and you can find Linux releases including commit 5ab1657.

There is no are 0 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 security/smack/smack_access.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/security/smack/smack_access.c b/security/smack/smack_access.c
index 00f6b38..bc1053f 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;
 

The commit for this change in Linux stable tree is 5ab1657 (patch).

Leave a Reply

Your email address will not be published. Required fields are marked *