[apparmor] [PATCH 3/6] libapparmor: Adjust some aa_policy_cache function comments

Tyler Hicks tyhicks at canonical.com
Wed Mar 25 22:37:18 UTC 2015


The aa_features object that is passed to aa_policy_cache_new() does not
have to represent the currently running kernel. It may represent a
different kernel, such as a kernel that was just installed, that is not
currently running.

This patch adjusts the function comments to remove mentions of
"... the currently running kernel".

Signed-off-by: Tyler Hicks <tyhicks at canonical.com>
---
 libraries/libapparmor/src/policy_cache.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/libraries/libapparmor/src/policy_cache.c b/libraries/libapparmor/src/policy_cache.c
index e438439..e05913e 100644
--- a/libraries/libapparmor/src/policy_cache.c
+++ b/libraries/libapparmor/src/policy_cache.c
@@ -129,7 +129,7 @@ static int replace_all_cb(DIR *dir unused, const char *name, struct stat *st,
  * aa_policy_cache_new - create a new policy_cache from a path
  * @policy_cache: will point to the address of an allocated and initialized
  *                aa_policy_cache_new object upon success
- * @kernel_features: features representing the currently running kernel
+ * @kernel_features: features representing a kernel
  * @path: path to the policy cache
  * @create: true if the cache should be created if it doesn't already exist
  *
@@ -212,11 +212,11 @@ void aa_policy_cache_unref(aa_policy_cache *policy_cache)
 }
 
 /**
- * aa_policy_cache_is_valid - checks if the policy_cache is valid for the currently running kernel
+ * aa_policy_cache_is_valid - checks if the policy_cache is valid
  * @policy_cache: the policy_cache
  *
- * Returns: true if the policy_cache is valid for the currently running kernel,
- *          false if not
+ * Returns: true if the policy_cache is valid for the kernel specified when
+ *          creating the policy_cache object, false if not
  */
 bool aa_policy_cache_is_valid(aa_policy_cache *policy_cache)
 {
@@ -225,7 +225,7 @@ bool aa_policy_cache_is_valid(aa_policy_cache *policy_cache)
 }
 
 /**
- * aa_policy_cache_make_valid - empties the policy_cache and makes it valid for the currently running kernel
+ * aa_policy_cache_make_valid - empties the policy_cache and makes it valid
  * @policy_cache: the policy_cache
  *
  * Returns: 0 on success, -1 on error with errno set and features pointing to
-- 
2.1.4




More information about the AppArmor mailing list