mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 06:16:03 +00:00
parser: begin deprecation process for #include
by adding a warning flag that is disabled by default. This will enable devs to find when and where #include is in use by adding the compile flag --warn=pound-include and can even abort policy compiles by using --warn=pound-include --Werror=pound-include The resulting messages look like Warning from /etc/apparmor.d/usr.sbin.cupsd (/etc/apparmor.d/usr.sbin.cupsd line 5): deprecated use of '#include' Signed-off-by: John Johansen <john.johansen@canonical.com> Acked-by: Time-out
This commit is contained in:
@@ -66,10 +66,12 @@ extern int parser_token;
|
||||
#define WARN_FORMAT 0x400
|
||||
#define WARN_MISSING 0x800
|
||||
#define WARN_OVERRIDE 0x1000
|
||||
#define WARN_INCLUDE 0x2000
|
||||
|
||||
#define WARN_DEV (WARN_RULE_NOT_ENFORCED | WARN_RULE_DOWNGRADED | WARN_ABI | \
|
||||
WARN_DEPRECATED | WARN_DANGEROUS | WARN_UNEXPECTED | \
|
||||
WARN_FORMAT | WARN_MISSING | WARN_OVERRIDE | WARN_DEBUG_CACHE)
|
||||
WARN_FORMAT | WARN_MISSING | WARN_OVERRIDE | \
|
||||
WARN_DEBUG_CACHE | WARN_INCLUDE)
|
||||
|
||||
#define DEFAULT_WARNINGS (WARN_CONFIG | WARN_CACHE | WARN_JOBS | \
|
||||
WARN_UNEXPECTED | WARN_OVERRIDE)
|
||||
@@ -77,7 +79,8 @@ extern int parser_token;
|
||||
#define WARN_ALL (WARN_RULE_NOT_ENFORCED | WARN_RULE_DOWNGRADED | WARN_ABI | \
|
||||
WARN_DEPRECATED | WARN_CONFIG | WARN_CACHE | \
|
||||
WARN_DEBUG_CACHE | WARN_JOBS | WARN_DANGEROUS | \
|
||||
WARN_UNEXPECTED | WARN_FORMAT | WARN_MISSING | WARN_OVERRIDE)
|
||||
WARN_UNEXPECTED | WARN_FORMAT | WARN_MISSING | \
|
||||
WARN_OVERRIDE | WARN_INCLUDE)
|
||||
|
||||
extern dfaflags_t warnflags;
|
||||
extern dfaflags_t werrflags;
|
||||
|
Reference in New Issue
Block a user