Commit b7bd29b5 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'apparmor-pr-2019-02-01' of...

Merge tag 'apparmor-pr-2019-02-01' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor

Pull apparmor bug fixes from John Johansen:
 "Two bug fixes for apparmor:

   - Fix aa_label_build() error handling for failed merges

   - Fix warning about unused function apparmor_ipv6_postroute"

* tag 'apparmor-pr-2019-02-01' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor:
  apparmor: Fix aa_label_build() error handling for failed merges
  apparmor: Fix warning about unused function apparmor_ipv6_postroute
parents 5eeb6335 d6d478ae
...@@ -1444,7 +1444,10 @@ int aa_change_profile(const char *fqname, int flags) ...@@ -1444,7 +1444,10 @@ int aa_change_profile(const char *fqname, int flags)
new = aa_label_merge(label, target, GFP_KERNEL); new = aa_label_merge(label, target, GFP_KERNEL);
if (IS_ERR_OR_NULL(new)) { if (IS_ERR_OR_NULL(new)) {
info = "failed to build target label"; info = "failed to build target label";
error = PTR_ERR(new); if (!new)
error = -ENOMEM;
else
error = PTR_ERR(new);
new = NULL; new = NULL;
perms.allow = 0; perms.allow = 0;
goto audit; goto audit;
......
...@@ -1599,12 +1599,14 @@ static unsigned int apparmor_ipv4_postroute(void *priv, ...@@ -1599,12 +1599,14 @@ static unsigned int apparmor_ipv4_postroute(void *priv,
return apparmor_ip_postroute(priv, skb, state); return apparmor_ip_postroute(priv, skb, state);
} }
#if IS_ENABLED(CONFIG_IPV6)
static unsigned int apparmor_ipv6_postroute(void *priv, static unsigned int apparmor_ipv6_postroute(void *priv,
struct sk_buff *skb, struct sk_buff *skb,
const struct nf_hook_state *state) const struct nf_hook_state *state)
{ {
return apparmor_ip_postroute(priv, skb, state); return apparmor_ip_postroute(priv, skb, state);
} }
#endif
static const struct nf_hook_ops apparmor_nf_ops[] = { static const struct nf_hook_ops apparmor_nf_ops[] = {
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment