diff --git a/libraries/libapparmor/src/apparmor.h b/libraries/libapparmor/src/apparmor.h index 7648eae09..8c0476cb2 100644 --- a/libraries/libapparmor/src/apparmor.h +++ b/libraries/libapparmor/src/apparmor.h @@ -43,15 +43,13 @@ __BEGIN_DECLS #define AA_CLASS_X 33 -/* Permission Flags for Mediation classes */ -#define AA_MAY_WRITE (1 << 1) -#define AA_MAY_READ (1 << 2) -#define AA_MAY_BIND (1 << 6) - -#define AA_DBUS_SEND AA_MAY_WRITE -#define AA_DBUS_RECEIVE AA_MAY_READ -#define AA_DBUS_EAVESDROP (1 << 5) -#define AA_DBUS_BIND AA_MAY_BIND +/* Permission flags for the AA_CLASS_DBUS mediation class */ +#define AA_DBUS_SEND (1 << 1) +#define AA_DBUS_RECEIVE (1 << 2) +#define AA_DBUS_EAVESDROP (1 << 5) +#define AA_DBUS_BIND (1 << 6) +#define AA_VALID_DBUS_PERMS (AA_DBUS_SEND | AA_DBUS_RECEIVE | \ + AA_DBUS_BIND | AA_DBUS_EAVESDROP) /* Prototypes for apparmor state queries */ diff --git a/parser/dbus.c b/parser/dbus.c index d408478c6..f5aaca2b3 100644 --- a/parser/dbus.c +++ b/parser/dbus.c @@ -18,6 +18,7 @@ #include #include +#include #include "parser.h" #include "profile.h" diff --git a/parser/immunix.h b/parser/immunix.h index c53d18f68..ebb2d2ec6 100644 --- a/parser/immunix.h +++ b/parser/immunix.h @@ -40,14 +40,6 @@ #define AA_EXEC_MOD_2 (1 << 12) #define AA_EXEC_MOD_3 (1 << 13) -#define AA_DBUS_SEND AA_MAY_WRITE -#define AA_DBUS_RECEIVE AA_MAY_READ -#define AA_DBUS_EAVESDROP (1 << 5) -#define AA_DBUS_BIND (1 << 6) - -#define AA_VALID_DBUS_PERMS (AA_DBUS_SEND | AA_DBUS_RECEIVE | \ - AA_DBUS_BIND | AA_DBUS_EAVESDROP) - #define AA_BASE_PERMS (AA_MAY_EXEC | AA_MAY_WRITE | \ AA_MAY_READ | AA_MAY_APPEND | \ AA_MAY_LINK | AA_MAY_LOCK | \ diff --git a/parser/parser_misc.c b/parser/parser_misc.c index 36285e802..dfa2240c5 100644 --- a/parser/parser_misc.c +++ b/parser/parser_misc.c @@ -37,6 +37,7 @@ #include #include #include +#include #include "parser.h" #include "profile.h" diff --git a/parser/parser_regex.c b/parser/parser_regex.c index 20413b716..9452d3f3c 100644 --- a/parser/parser_regex.c +++ b/parser/parser_regex.c @@ -21,6 +21,7 @@ #include #include #include +#include #define _(s) gettext(s) /* #define DEBUG */ diff --git a/parser/parser_yacc.y b/parser/parser_yacc.y index 166798e2e..99c145675 100644 --- a/parser/parser_yacc.y +++ b/parser/parser_yacc.y @@ -27,6 +27,7 @@ #include #include #include +#include #define _(s) gettext(s) /* #define DEBUG */ diff --git a/parser/policydb.h b/parser/policydb.h index 2d021a8d3..616b7bf72 100644 --- a/parser/policydb.h +++ b/parser/policydb.h @@ -17,7 +17,9 @@ #define __AA_POLICYDB_H /* - * Class of mediation types in the AppArmor policy db + * Class of private mediation types in the AppArmor policy db + * + * See libapparmor's apparmor.h for public mediation types */ #define AA_CLASS_COND 0 #define AA_CLASS_UNKNOWN 1 @@ -32,7 +34,6 @@ #define AA_CLASS_ENV 16 -#define AA_CLASS_DBUS 32 #define AA_CLASS_X 33 #endif /* __AA_POLICYDB_H */