aboutsummaryrefslogtreecommitdiff
path: root/security/arirang
diff options
context:
space:
mode:
authorMikhail Teterin <mi@FreeBSD.org>2015-03-23 13:52:35 +0000
committerMikhail Teterin <mi@FreeBSD.org>2015-03-23 13:52:35 +0000
commitaf331e23419cdf6b278d6c5a68e3ac8aa7ed15b7 (patch)
tree4418341b5a4882df86522e777cd0a47797981aaf /security/arirang
parent7e796c89d014445285b6d0b21caf59c14f008b03 (diff)
Notes
Diffstat (limited to 'security/arirang')
-rw-r--r--security/arirang/Makefile11
-rw-r--r--security/arirang/files/patch-proxy.c24
2 files changed, 26 insertions, 9 deletions
diff --git a/security/arirang/Makefile b/security/arirang/Makefile
index aae8c6485073..021af395ff9e 100644
--- a/security/arirang/Makefile
+++ b/security/arirang/Makefile
@@ -20,6 +20,7 @@ USE_LIBRUBY= yes
USE_OPENSSL= yes
CFLAGS+= -I${LOCALBASE}/include/ruby-${RUBY_VER} -I${LOCALBASE}/include/ruby-${RUBY_VER}/${RUBY_ARCH}
+CFLAGS+= -DRUBY_19
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/arirang ${STAGEDIR}${PREFIX}/sbin
@@ -28,12 +29,4 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/scanrule/*.uxe ${STAGEDIR}${PREFIX}/share/arirang
${INSTALL_DATA} ${WRKSRC}/script/*.rb ${STAGEDIR}${PREFIX}/share/arirang
-.include <bsd.port.pre.mk>
-
-.if ${RUBY_VER} >= 2.0
-BROKEN= Does not build with Ruby 2.0 or newer
-.endif
-DEPRECATED= Does not work with Ruby 2.x
-EXPIRATION_DATE= 2015-03-28
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/security/arirang/files/patch-proxy.c b/security/arirang/files/patch-proxy.c
new file mode 100644
index 000000000000..e48a005aa56f
--- /dev/null
+++ b/security/arirang/files/patch-proxy.c
@@ -0,0 +1,24 @@
+Do not attempt to close the sock we never opened. Use herror() to report
+a DNS-failure, not perror().
+
+ -mi
+
+--- proxy.c 2011-05-17 22:19:11.000000000 -0400
++++ proxy.c 2015-03-23 09:46:34.000000000 -0400
+@@ -94,15 +94,13 @@
+ struct hostent *he;
+
+ if ((he = gethostbyname(proxyhost)) == NULL) {
+- perror("proxy host not found");
+- close(sock);
++ herror("proxy host not found");
+ exit(0);
+ }
+
+
+ if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
+ perror("socket");
+- close(sock);
+ exit(0);
+ }
+ http.sin_family = AF_INET;