diff options
author | Naohiro Aota <naota@gentoo.org> | 2012-04-02 10:13:19 +0000 |
---|---|---|
committer | Naohiro Aota <naota@gentoo.org> | 2012-04-02 10:13:19 +0000 |
commit | 822b99da652421512aa497ff89b7543979ad7145 (patch) | |
tree | 44e7079dfda44666f7fd2a875a9c1b4499c562b2 /sys-freebsd/freebsd-sources | |
parent | Restore ~arm in r2 as well, bug #402989. (diff) | |
download | gentoo-2-822b99da652421512aa497ff89b7543979ad7145.tar.gz gentoo-2-822b99da652421512aa497ff89b7543979ad7145.tar.bz2 gentoo-2-822b99da652421512aa497ff89b7543979ad7145.zip |
Add patch to deal with FreeBSD SA 11:05. #408889
(Portage version: 2.2.0_alpha89/cvs/FreeBSD i386)
Diffstat (limited to 'sys-freebsd/freebsd-sources')
-rw-r--r-- | sys-freebsd/freebsd-sources/ChangeLog | 9 | ||||
-rw-r--r-- | sys-freebsd/freebsd-sources/files/freebsd-sources-8.2-unix2.patch | 55 | ||||
-rw-r--r-- | sys-freebsd/freebsd-sources/freebsd-sources-8.2-r1.ebuild (renamed from sys-freebsd/freebsd-sources/freebsd-sources-8.2.ebuild) | 6 |
3 files changed, 67 insertions, 3 deletions
diff --git a/sys-freebsd/freebsd-sources/ChangeLog b/sys-freebsd/freebsd-sources/ChangeLog index 3119f83ad09f..738774f9eec5 100644 --- a/sys-freebsd/freebsd-sources/ChangeLog +++ b/sys-freebsd/freebsd-sources/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-freebsd/freebsd-sources # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog,v 1.63 2012/03/30 15:49:23 aballier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog,v 1.64 2012/04/02 10:13:19 naota Exp $ + +*freebsd-sources-8.2-r1 (02 Apr 2012) + + 02 Apr 2012; Naohiro Aota <naota@gentoo.org> + +files/freebsd-sources-8.2-unix2.patch, +freebsd-sources-8.2-r1.ebuild, + -freebsd-sources-8.2.ebuild: + Add patch to deal with FreeBSD SA 11:05. #408889 30 Mar 2012; Alexis Ballier <aballier@gentoo.org> -freebsd-sources-9.0_rc1.ebuild, -freebsd-sources-9.0_rc2.ebuild, diff --git a/sys-freebsd/freebsd-sources/files/freebsd-sources-8.2-unix2.patch b/sys-freebsd/freebsd-sources/files/freebsd-sources-8.2-unix2.patch new file mode 100644 index 000000000000..50dacd0e5a49 --- /dev/null +++ b/sys-freebsd/freebsd-sources/files/freebsd-sources-8.2-unix2.patch @@ -0,0 +1,55 @@ +Index: sys/kern/uipc_usrreq.c +=================================================================== +--- sys/kern/uipc_usrreq.c (revision 225745) ++++ sys/kern/uipc_usrreq.c (working copy) +@@ -462,6 +462,8 @@ + unp = sotounpcb(so); + KASSERT(unp != NULL, ("uipc_bind: unp == NULL")); + ++ if (soun->sun_len > sizeof(struct sockaddr_un)) ++ return (EINVAL); + namelen = soun->sun_len - offsetof(struct sockaddr_un, sun_path); + if (namelen <= 0) + return (EINVAL); +@@ -1252,6 +1254,8 @@ + unp = sotounpcb(so); + KASSERT(unp != NULL, ("unp_connect: unp == NULL")); + ++ if (nam->sa_len > sizeof(struct sockaddr_un)) ++ return (EINVAL); + len = nam->sa_len - offsetof(struct sockaddr_un, sun_path); + if (len <= 0) + return (EINVAL); +Index: sys/compat/linux/linux_socket.c +=================================================================== +--- sys/compat/linux/linux_socket.c (revision 225919) ++++ sys/compat/linux/linux_socket.c (working copy) +@@ -104,6 +104,7 @@ + int oldv6size; + struct sockaddr_in6 *sin6; + #endif ++ int namelen; + + if (*osalen < 2 || *osalen > UCHAR_MAX || !osa) + return (EINVAL); +@@ -166,6 +167,20 @@ + } + } + ++ if ((bdom == AF_LOCAL) && (*osalen > sizeof(struct sockaddr_un))) { ++ for (namelen = 0; ++ namelen < *osalen - offsetof(struct sockaddr_un, sun_path); ++ namelen++) ++ if (!((struct sockaddr_un *)kosa)->sun_path[namelen]) ++ break; ++ if (namelen + offsetof(struct sockaddr_un, sun_path) > ++ sizeof(struct sockaddr_un)) { ++ error = EINVAL; ++ goto out; ++ } ++ alloclen = sizeof(struct sockaddr_un); ++ } ++ + sa = (struct sockaddr *) kosa; + sa->sa_family = bdom; + sa->sa_len = alloclen; diff --git a/sys-freebsd/freebsd-sources/freebsd-sources-8.2.ebuild b/sys-freebsd/freebsd-sources/freebsd-sources-8.2-r1.ebuild index c39b7386b11d..0ffa86a25486 100644 --- a/sys-freebsd/freebsd-sources/freebsd-sources-8.2.ebuild +++ b/sys-freebsd/freebsd-sources/freebsd-sources-8.2-r1.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/freebsd-sources-8.2.ebuild,v 1.1 2011/07/06 06:09:18 aballier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/freebsd-sources-8.2-r1.ebuild,v 1.1 2012/04/02 10:13:19 naota Exp $ inherit bsdmk freebsd flag-o-matic @@ -52,6 +52,8 @@ src_unpack() { epatch "${FILESDIR}/${PN}-7.1-types.h-fix.patch" epatch "${FILESDIR}/${PN}-8.0-subnet-route-pr40133.patch" epatch "${FILESDIR}/${PN}-7.1-includes.patch" + # http://security.FreeBSD.org/patches/SA-11:05/unix2.patch + epatch "${FILESDIR}"/${P}-unix2.patch # By adding -DGENTOO_LIVECD to CFLAGS activate this stub # vop_whiteout to tmpfs, so it can be used as an overlay |