svn commit: r416762 - in head/security/opencryptoki: . files
Hiroki Sato
hrs at FreeBSD.org
Sat Jun 11 22:39:07 UTC 2016
Author: hrs
Date: Sat Jun 11 22:39:06 2016
New Revision: 416762
URL: https://svnweb.freebsd.org/changeset/ports/416762
Log:
Fix build on 9.x.
Modified:
head/security/opencryptoki/Makefile
head/security/opencryptoki/files/patch-usr-sbin-pkcsslotd-socket_server.c
Modified: head/security/opencryptoki/Makefile
==============================================================================
--- head/security/opencryptoki/Makefile Sat Jun 11 22:11:06 2016 (r416761)
+++ head/security/opencryptoki/Makefile Sat Jun 11 22:39:06 2016 (r416762)
@@ -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/trouser
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-
--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
Modified: head/security/opencryptoki/files/patch-usr-sbin-pkcsslotd-socket_server.c
==============================================================================
--- head/security/opencryptoki/files/patch-usr-sbin-pkcsslotd-socket_server.c Sat Jun 11 22:11:06 2016 (r416761)
+++ head/security/opencryptoki/files/patch-usr-sbin-pkcsslotd-socket_server.c Sat Jun 11 22:39:06 2016 (r416762)
@@ -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
More information about the svn-ports-head
mailing list