diff options
author | Hiroki Sato <hrs@FreeBSD.org> | 2016-06-11 22:39:06 +0000 |
---|---|---|
committer | Hiroki Sato <hrs@FreeBSD.org> | 2016-06-11 22:39:06 +0000 |
commit | 8ea769209a0f554c9f5e5ef7c2f8ea4873da18d7 (patch) | |
tree | 7915b20966c9db9cedeb968575d8437e09b854c3 /security/opencryptoki | |
parent | 7cd28fe816ee9d519a7517d0f90698688f4f8341 (diff) | |
download | ports-8ea769209a0f554c9f5e5ef7c2f8ea4873da18d7.tar.gz ports-8ea769209a0f554c9f5e5ef7c2f8ea4873da18d7.zip |
Fix build on 9.x.
Notes
Notes:
svn path=/head/; revision=416762
Diffstat (limited to 'security/opencryptoki')
-rw-r--r-- | security/opencryptoki/Makefile | 7 | ||||
-rw-r--r-- | security/opencryptoki/files/patch-usr-sbin-pkcsslotd-socket_server.c | 40 |
2 files changed, 43 insertions, 4 deletions
diff --git a/security/opencryptoki/Makefile b/security/opencryptoki/Makefile index aafeeecc2e1f..f38732d5cf5c 100644 --- a/security/opencryptoki/Makefile +++ b/security/opencryptoki/Makefile @@ -3,7 +3,7 @@ PORTNAME= opencryptoki PORTVERSION= 3.5 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security MASTER_SITES= SF @@ -19,6 +19,10 @@ LIB_DEPENDS= libtspi.so:security/trousers USES= alias autoreconf gmake libtool tar:tgz USE_LDCONFIG= ${PREFIX}/lib/opencryptoki +USE_OPENSSL= yes +.if exists(/usr/include/openssl/md2.h) +WITH_OPENSSL_PORT=yes +.endif WRKSRC= ${WRKDIR}/${PORTNAME} INSTALL_TARGET= install-strip GNU_CONFIGURE= yes @@ -29,6 +33,7 @@ CONFIGURE_ARGS= --enable-swtok --enable-tpmtok \ --with-lockdir=/var/run/opencryptoki \ --with-logdir=/var/log/opencryptoki \ --localstatedir=/var \ + --with-openssl=${OPENSSLBASE} \ --with-pkcs11user=${USERS} \ --with-pkcs11group=${GROUPS} \ ac_cv_path_CHGRP=true diff --git a/security/opencryptoki/files/patch-usr-sbin-pkcsslotd-socket_server.c b/security/opencryptoki/files/patch-usr-sbin-pkcsslotd-socket_server.c index 56d3acc14595..5b8ae7d9b4f7 100644 --- a/security/opencryptoki/files/patch-usr-sbin-pkcsslotd-socket_server.c +++ b/security/opencryptoki/files/patch-usr-sbin-pkcsslotd-socket_server.c @@ -1,6 +1,40 @@ ---- usr/sbin/pkcsslotd/socket_server.c.orig 2016-04-29 17:26:46 UTC -+++ usr/sbin/pkcsslotd/socket_server.c -@@ -337,7 +337,7 @@ int CreateListenerSocket (void) { +--- usr/sbin/pkcsslotd/socket_server.c.orig 2016-04-30 02:26:46.000000000 +0900 ++++ usr/sbin/pkcsslotd/socket_server.c 2016-06-12 07:33:22.000000000 +0900 +@@ -300,6 +300,9 @@ + #include <sys/select.h> + #include <sys/stat.h> + #include <grp.h> ++#ifndef SOCK_NONBLOCK ++#include <fcntl.h> ++#endif + + #include "log.h" + #include "slotmgr.h" +@@ -314,11 +317,23 @@ + struct group *grp; + int socketfd; + ++#ifdef SOCK_NONBLOCK + socketfd = socket(PF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0); ++#else ++ socketfd = socket(PF_UNIX, SOCK_STREAM, 0); ++#endif + if (socketfd < 0) { + ErrLog("Failed to create listener socket, errno 0x%X.", errno); + return -1; + } ++#ifndef SOCK_NONBLOCK ++ if (fcntl(socketfd, F_SETFL, ++ fcntl(socketfd, F_GETFL) | O_NONBLOCK) < 0) { ++ ErrLog("Failed to set listener non-block, errno 0x%X.", errno); ++ close(socketfd); ++ return -1; ++ } ++#endif + if (unlink(SOCKET_FILE_PATH) && errno != ENOENT) { + ErrLog("Failed to unlink socket file, errno 0x%X.", errno); + close(socketfd); +@@ -337,7 +352,7 @@ // make socket file part of the pkcs11 group, and write accessable // for that group |