Skip to contentSkip to conversation

apparmor: make stack_msg static

PATCH In review Ben Dooks 2 participants 2 messages Nov 22, 2023 – Jan 4, 2024

Subsystems (2)
lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 apparmor: make stack_msg static

The stack_msg is not exported out of security/apparmor/domain.c so make it static to avoid the following sparse warning:

security/apparmor/domain.c:1314:12: warning: symbol 'stack_msg' was not declared. Should it be static?

---
 security/apparmor/domain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
security/apparmor/domain.c +1 -1
index 89fbeab4b33b..571158ec6188 100644
@@ -1311,7 +1311,7 @@ static int change_profile_perms_wrapper(const char *op, const char *name,
 	return error;
 }
 
-const char *stack_msg = "change_profile unprivileged unconfined converted to stacking";
+static const char *stack_msg = "change_profile unprivileged unconfined converted to stacking";
 
 /**
  * aa_change_profile - perform a one-way profile transition
Signature · 1 line
2.37.2.352.g3c44437643
maintainer
#1 lore raw
Quoted 6 lines · Ben Dooks

The stack_msg is not exported out of security/apparmor/domain.c so make it static to avoid the following sparse warning:

security/apparmor/domain.c:1314:12: warning: symbol 'stack_msg' was not declared. Should it be static?

thankyou for your contribution, unfortunately an the same patch went into apparmor-next on November 11

Quoted 17 lines
---
  security/apparmor/domain.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
security/apparmor/domain.c +1 -1
index 89fbeab4b33b..571158ec6188 100644
@@ -1311,7 +1311,7 @@ static int change_profile_perms_wrapper(const char *op, const char *name,
  	return error;
  }
 
-const char *stack_msg = "change_profile unprivileged unconfined converted to stacking";
+static const char *stack_msg = "change_profile unprivileged unconfined converted to stacking";
 
  /**
   * aa_change_profile - perform a one-way profile transition