aboutsummaryrefslogtreecommitdiffstats
path: root/security/apparmor
diff options
context:
space:
mode:
Diffstat (limited to 'security/apparmor')
-rw-r--r--security/apparmor/domain.c5
-rw-r--r--security/apparmor/lsm.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/security/apparmor/domain.c b/security/apparmor/domain.c
index 08c88de0ffda..11975ec8d566 100644
--- a/security/apparmor/domain.c
+++ b/security/apparmor/domain.c
@@ -1444,7 +1444,10 @@ check:
1444 new = aa_label_merge(label, target, GFP_KERNEL); 1444 new = aa_label_merge(label, target, GFP_KERNEL);
1445 if (IS_ERR_OR_NULL(new)) { 1445 if (IS_ERR_OR_NULL(new)) {
1446 info = "failed to build target label"; 1446 info = "failed to build target label";
1447 error = PTR_ERR(new); 1447 if (!new)
1448 error = -ENOMEM;
1449 else
1450 error = PTR_ERR(new);
1448 new = NULL; 1451 new = NULL;
1449 perms.allow = 0; 1452 perms.allow = 0;
1450 goto audit; 1453 goto audit;
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
index 2c010874329f..8db1731d046a 100644
--- a/security/apparmor/lsm.c
+++ b/security/apparmor/lsm.c
@@ -1599,12 +1599,14 @@ static unsigned int apparmor_ipv4_postroute(void *priv,
1599 return apparmor_ip_postroute(priv, skb, state); 1599 return apparmor_ip_postroute(priv, skb, state);
1600} 1600}
1601 1601
1602#if IS_ENABLED(CONFIG_IPV6)
1602static unsigned int apparmor_ipv6_postroute(void *priv, 1603static unsigned int apparmor_ipv6_postroute(void *priv,
1603 struct sk_buff *skb, 1604 struct sk_buff *skb,
1604 const struct nf_hook_state *state) 1605 const struct nf_hook_state *state)
1605{ 1606{
1606 return apparmor_ip_postroute(priv, skb, state); 1607 return apparmor_ip_postroute(priv, skb, state);
1607} 1608}
1609#endif
1608 1610
1609static const struct nf_hook_ops apparmor_nf_ops[] = { 1611static const struct nf_hook_ops apparmor_nf_ops[] = {
1610 { 1612 {