[apparmor] [PATCH 3/5] apparmor: rename policy_unpack.c:verify_header to unpack_and_verify_header

Ryan Lee ryan.lee at canonical.com
Tue Mar 4 01:11:39 UTC 2025


The function in question does not just verify the header but also does
unpacking, so give the function a more descriptive name.

Signed-off-by: Ryan Lee <ryan.lee at canonical.com>
---
 security/apparmor/policy_unpack.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/security/apparmor/policy_unpack.c b/security/apparmor/policy_unpack.c
index 6cf6e372d815..22af940a5f58 100644
--- a/security/apparmor/policy_unpack.c
+++ b/security/apparmor/policy_unpack.c
@@ -1200,14 +1200,14 @@ static struct aa_profile *unpack_profile(struct aa_ext *e, char **ns_name)
 }
 
 /**
- * verify_header - unpack serialized stream header
+ * unpack_and_verify_header - unpack serialized stream header
  * @e: serialized data read head (NOT NULL)
  * @required: whether the header is required or optional
  * @ns: Returns - namespace if one is specified else NULL (NOT NULL)
  *
  * Returns: error or 0 if header is good
  */
-static int verify_header(struct aa_ext *e, int required, const char **ns)
+static int unpack_and_verify_header(struct aa_ext *e, int required, const char **ns)
 {
 	int error = -EPROTONOSUPPORT;
 	const char *name = NULL;
@@ -1504,7 +1504,7 @@ int aa_unpack(struct aa_loaddata *udata, struct list_head *lh,
 	*ns = NULL;
 	while (e.pos < e.end) {
 		void *start;
-		error = verify_header(&e, e.pos == e.start, ns);
+		error = unpack_and_verify_header(&e, e.pos == e.start, ns);
 		if (error)
 			goto fail;
 
-- 
2.43.0




More information about the AppArmor mailing list