From john.johansen@canonical.com  Tue Nov 17 11:13:50 2009
From: John Johansen <john.johansen@canonical.com>
Date: Mon, 20 Jul 2009 07:20:36 +0000 (-0700)
Subject: AppArmor: revert reporting of create to write permission.
Git-commit: 5258c0234f53bcf1fc9b2f548835b11535b58135
Git-Repo: git://kernel.ubuntu.com/jj/apparmor-mainline.git AppArmor-2.4

AppArmor: revert reporting of create to write permission.

The reporting of create separate from write permission breaks the tools
currently.  Revert to Jaunty semantic of create reporting the write
permission.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Jeff Mahoney <jeffm@suse.com>

---
 security/apparmor/file.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/security/apparmor/file.c
+++ b/security/apparmor/file.c
@@ -38,12 +38,10 @@ static void audit_file_mask(struct audit
 	if (mask & (MAY_READ | AA_MAY_META_READ))
 		*m++ = 'r';
 	if (mask & (MAY_WRITE | AA_MAY_META_WRITE | AA_MAY_CHMOD |
-		    AA_MAY_CHOWN))
+		    AA_MAY_CHOWN | AA_MAY_CREATE))
 		*m++ = 'w';
 	else if (mask & MAY_APPEND)
 		*m++ = 'a';
-	if (mask & AA_MAY_CREATE)
-		*m++ = 'c';
 	if (mask & AA_MAY_DELETE)
 		*m++ = 'd';
 	if (mask & AA_MAY_LINK)
