提交 6f68dc37 编写于 作者: D David S. Miller

[NET]: Fix warnings after LSM-IPSEC changes.

Assignment used as truth value in xfrm_del_sa()
and xfrm_get_policy().

Wrong argument type declared for security_xfrm_state_delete()
when SELINUX is disabled.
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 9dadaa19
...@@ -2995,7 +2995,7 @@ static inline void security_xfrm_state_free(struct xfrm_state *x) ...@@ -2995,7 +2995,7 @@ static inline void security_xfrm_state_free(struct xfrm_state *x)
{ {
} }
static inline int security_xfrm_state_delete(struct xfrm_policy *xp) static inline int security_xfrm_state_delete(struct xfrm_state *x)
{ {
return 0; return 0;
} }
......
...@@ -427,7 +427,7 @@ static int xfrm_del_sa(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfrma) ...@@ -427,7 +427,7 @@ static int xfrm_del_sa(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfrma)
if (x == NULL) if (x == NULL)
return -ESRCH; return -ESRCH;
if (err = security_xfrm_state_delete(x)) if ((err = security_xfrm_state_delete(x)) != 0)
goto out; goto out;
if (xfrm_state_kern(x)) { if (xfrm_state_kern(x)) {
...@@ -1057,7 +1057,7 @@ static int xfrm_get_policy(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfr ...@@ -1057,7 +1057,7 @@ static int xfrm_get_policy(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfr
MSG_DONTWAIT); MSG_DONTWAIT);
} }
} else { } else {
if (err = security_xfrm_policy_delete(xp)) if ((err = security_xfrm_policy_delete(xp)) != 0)
goto out; goto out;
c.data.byid = p->index; c.data.byid = p->index;
c.event = nlh->nlmsg_type; c.event = nlh->nlmsg_type;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册