summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-auth/skey/ChangeLog207
-rw-r--r--sys-auth/skey/Manifest9
-rw-r--r--sys-auth/skey/files/skey-1.1.5-bind-now.patch15
-rw-r--r--sys-auth/skey/files/skey-1.1.5-fPIC.patch12
-rw-r--r--sys-auth/skey/files/skey-1.1.5-otp.diff59
-rw-r--r--sys-auth/skey/files/skey-login_name_max.diff15
-rw-r--r--sys-auth/skey/metadata.xml30
-rw-r--r--sys-auth/skey/skey-1.1.5-r6.ebuild113
8 files changed, 460 insertions, 0 deletions
diff --git a/sys-auth/skey/ChangeLog b/sys-auth/skey/ChangeLog
new file mode 100644
index 000000000000..d3ed18eb71a3
--- /dev/null
+++ b/sys-auth/skey/ChangeLog
@@ -0,0 +1,207 @@
+# ChangeLog for sys-auth/skey
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-auth/skey/ChangeLog,v 1.1 2008/05/11 12:36:09 ulm Exp $
+
+ 11 May 2008; Ulrich Mueller <ulm@gentoo.org>
+ +files/skey-1.1.5-bind-now.patch, +files/skey-1.1.5-fPIC.patch,
+ +files/skey-1.1.5-otp.diff, +files/skey-login_name_max.diff,
+ +metadata.xml, +skey-1.1.5-r6.ebuild:
+ Package move from app-admin/skey to sys-auth/skey.
+
+ 10 Feb 2008; Ulrich Mueller <ulm@gentoo.org> -skey-1.1.5-r5.ebuild:
+ Remove old.
+
+ 08 Jan 2008; Raúl Porcel <armin76@gentoo.org> skey-1.1.5-r6.ebuild:
+ alpha/ia64 stable wrt #204653
+
+ 08 Jan 2008; Jeroen Roovers <jer@gentoo.org> skey-1.1.5-r6.ebuild:
+ Stable for HPPA (bug #204653).
+
+ 07 Jan 2008; Ulrich Mueller <ulm@gentoo.org> skey-1.1.5-r6.ebuild:
+ Stable on amd64, bug #204653.
+
+ 07 Jan 2008; Joseph Jezak <josejx@gentoo.org> skey-1.1.5-r6.ebuild:
+ Marked ppc/ppc64 stable for bug #204653.
+
+ 06 Jan 2008; Markus Ullmann <jokey@gentoo.org> skey-1.1.5-r6.ebuild:
+ Stable on arm/sparc/x86 wrt bug #204653
+
+ 25 Dec 2007; Ulrich Mueller <ulm@gentoo.org> metadata.xml:
+ Add myself as maintainer.
+
+ 25 Dec 2007; Christian Heim <phreak@gentoo.org> metadata.xml:
+ Removing taviso from metadata.xml as per #202471. Assigning to
+ maintainer-needed.
+
+ 08 Dec 2007; Ulrich Mueller <ulm@gentoo.org> skey-1.1.5-r5.ebuild,
+ skey-1.1.5-r6.ebuild:
+ Update LICENSE information, fixes bug #200319.
+
+ 24 Jan 2007; Marius Mauch <genone@gentoo.org> skey-1.1.5-r5.ebuild,
+ skey-1.1.5-r6.ebuild:
+ Replacing einfo with elog
+
+*skey-1.1.5-r6 (05 Jan 2007)
+
+ 29 Apr 2006; Joshua Kinard <kumba@gentoo.org> skey-1.1.5-r5.ebuild:
+ Marked stable on mips.
+
+ 08 Apr 2006; Simon Stelling <blubb@gentoo.org> skey-1.1.5-r5.ebuild:
+ stable on amd64
+
+ 21 Feb 2006; Stephanie Lockwood-Childs <wormo@gentoo.org>
+ skey-1.1.5-r5.ebuild:
+ stable on ppc (Bug #125056)
+
+ 14 Mar 2006; Jose Luis Rivero <yoswink@gentoo.org> skey-1.1.5-r5.ebuild:
+ Stable on alpha wrt #125056
+
+ 13 Mar 2006; Joshua Jackson <tsunam@gentoo.org> skey-1.1.5-r5.ebuild:
+ Stable on x86; bug #125056
+
+ 09 Mar 2006; Aron Griffis <agriffis@gentoo.org> skey-1.1.5-r5.ebuild:
+ Mark 1.1.5-r5 stable on ia64
+
+ 06 Mar 2006; Gustavo Zacarias <gustavoz@gentoo.org> skey-1.1.5-r5.ebuild:
+ Stable on sparc wrt #125056
+
+ 06 Mar 2006; Guy Martin <gmsoft@gentoo.org> skey-1.1.5-r5.ebuild:
+ Stable on hppa.
+
+ 06 Mar 2006; Tom Gall <tgall@gentoo.org> skey-1.1.5-r5.ebuild:
+ stable on ppc64, bug #125056
+
+ 31 Jan 2006; Stefan Briesenick <sbriesen@gentoo.org> skey-1.1.5-r3.ebuild,
+ skey-1.1.5-r4.ebuild, skey-1.1.5-r5.ebuild:
+ fixing location for gentoo-patch.
+
+ 28 Jan 2006; Simon Stelling <blubb@gentoo.org>
+ -files/skey-1.1.5-gentoo.diff.gz, skey-1.1.5-r3.ebuild,
+ skey-1.1.5-r4.ebuild, skey-1.1.5-r5.ebuild:
+ move compressed patches to the mirrors
+
+ 06 Oct 2005; Hardave Riar <hardave@gentoo.org> skey-1.1.5-r4.ebuild:
+ Stable on mips.
+
+ 19 Aug 2005; Mike Frysinger <vapier@gentoo.org>
+ +files/skey-1.1.5-bind-now.patch, skey-1.1.5-r5.ebuild:
+ Remove shadow from DEPEND #103055 and clean up a bit.
+
+ 08 Apr 2005; Markus Rothe <corsair@gentoo.org> skey-1.1.5-r4.ebuild:
+ Stable on ppc64
+
+ 27 Mar 2005; Michael Hanselmann <hansmi@gentoo.org> skey-1.1.5-r4.ebuild:
+ Stable on ppc.
+
+*skey-1.1.5-r5 (03 Mar 2005)
+
+ 03 Mar 2005; Tavis Ormandy <taviso@gentoo.org> +files/skey-1.1.5-otp.diff,
+ +skey-1.1.5-r5.ebuild:
+ fixing #71015, add convienience links for skey invokation, otp-xxx.
+ Thanks to Ulrich Mueller for the patch.
+
+ 07 Feb 2005; Gustavo Zacarias <gustavoz@gentoo.org> skey-1.1.5-r4.ebuild:
+ Stable on sparc
+
+ 06 Feb 2005; Bryan Østergaard <kloeri@gentoo.org> skey-1.1.5-r4.ebuild:
+ Stable on alpha.
+
+ 28 Dec 2004; Ciaran McCreesh <ciaranm@gentoo.org> :
+ Change encoding to UTF-8 for GLEP 31 compliance
+
+ 07 Oct 2004; Tavis Ormandy <taviso@gentoo.org> skey-1.1.5-r4.ebuild:
+ skeyprune should be in sbin, #66684
+
+ 23 Sep 2004; Tavis Ormandy <taviso@gentoo.org> skey-1.1.5-r4.ebuild:
+ skeyprune regex for matching zeroed entries was case sensitive, meaning it
+ missed legitimate entries. fixed. #64971, skeyinit man page claims md4 is the
+ default hash algorithm, this is no longer the case. fixed.
+ Thanks to Ulrich Mueller for his help with the skey package.
+
+*skey-1.1.5-r4 (23 Sep 2004)
+
+ 23 Sep 2004; Tavis Ormandy <taviso@gentoo.org> +skey-1.1.5-r4.ebuild:
+ do not include /etc/skey/skeykeys in the package, as quickpkg may package
+ personal files. This also fixes the etc-update issue with #64974.
+
+ 18 Sep 2004; Joshua Kinard <kumba@gentoo.org> skey-1.1.5-r3.ebuild:
+ Marked stable on mips.
+
+ 16 Sep 2004; Bryan Østergaard <kloeri@gentoo.org> skey-1.1.5-r3.ebuild:
+ Stable on alpha, bug 63995.
+
+ 15 Sep 2004; Jason Wever <weeve@gentoo.org> skey-1.1.5-r3.ebuild:
+ Stable on sparc.
+
+ 14 Sep 2004; Olivier Crete <tester@gentoo.org> skey-1.1.5-r3.ebuild:
+ Marking stable on x86 per security bug 63995
+
+ 14 Sep 2004; Guy Martin <gmsoft@gentoo.org> skey-1.1.5-r3.ebuild:
+ Stable on hppa.
+
+*skey-1.1.5-r3 (14 Sep 2004)
+
+ 14 Sep 2004; Tavis Ormandy <taviso@gentoo.org> +skey-1.1.5-r3.ebuild:
+ the default algorithm should be md5.
+
+ 07 Sep 2004; Tom Gall <tgall@gentoo.org> skey-1.1.5-r2.ebuild:
+ stable on ppc64
+
+*skey-1.1.5-r2 (27 Jun 2004)
+
+ 27 Jun 2004; Tavis Ormandy <taviso@gentoo.org> +skey-1.1.5-r2.ebuild:
+ fixing skeyprune, looking in wrong location for skeykeys. #55278
+
+ 15 Apr 2004; Michael McCabe <randy@gentoo.org> skey-1.1.5-r1.ebuild:
+ adding s390 keyword
+
+ 25 Mar 2004; Martin Holzer <mholzer@gentoo.org> skey-1.1.5-r1.ebuild,
+ skey-1.1.5.ebuild:
+ fixing depend. see 45343
+
+ 25 Feb 2004; Daniel Ahlberg <aliz@gentoo.org> skey-1.1.5-r1.ebuild:
+ Fix fPIC issues.
+
+ 07 Dec 2003; Tavis Ormandy <taviso@gentoo.org> skey-1.1.5-r1.ebuild:
+ stable
+
+ 12 Nov 2003; Tavis Ormandy <taviso@gentoo.org> skey-1.1.5-r1.ebuild,
+ files/skey-1.1.5-gentoo.diff.gz, files/skey-login_name_max.diff:
+ Fixing #33315, glibc 2.2.x does not define LOGIN_NAME_MAX.
+
+ 06 Nov 2003; Tavis Ormandy <taviso@gentoo.org> skey-1.1.5-r1.ebuild,
+ files/skey-1.1.5-gentoo.diff.gz:
+ cracklib support.
+
+ 06 Nov 2003; Tavis Ormandy <taviso@gentoo.org>
+ files/skey-1.1.5-gentoo.diff.gz:
+ cleanups to stop gcc warnings with -Wall.
+
+ 06 Nov 2003; Tavis Ormandy <taviso@gentoo.org>
+ files/skey-1.1.5-gentoo.diff.gz:
+ no need for strlcpy, i'll change it for strncpy.
+
+ 05 Nov 2003; Tavis Ormandy <taviso@gentoo.org> skey-1.1.5-r1.ebuild,
+ files/skey-1.1.5-gentoo.diff.gz:
+ fixing #32813, -fstack-protector now works.
+
+*skey-1.1.5-r1 (05 Nov 2003)
+
+ 05 Nov 2003; Tavis Ormandy <taviso@gentoo.org> skey-1.1.5-r1.ebuild,
+ files/skey-1.1.5-gentoo.diff.gz:
+ _Lots_ of updates, this thing hasnt been maintained in a while.
+ I've ported some updates from NetBSD to Linux, fixed some bugs,
+ provided the missing files, and various other things.
+
+ 14 Sep 2003; Tavis Ormandy <taviso@gentoo.org> skey-1.1.5.ebuild:
+ download location is unreliable, moving it to mirror://
+
+ 05 Sep 2003; Tavis Ormandy <taviso@gentoo.org> skey-1.1.5.ebuild:
+ skeyprune doesnt honour @sysconfdir@
+
+*skey-1.1.5 (05 Sep 2003)
+
+ 05 Sep 2003; Tavis Ormandy <taviso@gentoo.org> skey-1.1.5.ebuild:
+ Initial import, Thanks to Jeb Campbell <jebc@c4solutions.net> for
+ submitting the ebuild in #11478
+
diff --git a/sys-auth/skey/Manifest b/sys-auth/skey/Manifest
new file mode 100644
index 000000000000..b6264649cb71
--- /dev/null
+++ b/sys-auth/skey/Manifest
@@ -0,0 +1,9 @@
+AUX skey-1.1.5-bind-now.patch 566 RMD160 201059b7ae654f8f12ddd3ffb33c9e2f2311a49d SHA1 ba3be6a9e8da72addc38258e07421d7b18209419 SHA256 febd27580f39bfaf8feb9b172fc144a0becd088afa02dbe96e2cb7474c9a4ef5
+AUX skey-1.1.5-fPIC.patch 271 RMD160 11ba3e2eb2e8407c5e995f0ab102b08765f6b4ba SHA1 3c8efacdc4c1beb98361cc673506ad64c159dba3 SHA256 e3e7e7d0607a1e55f3b51fa322c0f4e2a8c18f691d3743f46c62f13378a131f9
+AUX skey-1.1.5-otp.diff 1437 RMD160 1b8b362e7c31161e3c88730f74b941b83bbba165 SHA1 be2a685faa723662c2df6232eca36547f9463765 SHA256 b8391d0310e5d22ca303ddd13ecdb306b036bc4622e496c516c0c7b54f4540a4
+AUX skey-login_name_max.diff 386 RMD160 44bc80938601c1140658d5ed343bad982e1c6ca4 SHA1 8510f9dcaec2952347da4933f22984d9d816b27b SHA256 d6652f9ba5cc358108ddfaa2f9dd7093e02a1adba4e360a1e6ad1a42a415a0dd
+DIST skey-1.1.5-gentoo.diff.gz 37614 RMD160 997002ac7e2481ec5158db3b2c7280bc80d5c95b SHA1 ea2611abefdd4a13621478a09f5771fc83ab58b6 SHA256 1f4cb9d403c2cd054a451f4d790cbeac68d31f11d0df1588c2bfb769137444a2
+DIST skey-1.1.5.tar.bz2 61911 RMD160 33d97cbcd6dbc91bdca5b27056d51d1f5d06b68d SHA1 d55fb286098900cdf3eb6b174a720a06c722312a SHA256 e21bcb7c618c0bc87a72d8f0f097d7517fffa4e881a0f295ee1ce2a7dccf4aef
+EBUILD skey-1.1.5-r6.ebuild 3132 RMD160 d33a4b7611cbf1377140f8f051a02ac64b3d3a81 SHA1 361346ec8bf3e8a60095750349e7aac1f4705651 SHA256 c4d5adaafe5aa467fa6b3a031b37b50b133d1b54f42924ff9fd96437a0f2cca0
+MISC ChangeLog 7358 RMD160 febfc1b9777772c44ba3721162b13a4acf6d15ab SHA1 8edcef39882fea0c2a568b69ad8eac3f8a3a4a12 SHA256 31f3404d2d583e8439387f061e331a62e213f64c377adb383b69e5a691002bac
+MISC metadata.xml 1439 RMD160 e282bf91434f4176ac97ae5b1fb760523ddd5528 SHA1 77c84e46e5703c5617b7f6aef0e4af96fa649a78 SHA256 1bbb0dc3131dc4681e9c1ea71502b289ac236431d5f339171948fa9c4ad29a58
diff --git a/sys-auth/skey/files/skey-1.1.5-bind-now.patch b/sys-auth/skey/files/skey-1.1.5-bind-now.patch
new file mode 100644
index 000000000000..a56f81e9fc30
--- /dev/null
+++ b/sys-auth/skey/files/skey-1.1.5-bind-now.patch
@@ -0,0 +1,15 @@
+--- Makefile.in.orig 2005-08-19 18:14:48.000000000 -0400
++++ Makefile.in 2005-08-19 18:15:45.000000000 -0400
+@@ -67,10 +67,10 @@
+ ${CC} -o $@ ${SKEYOBJS} ${LDFLAGS} -lskey ${LIBS}
+
+ skeyinit: libskey.so ${SKEYINITOBJS}
+- ${CC} -o $@ ${SKEYINITOBJS} ${LDFLAGS} -lskey ${LIBS}
++ ${CC} -o $@ ${SKEYINITOBJS} ${LDFLAGS} -lskey ${LIBS} -Wl,-z,now
+
+ skeyinfo: libskey.so ${SKEYINFOOBJS}
+- ${CC} -o $@ ${SKEYINFOOBJS} ${LDFLAGS} -lskey ${LIBS}
++ ${CC} -o $@ ${SKEYINFOOBJS} ${LDFLAGS} -lskey ${LIBS} -Wl,-z,now
+
+ ${MANPAGES} ${SCRIPTS}::
+ ${FIXPATHSCMD} ${srcdir}/$@
diff --git a/sys-auth/skey/files/skey-1.1.5-fPIC.patch b/sys-auth/skey/files/skey-1.1.5-fPIC.patch
new file mode 100644
index 000000000000..924cfb4582a3
--- /dev/null
+++ b/sys-auth/skey/files/skey-1.1.5-fPIC.patch
@@ -0,0 +1,12 @@
+--- Makefile.in 2004-02-25 10:16:15.219448392 +0000
++++ Makefile.in 2004-02-25 10:16:39.087583762 +0000
+@@ -50,6 +50,9 @@
+
+ ${LIBOBJS}: config.h
+
++${LIBOBJS}: %.o: %.c
++ ${CC} ${CFLAGS} -fPIC -c $< -o $@
++
+ libskey.a: ${LIBOBJS}
+ ${AR} rv $@ ${LIBOBJS}
+ ${RANLIB} $@
diff --git a/sys-auth/skey/files/skey-1.1.5-otp.diff b/sys-auth/skey/files/skey-1.1.5-otp.diff
new file mode 100644
index 000000000000..33c9b3dbac23
--- /dev/null
+++ b/sys-auth/skey/files/skey-1.1.5-otp.diff
@@ -0,0 +1,59 @@
+diff -Nur skey-1.1.5.orig/skey.c skey-1.1.5/skey.c
+--- skey-1.1.5.orig/skey.c 2004-11-12 23:09:02.382529123 +0100
++++ skey-1.1.5/skey.c 2004-11-12 23:23:09.864378849 +0100
+@@ -46,6 +46,17 @@
+ char passwd[SKEY_MAX_PW_LEN+1], key[SKEY_BINKEY_SIZE];
+ char buf[33], *seed, *slash, *t;
+
++ /* If we were called as otp-METHOD, set algorithm based on that */
++ if ((slash = strrchr(argv[0], '/')))
++ slash++;
++ else
++ slash = argv[0];
++ if (strncmp(slash, "otp-", 4) == 0) {
++ slash += 4;
++ if (skey_set_algorithm(slash) == NULL)
++ errx(1, "Unknown hash algorithm %s", slash);
++ }
++
+ while ((i = getopt(argc, argv, "fn:p:t:x")) != -1) {
+ switch(i) {
+ case 'f':
+diff -Nur skey-1.1.5.orig/skey.1 skey-1.1.5/skey.1
+--- skey-1.1.5.orig/skey.1 2004-11-12 23:09:02.375530148 +0100
++++ skey-1.1.5/skey.1 2004-11-12 23:41:43.298268426 +0100
+@@ -6,7 +6,7 @@
+ .Dt SKEY 1
+ .Os
+ .Sh NAME
+-.Nm skey
++.Nm skey, otp-md4, otp-md5, otp-sha1
+ .Nd respond to an OTP challenge
+ .Sh SYNOPSIS
+ .Nm
+@@ -27,13 +27,24 @@
+ .Pp
+ .Em S/Key
+ uses 64 bits of information, transformed by the
+-.Tn MD4
++.Tn MD5
+ algorithm into 6 English words.
+ The user supplies the words to authenticate himself to programs like
+ .Xr login 1
+ or
+ .Xr ftpd 8 .
+ .Pp
++When
++.Nm skey
++is invoked as
++.Nm otp-method ,
++.Nm skey
++will use
++.Ar method
++as the hash function where
++.Ar method
++is currently one of md4, md5, or sha1.
++.Pp
+ Example use of the
+ .Em S/Key
+ program
diff --git a/sys-auth/skey/files/skey-login_name_max.diff b/sys-auth/skey/files/skey-login_name_max.diff
new file mode 100644
index 000000000000..b9725aa0ccb2
--- /dev/null
+++ b/sys-auth/skey/files/skey-login_name_max.diff
@@ -0,0 +1,15 @@
+diff -ruN skey-1.1.5.orig/skeyinit.c skey-1.1.5/skeyinit.c
+--- skey-1.1.5.orig/skeyinit.c 2003-11-12 21:26:49.000000000 +0000
++++ skey-1.1.5/skeyinit.c 2003-11-12 21:28:24.000000000 +0000
+@@ -62,6 +62,11 @@
+ #define SKEY_NAMELEN 4
+ #endif
+
++/* #33315 */
++#ifndef LOGIN_NAME_MAX
++#define LOGIN_NAME_MAX 256
++#endif
++
+ int main __P((int, char **));
+
+ int main(int argc, char **argv)
diff --git a/sys-auth/skey/metadata.xml b/sys-auth/skey/metadata.xml
new file mode 100644
index 000000000000..d98b44f17251
--- /dev/null
+++ b/sys-auth/skey/metadata.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>no-herd</herd>
+<maintainer>
+ <email>ulm@gentoo.org</email>
+</maintainer>
+<longdescription lang="en">
+ From RFC2289:
+ One form of attack on networked computing systems is eavesdropping on
+ network connections to obtain authentication information such as the
+ login IDs and passwords of legitimate users. Once this information is
+ captured, it can be used at a later time to gain access to the system.
+ One-time password systems are designed to counter this type of attack,
+ called a "replay attack."
+
+ The authentication system described in this document uses a secret
+ pass-phrase to generate a sequence of one-time (single use) passwords.
+ With this system, the user's secret pass-phrase never needs to cross the
+ network at any time such as during authentication or during pass-phrase
+ changes. Thus, it is not vulnerable to replay attacks. Added security
+ is provided by the property that no secret information need be stored on
+ any system, including the server being protected.
+
+ The OTP system protects against external passive attacks against the
+ authentication subsystem. It does not prevent a network eavesdropper from
+ gaining access to private information and does not provide protection
+ against either "social engineering" or active attacks.
+</longdescription>
+</pkgmetadata>
diff --git a/sys-auth/skey/skey-1.1.5-r6.ebuild b/sys-auth/skey/skey-1.1.5-r6.ebuild
new file mode 100644
index 000000000000..eadacf0c2c62
--- /dev/null
+++ b/sys-auth/skey/skey-1.1.5-r6.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-auth/skey/skey-1.1.5-r6.ebuild,v 1.1 2008/05/11 12:36:09 ulm Exp $
+
+inherit flag-o-matic ccc eutils toolchain-funcs
+
+DESCRIPTION="Linux Port of OpenBSD Single-key Password System"
+HOMEPAGE="http://www.sparc.spb.su/solaris/skey/"
+SRC_URI="mirror://gentoo/${P}.tar.bz2
+ mirror://gentoo/skey-1.1.5-gentoo.diff.gz"
+
+LICENSE="BSD MIT RSA-MD4 RSA-MD5 BEER-WARE"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
+IUSE=""
+
+DEPEND="dev-lang/perl"
+RDEPEND="${DEPEND}
+ sys-libs/cracklib"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # porting some updates to this skey implementation from the
+ # NetBSD project, some other updates and fixes, and the addition
+ # of some new features like shadow password and cracklib support.
+ # (05 Nov 2003) -taviso@gentoo.org
+ epatch "${WORKDIR}"/skey-1.1.5-gentoo.diff
+
+ # glibc 2.2.x does not define LOGIN_NAME_MAX #33315
+ # (12 Nov 2003) -taviso@gentoo.org
+ epatch "${FILESDIR}"/skey-login_name_max.diff
+
+ epatch "${FILESDIR}"/${P}-fPIC.patch
+ epatch "${FILESDIR}"/${P}-bind-now.patch
+
+ # allow invokation as otp-foo. #71015
+ # (03 Mar 2005) -taviso.
+ epatch "${FILESDIR}"/${P}-otp.diff
+
+ # set the default hash function to md5, #63995
+ # (14 Sep 2004) -taviso
+ append-flags -DSKEY_HASH_DEFAULT=1
+
+ # skeyprune wont honour @sysconfdir@
+ sed -i \
+ -e 's:/etc/skeykeys:/etc/skey/skeykeys:g' \
+ skeyprune.pl skeyprune.8 || die
+
+ # skeyprune uses a case sensitive regex to check for zeroed entries
+ sed -i \
+ -e 's:\(if ( ! /.*/\):\1i:g' \
+ skeyprune.pl || die
+
+ # skeyinit(1) describes md4 as the default hash algorithm, which
+ # is no longer the case. #64971
+ sed -i \
+ 's#\(md4\) \((the default)\), \(md5\) or \(sha1.\)#\1, \3 \2 or \4#g' \
+ skeyinit.1
+}
+
+src_compile() {
+ econf --sysconfdir=/etc/skey || die
+ emake || die
+}
+
+src_install() {
+ doman skey.1 skeyaudit.1 skeyinfo.1 skeyinit.1 skeyprune.8
+ dobin skey skeyinit skeyinfo || die
+
+ dosym skey /usr/bin/otp-md4
+ dosym skey /usr/bin/otp-sha1
+ dosym skey /usr/bin/otp-md5
+
+ newsbin skeyprune.pl skeyprune
+ newbin skeyaudit.sh skeyaudit
+
+ dolib.a libskey.a
+
+ into /
+ dolib.so libskey.so.1.1.5 libskey.so.1.1 libskey.so.1 libskey.so || die
+ gen_usr_ldscript libskey.so
+
+ insinto /usr/include
+ doins skey.h
+
+ dodir /etc/skey
+
+ # only root needs to have access to these files.
+ fperms g-rx,o-rx /etc/skey
+
+ # skeyinit and skeyinfo must be suid root so users
+ # can generate their passwords.
+ fperms u+s,og-r /usr/bin/skeyinit /usr/bin/skeyinfo
+
+ dodoc README CHANGES
+}
+
+pkg_postinst() {
+ # do not include /etc/skey/skeykeys in the package, as quickpkg
+ # may package sensitive information.
+ # This also fixes the etc-update issue with #64974.
+
+ # skeyinit will not function if this file is not present.
+ touch /etc/skey/skeykeys
+
+ # these permissions are applied by the skey system if missing.
+ chmod 0600 /etc/skey/skeykeys
+
+ elog "For an introduction into using s/key authentication, take"
+ elog "a look at the EXAMPLES section from the skey(1) manpage."
+}