diff options
author | Tim Yamin <plasmaroo@gentoo.org> | 2004-12-19 18:50:09 +0000 |
---|---|---|
committer | Tim Yamin <plasmaroo@gentoo.org> | 2004-12-19 18:50:09 +0000 |
commit | a59ed034f345fb9d28abae720bb1c14226c4d74e (patch) | |
tree | a9720e5595803f69aaeb28b5ebb02dd960c164a8 /sys-kernel/ck-sources | |
parent | minor dependency change (Manifest recommit) (diff) | |
download | gentoo-2-a59ed034f345fb9d28abae720bb1c14226c4d74e.tar.gz gentoo-2-a59ed034f345fb9d28abae720bb1c14226c4d74e.tar.bz2 gentoo-2-a59ed034f345fb9d28abae720bb1c14226c4d74e.zip |
Adding patch for CAN-2004-1069; bug #72317.
Diffstat (limited to 'sys-kernel/ck-sources')
-rw-r--r-- | sys-kernel/ck-sources/ChangeLog | 6 | ||||
-rw-r--r-- | sys-kernel/ck-sources/ck-sources-2.6.9-r3.ebuild | 3 | ||||
-rw-r--r-- | sys-kernel/ck-sources/files/ck-sources-2.6.9.AF_UNIX.SELinux.patch | 61 |
3 files changed, 68 insertions, 2 deletions
diff --git a/sys-kernel/ck-sources/ChangeLog b/sys-kernel/ck-sources/ChangeLog index 7b1bd98259bd..8b2ffdd428eb 100644 --- a/sys-kernel/ck-sources/ChangeLog +++ b/sys-kernel/ck-sources/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-kernel/ck-sources # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/ck-sources/ChangeLog,v 1.72 2004/12/03 20:19:55 plasmaroo Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/ck-sources/ChangeLog,v 1.73 2004/12/19 18:50:09 plasmaroo Exp $ + + 19 Dec 2004; <plasmaroo@gentoo.org> ck-sources-2.6.9-r3.ebuild, + +files/ck-sources-2.6.9.AF_UNIX.SELinux.patch: + Adding patch for CAN-2004-1069; bug #72317. 03 Dec 2004; <plasmaroo@gentoo.org> ck-sources-2.6.9-r3.ebuild, +files/ck-sources-2.6.9.vma.patch: diff --git a/sys-kernel/ck-sources/ck-sources-2.6.9-r3.ebuild b/sys-kernel/ck-sources/ck-sources-2.6.9-r3.ebuild index 1b1384d01f08..6a2ef6e8f067 100644 --- a/sys-kernel/ck-sources/ck-sources-2.6.9-r3.ebuild +++ b/sys-kernel/ck-sources/ck-sources-2.6.9-r3.ebuild @@ -1,11 +1,12 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/ck-sources/ck-sources-2.6.9-r3.ebuild,v 1.7 2004/12/03 20:19:55 plasmaroo Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/ck-sources/ck-sources-2.6.9-r3.ebuild,v 1.8 2004/12/19 18:50:09 plasmaroo Exp $ UNIPATCH_LIST="${DISTDIR}/patch-${KV}.bz2 ${FILESDIR}/${P}.binfmt_elf.patch ${FILESDIR}/${P}.binfmt_a.out.patch ${FILESDIR}/${P}.AF_UNIX.patch + ${FILESDIR}/${P}.AF_UNIX.SELinux.patch ${FILESDIR}/${P}.vma.patch" K_PREPATCHED="yes" UNIPATCH_STRICTORDER="yes" diff --git a/sys-kernel/ck-sources/files/ck-sources-2.6.9.AF_UNIX.SELinux.patch b/sys-kernel/ck-sources/files/ck-sources-2.6.9.AF_UNIX.SELinux.patch new file mode 100644 index 000000000000..dbb8b2329a28 --- /dev/null +++ b/sys-kernel/ck-sources/files/ck-sources-2.6.9.AF_UNIX.SELinux.patch @@ -0,0 +1,61 @@ +--- a/net/unix/af_unix.c 2004-10-18 22:54:37.000000000 +0100 ++++ b/net/unix/af_unix.c 2004-12-19 18:33:12.000000000 +0000 +@@ -477,6 +477,8 @@ + struct msghdr *, size_t, int); + static int unix_dgram_connect(struct socket *, struct sockaddr *, + int, int); ++static int unix_seqpacket_sendmsg(struct kiocb *, struct socket *, ++ struct msghdr *, size_t); + + static struct proto_ops unix_stream_ops = { + .family = PF_UNIX, +@@ -535,7 +537,7 @@ + .shutdown = unix_shutdown, + .setsockopt = sock_no_setsockopt, + .getsockopt = sock_no_getsockopt, +- .sendmsg = unix_dgram_sendmsg, ++ .sendmsg = unix_seqpacket_sendmsg, + .recvmsg = unix_dgram_recvmsg, + .mmap = sock_no_mmap, + .sendpage = sock_no_sendpage, +@@ -1365,9 +1367,11 @@ + if (other->sk_shutdown & RCV_SHUTDOWN) + goto out_unlock; + +- err = security_unix_may_send(sk->sk_socket, other->sk_socket); +- if (err) +- goto out_unlock; ++ if (sk->sk_type != SOCK_SEQPACKET) { ++ err = security_unix_may_send(sk->sk_socket, other->sk_socket); ++ if (err) ++ goto out_unlock; ++ } + + if (unix_peer(other) != sk && + (skb_queue_len(&other->sk_receive_queue) > +@@ -1517,6 +1521,25 @@ + return sent ? : err; + } + ++static int unix_seqpacket_sendmsg(struct kiocb *kiocb, struct socket *sock, ++ struct msghdr *msg, size_t len) ++{ ++ int err; ++ struct sock *sk = sock->sk; ++ ++ err = sock_error(sk); ++ if (err) ++ return err; ++ ++ if (sk->sk_state != TCP_ESTABLISHED) ++ return -ENOTCONN; ++ ++ if (msg->msg_namelen) ++ msg->msg_namelen = 0; ++ ++ return unix_dgram_sendmsg(kiocb, sock, msg, len); ++} ++ + static void unix_copy_addr(struct msghdr *msg, struct sock *sk) + { + struct unix_sock *u = unix_sk(sk); |