# 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:
--- /dev/null
+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
--- /dev/null
+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;
--- /dev/null
+# 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
+}