Clean up ebuild and fix poor memory usage #147705 by Andreas Kling.
authorMike Frysinger <vapier@gentoo.org>
Sat, 11 Nov 2006 07:49:37 +0000 (07:49 +0000)
committerMike Frysinger <vapier@gentoo.org>
Sat, 11 Nov 2006 07:49:37 +0000 (07:49 +0000)
Package-Manager: portage-2.1.2_rc1-r5

net-misc/netkit-fingerd/ChangeLog
net-misc/netkit-fingerd/files/digest-netkit-fingerd-0.17-r3 [new file with mode: 0644]
net-misc/netkit-fingerd/files/netkit-fingerd-0.17-name-check.patch [new file with mode: 0644]
net-misc/netkit-fingerd/netkit-fingerd-0.17-r3.ebuild [new file with mode: 0644]

index da11a960573307dcadaa29895fbfb104303dd6c7..145ba5b0ea0bbbd41387174a2b775c7a95ba0c06 100644 (file)
@@ -1,6 +1,13 @@
 # ChangeLog for net-misc/netkit-fingerd
-# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/netkit-fingerd/ChangeLog,v 1.16 2006/04/02 22:20:04 robbat2 Exp $
+# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/netkit-fingerd/ChangeLog,v 1.17 2006/11/11 07:49:37 vapier Exp $
+
+*netkit-fingerd-0.17-r3 (11 Nov 2006)
+
+  11 Nov 2006; Mike Frysinger <vapier@gentoo.org>
+  +files/netkit-fingerd-0.17-name-check.patch,
+  -netkit-fingerd-0.17-r2.ebuild, +netkit-fingerd-0.17-r3.ebuild:
+  Clean up ebuild and fix poor memory usage #147705 by Andreas Kling.
 
   02 Apr 2006; Robin H. Johnson <robbat2@gentoo.org>
   netkit-fingerd-0.17-r2.ebuild:
diff --git a/net-misc/netkit-fingerd/files/digest-netkit-fingerd-0.17-r3 b/net-misc/netkit-fingerd/files/digest-netkit-fingerd-0.17-r3
new file mode 100644 (file)
index 0000000..6bccceb
--- /dev/null
@@ -0,0 +1,3 @@
+MD5 52bf281aac8814bf56cdc92f7661ee75 bsd-finger_0.17.orig.tar.gz 25521
+RMD160 2e7181e9ce4c02254be606a794e4c83c88614e8d bsd-finger_0.17.orig.tar.gz 25521
+SHA256 84885d668d117ef50e01c7034a45d8343d747cec6212e40e8d08151bc18e13fa bsd-finger_0.17.orig.tar.gz 25521
diff --git a/net-misc/netkit-fingerd/files/netkit-fingerd-0.17-name-check.patch b/net-misc/netkit-fingerd/files/netkit-fingerd-0.17-name-check.patch
new file mode 100644 (file)
index 0000000..aa40221
--- /dev/null
@@ -0,0 +1,26 @@
+fix possible usage of uninitialized memory
+
+http://bugs.gentoo.org/80286
+
+--- bsd-finger-0.17/finger/lprint.c
++++ bsd-finger-0.17/finger/lprint.c
+@@ -100,7 +100,7 @@
+        *      office, office phone, home phone if available
+        */
+       xprintf("Login: %-15s\t\t\tName: %s\nDirectory: %-25s",
+-              pn->name, pn->realname, pn->dir);
++              pn->name, pn->realname ? pn->realname : "", pn->dir);
+       xprintf("\tShell: %-s\n", *pn->shell ? pn->shell : _PATH_BSHELL);
+       /*
+--- bsd-finger-0.17/finger/util.c
++++ bsd-finger-0.17/finger/util.c
+@@ -149,6 +149,8 @@
+               rname[j] = 0;
+               pn->realname = rname;
++      } else {
++              pn->realname = NULL;
+       }
+       pn->office =      fields[1] ? strdup(fields[1]) : NULL;
diff --git a/net-misc/netkit-fingerd/netkit-fingerd-0.17-r3.ebuild b/net-misc/netkit-fingerd/netkit-fingerd-0.17-r3.ebuild
new file mode 100644 (file)
index 0000000..962b1ce
--- /dev/null
@@ -0,0 +1,47 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/netkit-fingerd/netkit-fingerd-0.17-r3.ebuild,v 1.1 2006/11/11 07:49:37 vapier Exp $
+
+inherit eutils
+
+MY_PN="${PN/netkit/bsd}"
+MY_PN="${MY_PN/rd/r}"
+DESCRIPTION="Netkit - fingerd and finger client"
+HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/"
+SRC_URI="mirror://debian/pool/main/b/${MY_PN}/${MY_PN}_${PV}.orig.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 sparc x86"
+IUSE="xinetd"
+
+S=${WORKDIR}/${MY_PN}-${PV}
+
+src_unpack() {
+       unpack ${A}
+       cd "${S}"
+       sed -i \
+               -e '/^LDFLAGS=$/d' \
+               -e '/CFLAGS/s:-O2::' \
+               configure
+       epatch "${FILESDIR}"/${P}-r2-gentoo.diff
+       epatch "${FILESDIR}"/${P}-name-check.patch #80286
+}
+
+src_compile() {
+       ./configure || die
+       emake || die
+}
+
+src_install() {
+       into /usr
+       dobin finger/finger || die
+       dosbin fingerd/fingerd || die
+       dosym fingerd /usr/sbin/in.fingerd
+       doman finger/finger.1 fingerd/fingerd.8
+       dosym fingerd.8 /usr/share/man/man8/in.fingerd.8
+       dodoc README ChangeLog BUGS
+
+       insinto /etc/xinetd.d
+       newins "${FILESDIR}"/fingerd.xinetd fingerd
+}