mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 22:35:35 +00:00
Convert the parser to C++
This conversion is nothing more than what is required to get it to compile. Further improvements will come as the code is refactored. Unfortunately due to C++ not supporting designated initializers, the auto generation of af names needed to be reworked, and "netlink" and "unix" domain socket keywords leaked in. Since these where going to be added in separate patches I have not bothered to do the extra work to replace them with a temporary place holder. Signed-off-by: John Johansen <john.johansen@canonical.com> [tyhicks: merged with dbus changes and memory leak fixes] Signed-off-by: Tyler Hicks <tyhicks@canonical.com> Acked-by: Seth Arnold <seth.arnold@canonical.com> Acked-by: Steve Beattie <steve@nxnw.org>
This commit is contained in:
committed by
Tyler Hicks
parent
b0a1488820
commit
a34059b1e5
@@ -518,9 +518,9 @@ static int process_dfa_entry(aare_ruleset_t *dfarules, struct cod_entry *entry)
|
||||
/* allow change_profile for all execs */
|
||||
vec[0] = "/[^\\x00]*";
|
||||
|
||||
if (entry->namespace) {
|
||||
if (entry->ns) {
|
||||
int pos;
|
||||
ptype = convert_aaregex_to_pcre(entry->namespace, 0, lbuf, PATH_MAX + 8, &pos);
|
||||
ptype = convert_aaregex_to_pcre(entry->ns, 0, lbuf, PATH_MAX + 8, &pos);
|
||||
vec[index++] = lbuf;
|
||||
}
|
||||
vec[index++] = tbuf;
|
||||
@@ -536,9 +536,9 @@ static int process_dfa_entry(aare_ruleset_t *dfarules, struct cod_entry *entry)
|
||||
}
|
||||
if (entry->mode & (AA_USER_PTRACE | AA_OTHER_PTRACE)) {
|
||||
int mode = entry->mode & (AA_USER_PTRACE | AA_OTHER_PTRACE);
|
||||
if (entry->namespace) {
|
||||
if (entry->ns) {
|
||||
char *vec[2];
|
||||
vec[0] = entry->namespace;
|
||||
vec[0] = entry->ns;
|
||||
vec[1] = entry->name;
|
||||
if (!aare_add_rule_vec(dfarules, 0, mode, 0, 2, vec, dfaflags))
|
||||
return FALSE;
|
||||
|
Reference in New Issue
Block a user