summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Arnold <nerdboy@gentoo.org>2010-09-25 03:55:51 +0000
committerSteve Arnold <nerdboy@gentoo.org>2010-09-25 03:55:51 +0000
commit35175fba538ad47d5a26bbced350fc91013c69b5 (patch)
treed6553d7698bc10fd270c15fefcc48f6304667197 /app-crypt/coolkey
parentVersion bump (fixes bug #337209, thanks to Andreis Vinogradovs for reporting)... (diff)
downloadhistorical-35175fba538ad47d5a26bbced350fc91013c69b5.tar.gz
historical-35175fba538ad47d5a26bbced350fc91013c69b5.tar.bz2
historical-35175fba538ad47d5a26bbced350fc91013c69b5.zip
Updated with upstream patches to support new CAC format and other fixes.
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64
Diffstat (limited to 'app-crypt/coolkey')
-rw-r--r--app-crypt/coolkey/ChangeLog12
-rw-r--r--app-crypt/coolkey/Manifest17
-rw-r--r--app-crypt/coolkey/coolkey-1.1.0-r1.ebuild36
-rw-r--r--app-crypt/coolkey/coolkey-1.1.0-r2.ebuild50
-rw-r--r--app-crypt/coolkey/files/coolkey-1.1.0-cache-move.patch177
-rw-r--r--app-crypt/coolkey/files/coolkey-1.1.0-gcc-4.3.patch54
6 files changed, 63 insertions, 283 deletions
diff --git a/app-crypt/coolkey/ChangeLog b/app-crypt/coolkey/ChangeLog
index 497c17905ba6..390c81e5548a 100644
--- a/app-crypt/coolkey/ChangeLog
+++ b/app-crypt/coolkey/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for app-crypt/coolkey
-# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-crypt/coolkey/ChangeLog,v 1.7 2008/08/30 20:23:32 maekke Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/coolkey/ChangeLog,v 1.8 2010/09/25 03:55:50 nerdboy Exp $
+
+*coolkey-1.1.0-r2 (25 Sep 2010)
+
+ 25 Sep 2010; Steve Arnold <nerdboy@gentoo.org> -coolkey-1.1.0-r1.ebuild,
+ +coolkey-1.1.0-r2.ebuild, -files/coolkey-1.1.0-cache-move.patch,
+ -files/coolkey-1.1.0-gcc-4.3.patch:
+ Updated with upstream patches to support new CAC format and other fixes.
+ Closes bug #302769 (tested with new CAC on ppc and amd64).
30 Aug 2008; Markus Meier <maekke@gentoo.org> coolkey-1.1.0-r1.ebuild:
add ~amd64, bug #235627
diff --git a/app-crypt/coolkey/Manifest b/app-crypt/coolkey/Manifest
index 1d0189275c83..c947c82e0701 100644
--- a/app-crypt/coolkey/Manifest
+++ b/app-crypt/coolkey/Manifest
@@ -1,16 +1,5 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-AUX coolkey-1.1.0-cache-move.patch 4176 RMD160 d93eb2865ca9351b83c5dff99cfbd25999d82102 SHA1 484584f25644eb7f8698979201b68151d014fc2f SHA256 18312c4097c0915fc89cc922127b4371c771ca22831cc8ed8681b529cd3b06a1
-AUX coolkey-1.1.0-gcc-4.3.patch 1582 RMD160 c8c060d75e53875c40ce6d6f3667f8339b8a566e SHA1 d5ab4c049f0c5b5c52d0b8e3ccbe49b34286ee6f SHA256 004a8bf835c15afef6c163c8b9d6773791932fa612c6c9b055d0506799d1626d
DIST coolkey-1.1.0.tar.gz 432808 RMD160 1873e85aecb30c5311444c76fd85ba79633dce23 SHA1 54136decf9dfd091c8b231cb77dac97db95e1866 SHA256 8448e3abb81bffc593c96b577dcfbc05b40e8684188456c31be15fae73d730f7
-EBUILD coolkey-1.1.0-r1.ebuild 934 RMD160 dd4f0545b10a36bb88d55346cc2b4c4ad9fc4efb SHA1 c6f80da27f118bee0160e58b577a57ff8009d50c SHA256 df59d426709ae98a45f8a0d35b64602a795711e70607eb698f362c0966949b18
-MISC ChangeLog 1121 RMD160 367f2b877cae258f7bb52da6b3200573a0145f1d SHA1 33dc612364b82e0fa1ee219d4f1e4c52f2c4c8b8 SHA256 0c7191b6a09cfdcba01588ae76b16c7a0d624fcfd33c3dea4efc574e27f6a666
+DIST coolkey-patches.tar.gz 19457 RMD160 4a4de541b80fd0c849299b205c3643305bc7384f SHA1 d2526eb556ff104767090360aa4f48f75c2504bb SHA256 441abc27412c41a3fd36a60569734b3aba4f35b3e9c85e34a93ec9acc62e98f4
+EBUILD coolkey-1.1.0-r2.ebuild 1506 RMD160 2af198b83cda30637ed9f8968a1f10274d234f0b SHA1 573df4ea09cce0f3670060fef9df6d32a2301671 SHA256 14dd58b08fedb5c7cb29f585750c01b61aece78f38ad077c3b196ff57546a924
+MISC ChangeLog 1472 RMD160 f97fe9d71dd7124fa6a3c77413aa520768b8e73f SHA1 d810a311ce9296bd6cf45bbbbe77176e6fbe3a4c SHA256 9ccae9d0176916a4f82c4dbfcd72c6eeb39f3ca32c346d6a50c229d84807f1e7
MISC metadata.xml 224 RMD160 74db96ad8aa1d285d83ae93a9f4a767335f55c15 SHA1 d86a171d981b45e7ed0c0b3b5059d2a63c811001 SHA256 9e9ce661a9fdb45a535ad875a247b700a70745359b27533ec29a6a46fa708e86
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.9 (GNU/Linux)
-
-iEYEARECAAYFAki5rJYACgkQkKaRLQcq0GIihACgpw0D8zRFuPvqsJJ2vSLAOLrd
-VXsAnA4abie0YfJ8ru0Uad0bdzx8avCq
-=VmYs
------END PGP SIGNATURE-----
diff --git a/app-crypt/coolkey/coolkey-1.1.0-r1.ebuild b/app-crypt/coolkey/coolkey-1.1.0-r1.ebuild
deleted file mode 100644
index 17b57659f492..000000000000
--- a/app-crypt/coolkey/coolkey-1.1.0-r1.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-crypt/coolkey/coolkey-1.1.0-r1.ebuild,v 1.3 2008/08/30 20:23:32 maekke Exp $
-
-inherit eutils
-
-DESCRIPTION="Linux Driver support for the CoolKey and CAC products"
-HOMEPAGE="http://directory.fedora.redhat.com/wiki/CoolKey"
-SRC_URI="http://directory.fedora.redhat.com/download/coolkey/${P}.tar.gz"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
-IUSE="debug"
-RDEPEND="sys-apps/pcsc-lite
- sys-libs/zlib"
-DEPEND="${RDEPEND}
- dev-util/pkgconfig"
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
- epatch "${FILESDIR}/${P}-cache-move.patch"
- epatch "${FILESDIR}/${P}-gcc-4.3.patch"
-}
-
-src_compile() {
- econf $(use_enable debug) || die "configure failed"
- emake -j1 || die "make failed"
-}
-
-src_install() {
- emake install DESTDIR="${D}" || die
- diropts -m 1777
- keepdir /var/cache/coolkey
-}
diff --git a/app-crypt/coolkey/coolkey-1.1.0-r2.ebuild b/app-crypt/coolkey/coolkey-1.1.0-r2.ebuild
new file mode 100644
index 000000000000..08956116d47e
--- /dev/null
+++ b/app-crypt/coolkey/coolkey-1.1.0-r2.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/coolkey/coolkey-1.1.0-r2.ebuild,v 1.1 2010/09/25 03:55:50 nerdboy Exp $
+
+EAPI=3
+
+inherit eutils
+
+DESCRIPTION="Linux Driver support for the CoolKey and CAC products"
+HOMEPAGE="http://directory.fedora.redhat.com/wiki/CoolKey"
+SRC_URI="http://directory.fedora.redhat.com/download/coolkey/${P}.tar.gz
+ mirror://gentoo/${PN}-patches.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="debug"
+
+RDEPEND="sys-apps/pcsc-lite
+ sys-libs/zlib"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig"
+
+EPATCH_OPTS="-F3 -l"
+
+src_prepare() {
+# EPATCH_SUFFIX="patch" epatch "${WORKDIR}/${PN}-patches/${PV}"
+ epatch "${WORKDIR}/${PN}-patches/${PV}/01_${P}-cache-move.patch"
+ epatch "${WORKDIR}/${PN}-patches/${PV}/02_${P}-gcc-4.3.patch"
+ epatch "${WORKDIR}/${PN}-patches/${PV}/03_${P}-latest.patch"
+ epatch "${WORKDIR}/${PN}-patches/${PV}/04_${P}-simple-bugs.patch"
+ epatch "${WORKDIR}/${PN}-patches/${PV}/05_${P}-thread-fix.patch"
+ epatch "${WORKDIR}/${PN}-patches/${PV}/06_${P}-CAC-update.patch"
+ epatch "${WORKDIR}/${PN}-patches/${PV}/07_${P}-safe-open.patch"
+ epatch "${WORKDIR}/${PN}-patches/${PV}/08_${P}-configure-fix.patch"
+}
+
+src_configure() {
+ econf $(use_enable debug) || die "configure failed"
+}
+
+src_compile() {
+ emake -j1 || die "make failed"
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+ diropts -m 1777
+ keepdir /var/cache/coolkey
+}
diff --git a/app-crypt/coolkey/files/coolkey-1.1.0-cache-move.patch b/app-crypt/coolkey/files/coolkey-1.1.0-cache-move.patch
deleted file mode 100644
index 7dbd0ec3070b..000000000000
--- a/app-crypt/coolkey/files/coolkey-1.1.0-cache-move.patch
+++ /dev/null
@@ -1,177 +0,0 @@
-Index: src/coolkey/machdep.cpp
-===================================================================
-RCS file: /cvs/dirsec/coolkey/src/coolkey/machdep.cpp,v
-retrieving revision 1.4
-diff -u -r1.4 machdep.cpp
---- src/coolkey/machdep.cpp 14 Feb 2007 00:46:28 -0000 1.4
-+++ src/coolkey/machdep.cpp 15 Aug 2007 01:41:11 -0000
-@@ -185,12 +185,20 @@
- #define MAP_INHERIT 0
- #endif
-
-+#ifndef BASEPATH
-+#ifdef MAC
-+#define BASEPATH "/var"
-+#else
-+#define BASEPATH "/var/cache"
-+#endif
-+#endif
-+
- #ifdef FULL_CLEANUP
- #define RESERVED_OFFSET 256
--#define MEMSEGPATH "/tmp/.pk11ipc"
-+#define MEMSEGPATH BASEPATH"/coolkey-lock"
- #else
- #define RESERVED_OFFSET 0
--#define MEMSEGPATH "/tmp/.pk11ipc1"
-+#define MEMSEGPATH BASEPATH"/coolkey"
- #endif
-
- struct SHMemData {
-@@ -208,11 +216,6 @@
- #ifdef FULL_CLEANUP
- flock(fd,LOCK_EX);
- unsigned long ref = --(*(unsigned long *)addr);
--#ifdef notdef
-- if (ref == 0) {
-- unlink(path);
-- }
--#endif
- flock(fd, LOCK_UN);
- #endif
- munmap(addr,size+RESERVED_OFFSET);
-@@ -225,6 +228,73 @@
- }
- }
-
-+/*
-+ * The cache directory is shared and accessible by anyone, make
-+ * sure the cache file we are opening is really a valid cache file.
-+ */
-+int safe_open(char *path, int flags, int mode, int size)
-+{
-+ struct stat buf;
-+ int fd, ret;
-+
-+ fd = open (path, flags|O_NOFOLLOW, mode);
-+
-+ if (fd < 0) {
-+ return fd;
-+ }
-+
-+ ret = fstat(fd, &buf);
-+ if (ret < 0) {
-+ close (fd);
-+ return ret;
-+ }
-+
-+ /* our cache files are pretty specific, make sure we are looking
-+ * at the correct one */
-+
-+ /* first, we should own the file ourselves, don't open a file
-+ * that someone else wanted us to see. */
-+ if (buf.st_uid != getuid()) {
-+ close(fd);
-+ errno = EACCES;
-+ return -1;
-+ }
-+
-+ /* next, there should only be one link in this file. Don't
-+ * use this code to trash another file */
-+ if (buf.st_nlink != 1) {
-+ close(fd);
-+ errno = EMLINK;
-+ return -1;
-+ }
-+
-+ /* next, This better be a regular file */
-+ if (!S_ISREG(buf.st_mode)) {
-+ close(fd);
-+ errno = EACCES;
-+ return -1;
-+ }
-+
-+ /* if the permissions don't match, something is wrong */
-+ if ((buf.st_mode & 03777) != mode) {
-+ close(fd);
-+ errno = EACCES;
-+ return -1;
-+ }
-+
-+ /* finally the file should be the correct size. This
-+ * check isn't so much to protect from an attack, as it is to
-+ * detect a corrupted cache file */
-+ if (buf.st_size != size) {
-+ close(fd);
-+ errno = EACCES;
-+ return -1;
-+ }
-+
-+ /* OK, the file checked out, ok to continue */
-+ return fd;
-+}
-+
- SHMem::SHMem(): shmemData(0) {}
-
- SHMem *
-@@ -248,7 +318,7 @@
- return NULL;
- }
- int mask = umask(0);
-- int ret = mkdir (MEMSEGPATH, 0777);
-+ int ret = mkdir (MEMSEGPATH, 1777);
- umask(mask);
- if ((ret == -1) && (errno != EEXIST)) {
- delete shmemData;
-@@ -264,21 +334,16 @@
- shmemData->path[sizeof(MEMSEGPATH)-1] = '/';
- strcpy(&shmemData->path[sizeof(MEMSEGPATH)],name);
-
-- int mode = 0777;
-- if (strcmp(name,"token_names") != 0) {
-- /* each user gets his own uid array */
-- sprintf(uid_str, "-%u",getuid());
-- strcat(shmemData->path,uid_str);
-- mode = 0700;
-- }
-+ sprintf(uid_str, "-%u",getuid());
-+ strcat(shmemData->path,uid_str);
-+ int mode = 0600;
-+
- shmemData->fd = open(shmemData->path,
- O_CREAT|O_RDWR|O_EXCL|O_APPEND|O_EXLOCK, mode);
-- if (shmemData->fd < 0) {
-- needInit = false;
-- shmemData->fd = open(shmemData->path,O_RDWR|O_EXLOCK, mode);
-- } else {
-+ if (shmemData->fd >= 0) {
- char *buf;
- int len = size+RESERVED_OFFSET;
-+ int ret;
-
- buf = (char *)calloc(1,len);
- if (!buf) {
-@@ -289,8 +354,22 @@
- delete shmemData;
- return NULL;
- }
-- write(shmemData->fd,buf,len);
-+ ret = write(shmemData->fd,buf,len);
-+ if (ret != len) {
-+ unlink(shmemData->path);
-+#ifdef FULL_CLEANUP
-+ flock(shmemData->fd, LOCK_UN);
-+#endif
-+ delete shmemData;
-+ return NULL;
-+ }
-+
- free(buf);
-+ } else if (errno == EEXIST) {
-+ needInit = false;
-+
-+ shmemData->fd = safe_open(shmemData->path,O_RDWR|O_EXLOCK, mode,
-+ size+RESERVED_OFFSET);
- }
- if (shmemData->fd < 0) {
- delete shmemData;
diff --git a/app-crypt/coolkey/files/coolkey-1.1.0-gcc-4.3.patch b/app-crypt/coolkey/files/coolkey-1.1.0-gcc-4.3.patch
deleted file mode 100644
index 5e41b5ab702b..000000000000
--- a/app-crypt/coolkey/files/coolkey-1.1.0-gcc-4.3.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-diff -up ./src/coolkey/slot.cpp.coolkey-gcc43 ./src/coolkey/slot.cpp
---- ./src/coolkey/slot.cpp.coolkey-gcc43 2008-02-13 18:01:45.000000000 -0800
-+++ ./src/coolkey/slot.cpp 2008-02-13 18:03:05.000000000 -0800
-@@ -25,7 +25,6 @@
- #include "PKCS11Exception.h"
- #include <winscard.h>
- #include "slot.h"
--#include <memory.h>
- #include "zlib.h"
- #include "params.h"
-
-@@ -33,7 +32,6 @@
-
- #define MIN(x, y) ((x) < (y) ? (x) : (y))
-
--using std::auto_ptr;
-
-
- #ifdef DEBUG
-diff -up ./src/coolkey/machdep.cpp.coolkey-gcc43 ./src/coolkey/machdep.cpp
---- ./src/coolkey/machdep.cpp.coolkey-gcc43 2008-02-13 18:02:06.000000000 -0800
-+++ ./src/coolkey/machdep.cpp 2008-02-13 18:04:04.000000000 -0800
-@@ -33,6 +33,8 @@
- #include <sys/stat.h>
- #include <sys/mman.h>
- #include <pthread.h>
-+#include <string.h>
-+#include <stdlib.h>
- #endif
-
- #ifdef _WIN32
-diff -up ./src/coolkey/log.cpp.coolkey-gcc43 ./src/coolkey/log.cpp
---- ./src/coolkey/log.cpp.coolkey-gcc43 2008-02-13 18:01:55.000000000 -0800
-+++ ./src/coolkey/log.cpp 2008-02-13 18:03:37.000000000 -0800
-@@ -18,6 +18,8 @@
- * ***** END COPYRIGHT BLOCK *****/
-
- #include <string>
-+#include <string.h>
-+#include <stdlib.h>
- #include "mypkcs11.h"
- #include <assert.h>
- #include <stdio.h>
-diff -up ./src/coolkey/object.cpp.coolkey-gcc43 ./src/coolkey/object.cpp
---- ./src/coolkey/object.cpp.coolkey-gcc43 2008-02-13 18:02:20.000000000 -0800
-+++ ./src/coolkey/object.cpp 2008-02-13 18:04:22.000000000 -0800
-@@ -21,6 +21,7 @@
- #include "PKCS11Exception.h"
- #include "object.h"
- #include <algorithm>
-+#include <string.h>
-
- using std::find_if;
-