summaryrefslogtreecommitdiff
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
authorJames Morris <james.l.morris@oracle.com>2014-01-06 18:45:59 +0400
committerJames Morris <james.l.morris@oracle.com>2014-01-06 18:45:59 +0400
commitd4a82a4a033d563f1dc2c944eec2358cb38432d0 (patch)
tree83f8fca138299584d47930d2509151ea38050253 /security/selinux/hooks.c
parent5f64822d63efa20cee9efe8766b3a62ab6a1f6c3 (diff)
parent465954cd649a7d8cd331695bd24a16bcb5c4c716 (diff)
downloadlinux-d4a82a4a033d563f1dc2c944eec2358cb38432d0.tar.xz
Merge branch 'master' of git://git.infradead.org/users/pcmoore/selinux into next
Conflicts: security/selinux/hooks.c Resolved using request struct. Signed-off-by: James Morris <james.l.morris@oracle.com>
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r--security/selinux/hooks.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 6625699f497c..3219560f9fae 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -82,7 +82,6 @@
#include <linux/syslog.h>
#include <linux/user_namespace.h>
#include <linux/export.h>
-#include <linux/security.h>
#include <linux/msg.h>
#include <linux/shm.h>
@@ -4474,14 +4473,10 @@ static int selinux_inet_conn_request(struct sock *sk, struct sk_buff *skb,
{
struct sk_security_struct *sksec = sk->sk_security;
int err;
- u16 family = sk->sk_family;
+ u16 family = req->rsk_ops->family;
u32 connsid;
u32 peersid;
- /* handle mapped IPv4 packets arriving via IPv6 sockets */
- if (family == PF_INET6 && skb->protocol == htons(ETH_P_IP))
- family = PF_INET;
-
err = selinux_skb_peerlbl_sid(skb, family, &peersid);
if (err)
return err;