[apparmor] [PATCH] apparmor: make stack_msg static

John Johansen john.johansen at canonical.com
Sat Nov 25 02:05:13 UTC 2023


On 11/22/23 03:56, Ben Dooks wrote:
> 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?
> 
> Signed-off-by: Ben Dooks <ben.dooks at codethink.co.uk>

thank you for your contribution, unfortunately this fix has already landed in apparmor-next on Nov 9 with commit

3c49ce0e2209 apparmor: declare stack_msg as static


> ---
>   security/apparmor/domain.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/security/apparmor/domain.c b/security/apparmor/domain.c
> index 89fbeab4b33b..571158ec6188 100644
> --- a/security/apparmor/domain.c
> +++ b/security/apparmor/domain.c
> @@ -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




More information about the AppArmor mailing list