aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
Diffstat (limited to 'security')
-rw-r--r--security/selinux/hooks.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index cac0273ec447..e9969a2fc846 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -3619,7 +3619,9 @@ static void selinux_sock_graft(struct sock* sk, struct socket *parent)
3619 struct inode_security_struct *isec = SOCK_INODE(parent)->i_security; 3619 struct inode_security_struct *isec = SOCK_INODE(parent)->i_security;
3620 struct sk_security_struct *sksec = sk->sk_security; 3620 struct sk_security_struct *sksec = sk->sk_security;
3621 3621
3622 isec->sid = sksec->sid; 3622 if (sk->sk_family == PF_INET || sk->sk_family == PF_INET6 ||
3623 sk->sk_family == PF_UNIX)
3624 isec->sid = sksec->sid;
3623 3625
3624 selinux_netlbl_sock_graft(sk, parent); 3626 selinux_netlbl_sock_graft(sk, parent);
3625} 3627}