mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-30 22:05:27 +00:00
parser: Move policy cache functionality into policy_cache.c
Signed-off-by: John Johansen <john.johansen@canonical.com> [tyhicks: Fixed build failures] [tyhicks: Fixed bug where a warning was being printed when it shouldn't] [tyhicks: Forward ported to trunk] Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
This commit is contained in:
committed by
Tyler Hicks
parent
4970d40e0d
commit
2a082ee543
@@ -220,12 +220,12 @@ static int profile_add_hat_rules(Profile *prof)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int load_policy_list(ProfileList &list, int option)
|
||||
int load_policy_list(ProfileList &list, int option, int cache_fd)
|
||||
{
|
||||
int res = 0;
|
||||
|
||||
for (ProfileList::iterator i = list.begin(); i != list.end(); i++) {
|
||||
res = load_profile(option, *i);
|
||||
res = load_profile(option, *i, cache_fd);
|
||||
if (res != 0)
|
||||
break;
|
||||
}
|
||||
@@ -233,14 +233,14 @@ int load_policy_list(ProfileList &list, int option)
|
||||
return res;
|
||||
}
|
||||
|
||||
int load_flattened_hats(Profile *prof, int option)
|
||||
int load_flattened_hats(Profile *prof, int option, int cache_fd)
|
||||
{
|
||||
return load_policy_list(prof->hat_table, option);
|
||||
return load_policy_list(prof->hat_table, option, cache_fd);
|
||||
}
|
||||
|
||||
int load_policy(int option)
|
||||
int load_policy(int option, int cache_fd)
|
||||
{
|
||||
return load_policy_list(policy_list, option);
|
||||
return load_policy_list(policy_list, option, cache_fd);
|
||||
}
|
||||
|
||||
int load_hats(std::ostringstream &buf, Profile *prof)
|
||||
|
Reference in New Issue
Block a user