[132319] trunk/dports/net
cal at macports.org
cal at macports.org
Wed Jan 28 15:18:10 PST 2015
Revision: 132319
https://trac.macports.org/changeset/132319
Author: cal at macports.org
Date: 2015-01-28 15:18:10 -0800 (Wed, 28 Jan 2015)
Log Message:
-----------
dsniff: replace with dsniff-devel, mark dsniff-devel as replaced_by dsniff, fix FTBFS, closes #45466
Modified Paths:
--------------
trunk/dports/net/dsniff/Portfile
Added Paths:
-----------
trunk/dports/net/dsniff/
trunk/dports/net/dsniff/files/patch-sshmitm.c-redef-of-csin.diff
trunk/dports/net/dsniff/files/patch-webmitm.c-redef-of-csin.diff
trunk/dports/net/dsniff-devel/
trunk/dports/net/dsniff-devel/Portfile
Removed Paths:
-------------
trunk/dports/net/dsniff/
trunk/dports/net/dsniff-devel/
Modified: trunk/dports/net/dsniff/Portfile
===================================================================
--- trunk/dports/net/dsniff-devel/Portfile 2015-01-28 16:19:55 UTC (rev 132263)
+++ trunk/dports/net/dsniff/Portfile 2015-01-28 23:18:10 UTC (rev 132319)
@@ -4,10 +4,8 @@
PortSystem 1.0
PortGroup active_variants 1.1
-name dsniff-devel
-conflicts dsniff
+name dsniff
version 2.4b1
-revision 5
categories net
license BSD ISC
maintainers cal openmaintainer
@@ -57,7 +55,9 @@
patch-trigger.h.diff \
patch-urlsnarf.c.diff \
patch-webmitm.c.diff \
- patch-webspy.c.diff
+ patch-webspy.c.diff \
+ patch-sshmitm.c-redef-of-csin.diff \
+ patch-webmitm.c-redef-of-csin.diff
require_active_variants libnids libnet11 libnet
configure.args --mandir=${prefix}/share/man
Added: trunk/dports/net/dsniff/files/patch-sshmitm.c-redef-of-csin.diff
===================================================================
--- trunk/dports/net/dsniff/files/patch-sshmitm.c-redef-of-csin.diff (rev 0)
+++ trunk/dports/net/dsniff/files/patch-sshmitm.c-redef-of-csin.diff 2015-01-28 23:18:10 UTC (rev 132319)
@@ -0,0 +1,90 @@
+--- sshmitm.c.orig 2015-01-29 00:12:33.000000000 +0100
++++ sshmitm.c 2015-01-29 00:13:11.000000000 +0100
+@@ -41,7 +41,7 @@
+ int client_fd, server_fd;
+ SSH_CTX *ssh_client_ctx, *ssh_server_ctx;
+ SSH *ssh_client, *ssh_server;
+-struct sockaddr_in csin, ssin;
++struct sockaddr_in c_sin, s_sin;
+ int sig_pipe[2];
+
+ static void
+@@ -112,19 +112,19 @@
+ if (setsockopt(mitm_fd, SOL_SOCKET, SO_REUSEADDR, &i, sizeof(i)) == -1)
+ err(1, "setsockopt");
+
+- memset(&ssin, 0, sizeof(ssin));
+- ssin.sin_family = AF_INET;
+- ssin.sin_addr.s_addr = INADDR_ANY;
+- ssin.sin_port = htons(lport);
++ memset(&s_sin, 0, sizeof(s_sin));
++ s_sin.sin_family = AF_INET;
++ s_sin.sin_addr.s_addr = INADDR_ANY;
++ s_sin.sin_port = htons(lport);
+
+- if (bind(mitm_fd, (struct sockaddr *)&ssin, sizeof(ssin)) == -1)
++ if (bind(mitm_fd, (struct sockaddr *)&s_sin, sizeof(s_sin)) == -1)
+ err(1, "bind");
+
+ if (listen(mitm_fd, 3) == -1)
+ err(1, "listen");
+
+- ssin.sin_addr.s_addr = ip;
+- ssin.sin_port = htons(rport);
++ s_sin.sin_addr.s_addr = ip;
++ s_sin.sin_port = htons(rport);
+
+ SSH_init();
+
+@@ -148,7 +148,7 @@
+
+ if (Opt_debug)
+ warnx("new connection from %s.%d",
+- inet_ntoa(csin.sin_addr), ntohs(csin.sin_port));
++ inet_ntoa(c_sin.sin_addr), ntohs(c_sin.sin_port));
+
+ if (fcntl(client_fd, F_SETFL, 0) == -1)
+ err(1, "fcntl");
+@@ -157,7 +157,7 @@
+ if ((server_fd = socket(AF_INET, SOCK_STREAM, 0)) == -1)
+ err(1, "socket");
+
+- if (connect(server_fd, (struct sockaddr *)&ssin, sizeof(ssin)) == -1)
++ if (connect(server_fd, (struct sockaddr *)&s_sin, sizeof(s_sin)) == -1)
+ err(1, "connect");
+
+ /* Relay version strings. */
+@@ -237,11 +237,11 @@
+ }
+ else {
+ pass_done = 1;
+- record(csin.sin_addr.s_addr,
+- ssin.sin_addr.s_addr,
++ record(c_sin.sin_addr.s_addr,
++ s_sin.sin_addr.s_addr,
+ IPPROTO_TCP,
+- ntohs(csin.sin_port),
+- ntohs(ssin.sin_port), "ssh",
++ ntohs(c_sin.sin_port),
++ ntohs(s_sin.sin_port), "ssh",
+ userpass, strlen(userpass));
+ }
+ }
+@@ -326,7 +326,7 @@
+ if (errno != EINTR)
+ err(1, "select");
+ }
+- i = sizeof(csin);
++ i = sizeof(c_sin);
+
+ if (FD_ISSET(sig_pipe[0], &fds)) {
+ while (read(sig_pipe[0], buf, 1) == 1)
+@@ -336,7 +336,7 @@
+ }
+ if (FD_ISSET(mitm_fd, &fds)) {
+ client_fd = accept(mitm_fd,
+- (struct sockaddr *)&csin, &i);
++ (struct sockaddr *)&c_sin, &i);
+
+ if (client_fd >= 0) {
+ if (fork() == 0) {
Added: trunk/dports/net/dsniff/files/patch-webmitm.c-redef-of-csin.diff
===================================================================
--- trunk/dports/net/dsniff/files/patch-webmitm.c-redef-of-csin.diff (rev 0)
+++ trunk/dports/net/dsniff/files/patch-webmitm.c-redef-of-csin.diff 2015-01-28 23:18:10 UTC (rev 132319)
@@ -0,0 +1,120 @@
+--- webmitm.c.orig 2015-01-29 00:16:20.000000000 +0100
++++ webmitm.c 2015-01-29 00:16:44.000000000 +0100
+@@ -43,7 +43,7 @@
+ int client_fd, server_fd;
+ SSL_CTX *ssl_client_ctx, *ssl_server_ctx;
+ SSL *ssl_client, *ssl_server;
+-struct sockaddr_in csin, ssin;
++struct sockaddr_in c_sin, s_sin;
+ int do_ssl, sig_pipe[2];
+ in_addr_t static_host = 0;
+
+@@ -101,8 +101,8 @@
+ char obuf[1024];
+
+ if ((len = decode_http(buf, len, obuf, sizeof(obuf))) > 0) {
+- record(csin.sin_addr.s_addr, ssin.sin_addr.s_addr,
+- IPPROTO_TCP, ntohs(csin.sin_port), ntohs(ssin.sin_port),
++ record(c_sin.sin_addr.s_addr, s_sin.sin_addr.s_addr,
++ IPPROTO_TCP, ntohs(c_sin.sin_port), ntohs(s_sin.sin_port),
+ "http", obuf, len);
+ }
+ }
+@@ -220,9 +220,9 @@
+ char *vhost;
+ int i;
+
+- memset(&ssin, 0, sizeof(ssin));
+- ssin.sin_family = AF_INET;
+- ssin.sin_port = do_ssl ? htons(443) : htons(80);
++ memset(&s_sin, 0, sizeof(s_sin));
++ s_sin.sin_family = AF_INET;
++ s_sin.sin_port = do_ssl ? htons(443) : htons(80);
+
+ if (static_host == 0) {
+ buf_init(&msg, buf, size);
+@@ -242,20 +242,20 @@
+ word = buf_tok(&msg, "/", 1);
+ vhost = buf_strdup(word);
+ }
+- ssin.sin_addr.s_addr = libnet_name2addr4(NULL, vhost, 1);
++ s_sin.sin_addr.s_addr = libnet_name2addr4(NULL, vhost, 1);
+ free(vhost);
+
+- if (ssin.sin_addr.s_addr == ntohl(INADDR_LOOPBACK) ||
+- ssin.sin_addr.s_addr == -1) {
++ if (s_sin.sin_addr.s_addr == ntohl(INADDR_LOOPBACK) ||
++ s_sin.sin_addr.s_addr == -1) {
+ errx(1, "couldn't resolve host in request");
+ }
+ }
+- else ssin.sin_addr.s_addr = static_host;
++ else s_sin.sin_addr.s_addr = static_host;
+
+ if ((server_fd = socket(AF_INET, SOCK_STREAM, 0)) < 0)
+ err(1, "socket");
+
+- if (connect(server_fd, (struct sockaddr *)&ssin, sizeof(ssin)) < 0)
++ if (connect(server_fd, (struct sockaddr *)&s_sin, sizeof(s_sin)) < 0)
+ err(1, "connect");
+
+ if (do_ssl) {
+@@ -355,7 +355,7 @@
+
+ if (Opt_debug)
+ warnx("new connection from %s.%d",
+- inet_ntoa(csin.sin_addr), ntohs(csin.sin_port));
++ inet_ntoa(c_sin.sin_addr), ntohs(c_sin.sin_port));
+
+ client_init();
+
+@@ -363,7 +363,7 @@
+ err(1, "client_request");
+
+ if (Opt_debug)
+- warnx("%d bytes from %s", i, inet_ntoa(csin.sin_addr));
++ warnx("%d bytes from %s", i, inet_ntoa(c_sin.sin_addr));
+
+ if (Opt_debug > 1)
+ write(STDERR_FILENO, buf, i);
+@@ -393,7 +393,7 @@
+
+ if (Opt_debug)
+ warnx("%d bytes from %s",
+- i, inet_ntoa(csin.sin_addr));
++ i, inet_ntoa(c_sin.sin_addr));
+
+ if (Opt_debug > 1)
+ write(STDERR_FILENO, buf, i);
+@@ -411,7 +411,7 @@
+
+ if (Opt_debug)
+ warnx("%d bytes from %s",
+- i, inet_ntoa(ssin.sin_addr));
++ i, inet_ntoa(s_sin.sin_addr));
+
+ if (Opt_debug > 2)
+ write(STDERR_FILENO, buf, i);
+@@ -456,7 +456,7 @@
+ if (errno != EINTR)
+ err(1, "select");
+ }
+- i = sizeof(csin);
++ i = sizeof(c_sin);
+
+ if (FD_ISSET(sig_pipe[0], &fds)) {
+ while (read(sig_pipe[0], &i, 1) == 1)
+@@ -466,11 +466,11 @@
+ continue;
+ }
+ if (FD_ISSET(http_fd, &fds)) {
+- client_fd = accept(http_fd, (struct sockaddr *)&csin, &i);
++ client_fd = accept(http_fd, (struct sockaddr *)&c_sin, &i);
+ do_ssl = 0;
+ }
+ else if (FD_ISSET(https_fd, &fds)) {
+- client_fd = accept(https_fd, (struct sockaddr *)&csin, &i);
++ client_fd = accept(https_fd, (struct sockaddr *)&c_sin, &i);
+ do_ssl = 1;
+ }
+ else errx(1, "select failure");
Copied: trunk/dports/net/dsniff-devel/Portfile (from rev 132263, trunk/dports/net/dsniff-devel/Portfile)
===================================================================
--- trunk/dports/net/dsniff-devel/Portfile (rev 0)
+++ trunk/dports/net/dsniff-devel/Portfile 2015-01-28 23:18:10 UTC (rev 132319)
@@ -0,0 +1,14 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem 1.0
+
+name dsniff-devel
+version 2.4b1
+revision 6
+categories net
+license Permissive
+maintainers nomaintainer
+platforms darwin
+replaced_by dsniff
+PortGroup obsolete 1.0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150128/40979261/attachment.html>
More information about the macports-changes
mailing list