2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 06:16:03 +00:00

Enable profile names with regular expressions. This requires a newer

kernel.
This commit is contained in:
John Johansen
2009-07-30 06:09:19 +00:00
parent 4f3e6daae9
commit 9e27a95b8e
8 changed files with 720 additions and 9 deletions

View File

@@ -631,6 +631,14 @@ int sd_serialize_profile(sd_serialize *p, struct codomain *profile,
if (!sd_write_string(p, profile->name, NULL))
return 0;
}
if (regex_type == AARE_DFA && profile->xmatch) {
if (!sd_serialize_dfa(p, profile->xmatch, profile->xmatch_size))
return 0;
if (!sd_write32(p, profile->xmatch_len))
return 0;
}
if (!sd_write_struct(p, "flags"))
return 0;
/* used to be flags.debug, but that's no longer supported */