2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-30 22:05:27 +00:00

parser: add error=EXX flag support

Add a flag that allows setting the error code AppArmor will send when
an operation is denied. This should not be used normally.

Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
This commit is contained in:
Georgia Garcia
2024-04-15 16:32:16 -03:00
parent 678d6294d7
commit aee0492491
21 changed files with 167 additions and 2 deletions

View File

@@ -426,6 +426,12 @@ void sd_serialize_profile(std::ostringstream &buf, Profile *profile,
sd_write_name(buf, "kill");
sd_write_uint32(buf, profile->flags.signal);
}
if (profile->flags.error && features_supports_flag_error) {
sd_write_name(buf, "error");
sd_write_uint32(buf, profile->flags.error);
}
sd_write_struct(buf, "flags");
/* used to be flags.debug, but that's no longer supported */
sd_write_uint32(buf, profile->flags.flags);