mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-22 01:57:43 +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;
|
||||
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)
|
||||
|
@ -346,6 +346,7 @@ struct dfa_stuff {
|
||||
|
||||
class Profile {
|
||||
public:
|
||||
bool uses_prompt_rules;
|
||||
char *ns;
|
||||
char *name;
|
||||
char *attachment;
|
||||
@ -379,6 +380,7 @@ public:
|
||||
|
||||
Profile(void)
|
||||
{
|
||||
uses_prompt_rules = false;
|
||||
ns = name = attachment = NULL;
|
||||
altnames = NULL;
|
||||
xmatch = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user