2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-09-04 16:25:10 +00:00

Rename AA_MAY_XXX permission bits that conflict with new layout

The parser currently is still using the old permission layout, the kernel
uses a newer layout that allows for more permission bits. The newer
newer permission layout is needed by the library to query the kernel,
however that causes some of the permission bits to be redefined.

Rename the permission bits that cause redefination warnings to use
AA_OLD_MAY_XXX

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Tyler Hicks <tyhicks@canonical.com>
This commit is contained in:
John Johansen
2015-06-06 01:25:49 -07:00
parent 5d0e6c26b7
commit 0cba060d7a
3 changed files with 20 additions and 17 deletions

View File

@@ -332,7 +332,7 @@ reeval:
case COD_READ_CHAR:
if (read_implies_exec) {
PDEBUG("Parsing mode: found %s READ imply X\n", mode_desc);
mode |= AA_MAY_READ | AA_EXEC_MMAP;
mode |= AA_MAY_READ | AA_OLD_EXEC_MMAP;
} else {
PDEBUG("Parsing mode: found %s READ\n", mode_desc);
mode |= AA_MAY_READ;
@@ -355,12 +355,12 @@ reeval:
case COD_LINK_CHAR:
PDEBUG("Parsing mode: found %s LINK\n", mode_desc);
mode |= AA_MAY_LINK;
mode |= AA_OLD_MAY_LINK;
break;
case COD_LOCK_CHAR:
PDEBUG("Parsing mode: found %s LOCK\n", mode_desc);
mode |= AA_MAY_LOCK;
mode |= AA_OLD_MAY_LOCK;
break;
case COD_INHERIT_CHAR:
@@ -439,7 +439,7 @@ reeval:
case COD_MMAP_CHAR:
PDEBUG("Parsing mode: found %s MMAP\n", mode_desc);
mode |= AA_EXEC_MMAP;
mode |= AA_OLD_EXEC_MMAP;
break;
case COD_EXEC_CHAR: