Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-auth/skey/
Date: Sat, 12 Dec 2015 09:18:18
Message-Id: 1449911714.290b26df9f776c186fea43c21a7213256d48f722.ulm@gentoo
1 commit: 290b26df9f776c186fea43c21a7213256d48f722
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Dec 12 09:15:14 2015 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 12 09:15:14 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=290b26df
7
8 sys-auth/skey: Avoid out of bounds stack read.
9
10 Fix the extract() function not to access unnecessary array elements;
11 this avoids an out-of-bounds read when called from btoe() or etob().
12 Change the insert() function to use similar logic as extract().
13
14 Bug: 567608
15
16 Package-Manager: portage-2.2.26
17
18 sys-auth/skey/Manifest | 1 +
19 sys-auth/skey/skey-1.1.5-r10.ebuild | 83 +++++++++++++++++++++++++++++++++++++
20 2 files changed, 84 insertions(+)
21
22 diff --git a/sys-auth/skey/Manifest b/sys-auth/skey/Manifest
23 index dbd6b3c..4cbfec5 100644
24 --- a/sys-auth/skey/Manifest
25 +++ b/sys-auth/skey/Manifest
26 @@ -1,2 +1,3 @@
27 DIST skey-1.1.5-patches-3.tar.xz 33604 SHA256 adabe7b286f586d2cbe1a4b15f71310b7d8e25fc3187f8a89071359d7975badf SHA512 dcef6837e563ce3f68fe4eed35f16db1636e1798219dba95c86db505b5f67034b44bc6d02e0125faa95db8a5c39e9615bfed2dc3105905e576d96cf32016bc2f WHIRLPOOL bff241ecf0f59dae810db300bd858f76e18153f1958f2154c538f42040cc1040f049442d697767cfa7346996931d81370c2551d752c52810c9b18fe9e351c212
28 +DIST skey-1.1.5-patches-4.tar.xz 33952 SHA256 7a8e8c4a85c8982dbd0bcb8a45e7c4f2b45da94af7d92d515eeb6e7cb29a6999 SHA512 5789893cfeec0d31b0294f287aad688358dcf73a21663626ebc39209e1af43795669b6141cc80e226257f1dd574143f17f54a5b081bf6f9790ca287809fcd00d WHIRLPOOL 51d5002f58df0428535f2819636a896c1645098a9a71ce403a37623313b5385ee2698aed642cba5e5f30c9b211040a86dd71cf44b6798c76947a96634982c69f
29 DIST skey-1.1.5.tar.bz2 61911 SHA256 e21bcb7c618c0bc87a72d8f0f097d7517fffa4e881a0f295ee1ce2a7dccf4aef SHA512 4cbddc7e31134d5e23801a9b07de0d05c8357aaa8dddfb8426fceead3f54e539f77204f78a08b2a93890ef2f4f807a2208080f58f80818afa1b8cd4884b1fb37 WHIRLPOOL abf141fd679deeaee3f3883cd3076620c84e8775ecacc8f87d561c1812beae55299989f37ec331633bac29e25b4b8d145dc590ef119c73a137d8790815bb13f2
30
31 diff --git a/sys-auth/skey/skey-1.1.5-r10.ebuild b/sys-auth/skey/skey-1.1.5-r10.ebuild
32 new file mode 100644
33 index 0000000..a5c82b7
34 --- /dev/null
35 +++ b/sys-auth/skey/skey-1.1.5-r10.ebuild
36 @@ -0,0 +1,83 @@
37 +# Copyright 1999-2015 Gentoo Foundation
38 +# Distributed under the terms of the GNU General Public License v2
39 +# $Id$
40 +
41 +EAPI=6
42 +
43 +inherit toolchain-funcs readme.gentoo
44 +
45 +DESCRIPTION="Linux Port of OpenBSD Single-key Password System"
46 +HOMEPAGE="http://www.openbsd.org/faq/faq8.html#SKey"
47 +SRC_URI="mirror://gentoo/${P}.tar.bz2
48 + https://dev.gentoo.org/~ulm/distfiles/${P}-patches-4.tar.xz"
49 +
50 +LICENSE="BSD MIT RSA BEER-WARE"
51 +SLOT="0"
52 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
53 +IUSE="static-libs"
54 +
55 +DEPEND="dev-lang/perl
56 + app-arch/xz-utils"
57 +RDEPEND="dev-lang/perl
58 + virtual/perl-Time-Local
59 + sys-libs/cracklib"
60 +
61 +PATCHES="patch"
62 +
63 +src_configure() {
64 + tc-export CC
65 + econf --sysconfdir=/etc/skey
66 +}
67 +
68 +src_install() {
69 + into /
70 + dolib.so libskey.so{.${PV},.${PV%.*},.${PV%%.*},}
71 +
72 + into /usr
73 + dobin skey skeyinit skeyinfo
74 + newbin skeyaudit.sh skeyaudit
75 + newsbin skeyprune.pl skeyprune
76 +
77 + dosym skey /usr/bin/otp-md4
78 + dosym skey /usr/bin/otp-md5
79 + dosym skey /usr/bin/otp-sha1
80 +
81 + if use static-libs; then
82 + dolib.a libskey.a
83 + gen_usr_ldscript libskey.so
84 + fi
85 +
86 + doman skey.1 skeyaudit.1 skeyinfo.1 skeyinit.1 skey.3 skeyprune.8
87 +
88 + insinto /usr/include
89 + doins skey.h
90 +
91 + keepdir /etc/skey
92 +
93 + # only root needs to have access to these files.
94 + fperms go-rx /etc/skey
95 +
96 + # skeyinit and skeyinfo must be suid root so users
97 + # can generate their passwords.
98 + fperms u+s,go-r /usr/bin/skeyinit /usr/bin/skeyinfo
99 +
100 + dodoc README CHANGES
101 +
102 + DOC_CONTENTS="For an introduction into using s/key authentication,
103 + take a look at the EXAMPLES section from the skey(1) manpage."
104 + readme.gentoo_create_doc
105 +}
106 +
107 +pkg_postinst() {
108 + # do not include /etc/skey/skeykeys in the package, as quickpkg
109 + # may package sensitive information.
110 + # This also fixes the etc-update issue with #64974.
111 +
112 + # skeyinit will not function if this file is not present.
113 + touch /etc/skey/skeykeys
114 +
115 + # these permissions are applied by the skey system if missing.
116 + chmod 0600 /etc/skey/skeykeys
117 +
118 + readme.gentoo_print_elog
119 +}