[PATCH] apparmor: fix operator precidence issue in as_path_link

Andy Whitcroft apw at canonical.com
Fri Jul 10 14:56:29 UTC 2009


Looks like a previous attempt to fix the operator precidence missed.

Signed-off-by: Andy Whitcroft <apw at canonical.com>
---
 security/apparmor/file.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/security/apparmor/file.c b/security/apparmor/file.c
index bd23a10..7ae834f 100644
--- a/security/apparmor/file.c
+++ b/security/apparmor/file.c
@@ -310,7 +310,7 @@ int aa_path_link(struct aa_profile *profile, struct dentry *old_dentry,
 	sa.perms.quiet &= AA_MAY_LINK;
 	sa.perms.kill &= AA_MAY_LINK;
 
-	if ((!sa.perms.allowed & AA_MAY_LINK)) {
+	if (!(sa.perms.allowed & AA_MAY_LINK)) {
 		sa.base.error = -EACCES;
 		goto audit;
 	}
-- 
1.6.3.rc3.199.g24398





More information about the kernel-team mailing list