[apparmor] [PATCH 11/16] apparmor: fix: audit full profile hname on successful load

Seth Arnold seth.arnold at canonical.com
Thu Apr 28 03:11:51 UTC 2016


On Wed, Apr 20, 2016 at 11:52:53PM -0700, John Johansen wrote:
> Currently logging of a successful profile load only logs the basename
> of the profile. This can result in confusion when a child profile has
> the same name as the another profile in the set. Logging the hname
> will ensure there is no confusion.
> 
> Signed-off-by: John Johansen <john.johansen at canonical.com>

Acked-by: Seth Arnold <seth.arnold at canonical.com>

Thanks

> ---
>  security/apparmor/policy.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/security/apparmor/policy.c b/security/apparmor/policy.c
> index db31bc5..ca402d0 100644
> --- a/security/apparmor/policy.c
> +++ b/security/apparmor/policy.c
> @@ -1159,7 +1159,7 @@ ssize_t aa_replace_profiles(void *udata, size_t size, bool noreplace)
>  		list_del_init(&ent->list);
>  		op = (!ent->old && !ent->rename) ? OP_PROF_LOAD : OP_PROF_REPL;
>  
> -		audit_policy(op, GFP_ATOMIC, ent->new->base.name, NULL, error);
> +		audit_policy(op, GFP_ATOMIC, ent->new->base.hname, NULL, error);
>  
>  		if (ent->old) {
>  			__replace_profile(ent->old, ent->new, 1);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20160427/0de9e77a/attachment.pgp>


More information about the AppArmor mailing list