mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 16:35:02 +01:00
![]() This patch changes the aa_policy_cache_new() prototype and gets rid of aa_policy_cache_is_valid() and aa_policy_cache_create(). The create bool of aa_policy_cache_new() is replaced with a 16 bit unsigned int used to specify the maximum number of caches that should be present in the specified cache directory. If the number is exceeded, the old cache directories are reaped. The definition of "old" is private to libapparmor and only 1 cache directory is currently supported. However, that will change in the near future and multiple cache directories will be supported. If 0 is specified for the max_caches parameter, no new caches can be created and only an existing, valid cache can be used. An error is returned if no valid caches exist in that case. If UINT16_MAX is specified, an unlimited amount of caches can be created and reaping is disabled. This means that 0 to (2^16)-2, or infinite, caches will be supported in the future. This change allows for the parser to continue to support the --skip-bad-cache (by passing 0 for max_caches) and the --write-cache option (by passing 1 or more for max_caches) without confusing libapparmor users with the aa_policy_cache_{is_valid,create}() functions. Signed-off-by: Tyler Hicks <tyhicks@canonical.com> Acked-by: John Johansen <john.johansen@canonical.com> |
||
---|---|---|
.. | ||
regression | ||
stress | ||
Makefile |