mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-30 05:47:59 +00:00
parser: frontend carry use of prompt rules flag on profile
add a flag to make it easy to check if a profile uses prompt rules. Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
parent
e4890e6ba1
commit
48b727b88a
@ -161,6 +161,8 @@ void add_entry_to_policy(Profile *prof, struct cod_entry *entry)
|
|||||||
{
|
{
|
||||||
entry->next = prof->entries;
|
entry->next = prof->entries;
|
||||||
prof->entries = entry;
|
prof->entries = entry;
|
||||||
|
if (entry->rule_mode == RULE_PROMPT)
|
||||||
|
prof->uses_prompt_rules = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int add_named_transition(Profile *prof, struct cod_entry *entry)
|
static int add_named_transition(Profile *prof, struct cod_entry *entry)
|
||||||
|
@ -346,6 +346,7 @@ struct dfa_stuff {
|
|||||||
|
|
||||||
class Profile {
|
class Profile {
|
||||||
public:
|
public:
|
||||||
|
bool uses_prompt_rules;
|
||||||
char *ns;
|
char *ns;
|
||||||
char *name;
|
char *name;
|
||||||
char *attachment;
|
char *attachment;
|
||||||
@ -379,6 +380,7 @@ public:
|
|||||||
|
|
||||||
Profile(void)
|
Profile(void)
|
||||||
{
|
{
|
||||||
|
uses_prompt_rules = false;
|
||||||
ns = name = attachment = NULL;
|
ns = name = attachment = NULL;
|
||||||
altnames = NULL;
|
altnames = NULL;
|
||||||
xmatch = NULL;
|
xmatch = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user