diff options
author | Roy Marples <uberlord@gentoo.org> | 2007-08-22 09:51:17 +0000 |
---|---|---|
committer | Roy Marples <uberlord@gentoo.org> | 2007-08-22 09:51:17 +0000 |
commit | 80d1eb6a9496ab13d9dfaae2b9f48eb0c9954762 (patch) | |
tree | b3e0ceea8be6b2c4a977ed794218a1433e2eac00 /net-misc/rsync | |
parent | Add .menu to allowed extensions. Missed in the last commit... (diff) | |
download | gentoo-2-80d1eb6a9496ab13d9dfaae2b9f48eb0c9954762.tar.gz gentoo-2-80d1eb6a9496ab13d9dfaae2b9f48eb0c9954762.tar.bz2 gentoo-2-80d1eb6a9496ab13d9dfaae2b9f48eb0c9954762.zip |
Fix off-by-one errors, #189132 thanks to Tobias Scherbaum.
(Portage version: 2.1.3.6)
Diffstat (limited to 'net-misc/rsync')
-rw-r--r-- | net-misc/rsync/ChangeLog | 8 | ||||
-rw-r--r-- | net-misc/rsync/files/digest-rsync-2.6.9-r3 | 3 | ||||
-rw-r--r-- | net-misc/rsync/files/rsync-2.6.9-fname-obo.patch | 60 | ||||
-rw-r--r-- | net-misc/rsync/rsync-2.6.9-r3.ebuild | 75 |
4 files changed, 145 insertions, 1 deletions
diff --git a/net-misc/rsync/ChangeLog b/net-misc/rsync/ChangeLog index 888995fd5d92..c40251b2f040 100644 --- a/net-misc/rsync/ChangeLog +++ b/net-misc/rsync/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-misc/rsync # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/rsync/ChangeLog,v 1.122 2007/07/10 17:42:12 angelos Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/rsync/ChangeLog,v 1.123 2007/08/22 09:51:17 uberlord Exp $ + +*rsync-2.6.9-r3 (22 Aug 2007) + + 22 Aug 2007; Roy Marples <uberlord@gentoo.org> + +files/rsync-2.6.9-fname-obo.patch, +rsync-2.6.9-r3.ebuild: + Fix off-by-one errors, #189132 thanks to Tobias Scherbaum. 10 Jul 2007; Christoph Mende <angelos@gentoo.org> rsync-2.6.9-r2.ebuild: Stable on amd64 wrt bug #184685 diff --git a/net-misc/rsync/files/digest-rsync-2.6.9-r3 b/net-misc/rsync/files/digest-rsync-2.6.9-r3 new file mode 100644 index 000000000000..fca949e58851 --- /dev/null +++ b/net-misc/rsync/files/digest-rsync-2.6.9-r3 @@ -0,0 +1,3 @@ +MD5 996d8d8831dbca17910094e56dcb5942 rsync-2.6.9.tar.gz 811841 +RMD160 36d270d9f01e9a8e808f426196796001bdd3d5d2 rsync-2.6.9.tar.gz 811841 +SHA256 ca437301becd890e73300bc69a39189ff1564baa761948ff149b3dd7bde633f9 rsync-2.6.9.tar.gz 811841 diff --git a/net-misc/rsync/files/rsync-2.6.9-fname-obo.patch b/net-misc/rsync/files/rsync-2.6.9-fname-obo.patch new file mode 100644 index 000000000000..2fa0113020b7 --- /dev/null +++ b/net-misc/rsync/files/rsync-2.6.9-fname-obo.patch @@ -0,0 +1,60 @@ +--- rsync-2.6.9.orig/sender.c 2006-09-20 03:53:32.000000000 +0200 ++++ rsync-2.6.9/sender.c 2007-07-25 15:33:05.000000000 +0200 +@@ -123,6 +123,7 @@ + char fname[MAXPATHLEN]; + struct file_struct *file; + unsigned int offset; ++ size_t l = 0; + + if (ndx < 0 || ndx >= the_file_list->count) + return; +@@ -133,6 +134,20 @@ + file->dir.root, "/", NULL); + } else + offset = 0; ++ ++ l = offset + 1; ++ if (file) { ++ if (file->dirname) ++ l += strlen(file->dirname); ++ if (file->basename) ++ l += strlen(file->basename); ++ } ++ ++ if (l >= sizeof(fname)) { ++ rprintf(FERROR, "Overlong pathname\n"); ++ exit_cleanup(RERR_FILESELECT); ++ } ++ + f_name(file, fname + offset); + if (remove_source_files) { + if (do_unlink(fname) == 0) { +@@ -224,6 +239,7 @@ + enum logcode log_code = log_before_transfer ? FLOG : FINFO; + int f_xfer = write_batch < 0 ? batch_fd : f_out; + int i, j; ++ size_t l = 0; + + if (verbose > 2) + rprintf(FINFO, "send_files starting\n"); +@@ -259,6 +275,20 @@ + fname[offset++] = '/'; + } else + offset = 0; ++ ++ l = offset + 1; ++ if (file) { ++ if (file->dirname) ++ l += strlen(file->dirname); ++ if (file->basename) ++ l += strlen(file->basename); ++ } ++ ++ if (l >= sizeof(fname)) { ++ rprintf(FERROR, "Overlong pathname\n"); ++ exit_cleanup(RERR_FILESELECT); ++ } ++ + fname2 = f_name(file, fname + offset); + + if (verbose > 2) diff --git a/net-misc/rsync/rsync-2.6.9-r3.ebuild b/net-misc/rsync/rsync-2.6.9-r3.ebuild new file mode 100644 index 000000000000..c506d3385927 --- /dev/null +++ b/net-misc/rsync/rsync-2.6.9-r3.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/rsync/rsync-2.6.9-r3.ebuild,v 1.1 2007/08/22 09:51:17 uberlord Exp $ + +inherit eutils flag-o-matic toolchain-funcs + +DESCRIPTION="File transfer program to keep remote files into sync" +HOMEPAGE="http://rsync.samba.org/" +SRC_URI="http://rsync.samba.org/ftp/rsync/${P/_/}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" +IUSE="acl ipv6 static xinetd" + +DEPEND=">=dev-libs/popt-1.5 + acl? ( kernel_linux? ( sys-apps/acl ) ) + xinetd? ( sys-apps/xinetd )" + +S=${WORKDIR}/${P/_/} + +src_unpack() { + unpack ${P/_/}.tar.gz + cd "${S}" + if use acl ; then + epatch patches/{acls,xattrs}.diff + epatch "${FILESDIR}"/${P}-delete-acls-xattr.patch + ./prepare-source || die + fi + epatch "${FILESDIR}"/${P}-stats-fix.patch #165121 + epatch "${FILESDIR}"/${P}-fname-obo.patch #189132 +} + +src_compile() { + [[ $(gcc-version) == "2.95" ]] && append-ldflags -lpthread + use static && append-ldflags -static + + econf \ + --without-included-popt \ + $(use_enable acl acl-support) \ + $(use_enable acl xattr-support) \ + $(use_enable ipv6) \ + --with-rsyncd-conf=/etc/rsyncd.conf \ + || die + emake || die "emake failed" +} + +pkg_preinst() { + if [[ -e ${ROOT}/etc/rsync/rsyncd.conf ]] && [[ ! -e ${ROOT}/etc/rsyncd.conf ]] ; then + mv "${ROOT}"/etc/rsync/rsyncd.conf "${ROOT}"/etc/rsyncd.conf + rm -f "${ROOT}"/etc/rsync/.keep + rmdir "${ROOT}"/etc/rsync >& /dev/null + fi +} + +src_install() { + emake DESTDIR="${D}" install || die "make install failed" + newconfd "${FILESDIR}"/rsyncd.conf.d rsyncd + newinitd "${FILESDIR}"/rsyncd.init.d rsyncd + dodoc NEWS OLDNEWS README TODO tech_report.tex + insinto /etc + doins "${FILESDIR}"/rsyncd.conf + if use xinetd ; then + insinto /etc/xinetd.d + newins "${FILESDIR}"/rsyncd.xinetd rsyncd + fi +} + +pkg_postinst() { + ewarn "The rsyncd.conf file has been moved for you to /etc/rsyncd.conf" + echo + ewarn "Please make sure you do NOT disable the rsync server running" + ewarn "in a chroot. Please check /etc/rsyncd.conf and make sure" + ewarn "it says: use chroot = yes" +} |