mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Johansen <john.johansen@canonical.com>
To: Florian Westphal <fw@strlen.de>, linux-security-module@vger.kernel.org
Cc: jmorris@namei.org, serge@hallyn.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH apparmor] apparmor: remove unneeded one-line hook wrappers
Date: Thu, 11 Nov 2021 17:26:06 -0800	[thread overview]
Message-ID: <0525571e-9950-b953-f6df-e6a81f5c54cc@canonical.com> (raw)
In-Reply-To: <20211011143854.17917-1-fw@strlen.de>

On 10/11/21 7:38 AM, Florian Westphal wrote:
> Use the common function directly.
> 
> Signed-off-by: Florian Westphal <fw@strlen.de>

sorry, it looks like I forgot to reply to this. I pulled this into the
apparmor tree and it has been merged for 5.16

> ---
>  security/apparmor/lsm.c | 20 ++------------------
>  1 file changed, 2 insertions(+), 18 deletions(-)
> 
> diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
> index f72406fe1bf2..eafb44aa553a 100644
> --- a/security/apparmor/lsm.c
> +++ b/security/apparmor/lsm.c
> @@ -1773,32 +1773,16 @@ static unsigned int apparmor_ip_postroute(void *priv,
>  
>  }
>  
> -static unsigned int apparmor_ipv4_postroute(void *priv,
> -					    struct sk_buff *skb,
> -					    const struct nf_hook_state *state)
> -{
> -	return apparmor_ip_postroute(priv, skb, state);
> -}
> -
> -#if IS_ENABLED(CONFIG_IPV6)
> -static unsigned int apparmor_ipv6_postroute(void *priv,
> -					    struct sk_buff *skb,
> -					    const struct nf_hook_state *state)
> -{
> -	return apparmor_ip_postroute(priv, skb, state);
> -}
> -#endif
> -
>  static const struct nf_hook_ops apparmor_nf_ops[] = {
>  	{
> -		.hook =         apparmor_ipv4_postroute,
> +		.hook =         apparmor_ip_postroute,
>  		.pf =           NFPROTO_IPV4,
>  		.hooknum =      NF_INET_POST_ROUTING,
>  		.priority =     NF_IP_PRI_SELINUX_FIRST,
>  	},
>  #if IS_ENABLED(CONFIG_IPV6)
>  	{
> -		.hook =         apparmor_ipv6_postroute,
> +		.hook =         apparmor_ip_postroute,
>  		.pf =           NFPROTO_IPV6,
>  		.hooknum =      NF_INET_POST_ROUTING,
>  		.priority =     NF_IP6_PRI_SELINUX_FIRST,
> 


      reply	other threads:[~2021-11-12  1:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-11 14:38 Florian Westphal
2021-11-12  1:26 ` John Johansen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0525571e-9950-b953-f6df-e6a81f5c54cc@canonical.com \
    --to=john.johansen@canonical.com \
    --cc=fw@strlen.de \
    --cc=jmorris@namei.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=serge@hallyn.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®