mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 06:16:03 +00:00
parser: convert remaining pwarn() to flag controlled warns
Make all warnings that go through pwarn() controllable by warning flags. This adds several new warning control flags, documented in --help=warn Convert --debug-cache to be unified with warning flags. So it can be set by either --debug-cache or --warn=debug-cache Also add an "all" option to be able to turn on all warnings. MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/600 Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
@@ -471,7 +471,7 @@ void sd_serialize_profile(std::ostringstream &buf, Profile *profile,
|
||||
}
|
||||
sd_write_arrayend(buf);
|
||||
} else if (profile->net.allow && (warnflags & WARN_RULE_NOT_ENFORCED))
|
||||
pwarn(_("profile %s network rules not enforced\n"), profile->name);
|
||||
pwarn(WARN_RULE_NOT_ENFORCED, _("profile %s network rules not enforced\n"), profile->name);
|
||||
|
||||
if (profile->policy.dfa) {
|
||||
sd_write_struct(buf, "policydb");
|
||||
|
Reference in New Issue
Block a user