Accepted connections of types other than AF_INET, AF_INET6, AF_UNIX
won't have an appropriate label derived from the peer, so don't use it.
Signed-off-by: David Woodhouse <[EMAIL PROTECTED]>
Acked-by: Stephen Smalley <[EMAIL PROTECTED]>
--- linux-2.6.18.ppc/security/selinux/hooks.c~ 2006-09-28 14:37:20.000000000
+0100
+++ linux-2.6.18.ppc/security/selinux/hooks.c 2006-09-29 19:00:25.000000000
+0100
@@ -3604,7 +3604,9 @@ void selinux_sock_graft(struct sock* sk,
struct inode_security_struct *isec = SOCK_INODE(parent)->i_security;
struct sk_security_struct *sksec = sk->sk_security;
- isec->sid = sksec->sid;
+ if (sk->sk_family == PF_INET || sk->sk_family == PF_INET6 ||
+ sk->sk_family == PF_UNIX)
+ isec->sid = sksec->sid;
selinux_netlbl_sock_graft(sk, parent);
}
--
dwmw2
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html