add missing limits.h, drop groff, regen patches
This commit is contained in:
parent
428c72fbd5
commit
e7588bf573
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.19 2013/03/11 11:35:57 espie Exp $
|
||||
# $OpenBSD: Makefile,v 1.20 2015/01/17 22:58:12 naddy Exp $
|
||||
|
||||
COMMENT= transparent IRC proxy
|
||||
|
||||
@ -18,7 +18,6 @@ INSTALL_TARGET= install-strip
|
||||
|
||||
WRKDIST= ${WRKDIR}/tircproxy-0.4
|
||||
|
||||
USE_GROFF = Yes
|
||||
NO_TEST= Yes
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,6 +1,7 @@
|
||||
--- Makefile.in.orig Sat Jul 15 19:00:49 2000
|
||||
+++ Makefile.in Sat Jul 15 19:02:55 2000
|
||||
@@ -12,6 +12,8 @@
|
||||
$OpenBSD: patch-Makefile.in,v 1.2 2015/01/17 22:58:12 naddy Exp $
|
||||
--- Makefile.in.orig Thu May 4 17:11:25 2000
|
||||
+++ Makefile.in Sat Jan 17 23:52:24 2015
|
||||
@@ -12,6 +12,8 @@ exec_prefix=@exec_prefix@
|
||||
TARGETNAME=@sbindir@/tircproxy
|
||||
STRIP=@STRIP@
|
||||
|
||||
@ -9,7 +10,7 @@
|
||||
ALL_CFLAGS=-Wall -I. -I@srcdir@ $(CFLAGS)
|
||||
|
||||
.SUFFIXES:
|
||||
@@ -29,20 +31,20 @@
|
||||
@@ -29,20 +31,20 @@ tircproxy.static: tircproxy.o
|
||||
pgp -sba $@ -u 3004
|
||||
|
||||
manual:
|
||||
|
@ -1,6 +1,15 @@
|
||||
--- tircproxy.c.orig Fri May 5 06:53:30 2000
|
||||
+++ tircproxy.c Thu Apr 25 13:35:39 2002
|
||||
@@ -119,6 +119,8 @@
|
||||
$OpenBSD: patch-tircproxy_c,v 1.3 2015/01/17 22:58:12 naddy Exp $
|
||||
--- tircproxy.c.orig Thu May 4 22:53:30 2000
|
||||
+++ tircproxy.c Sat Jan 17 23:54:08 2015
|
||||
@@ -57,6 +57,7 @@ char *Version =
|
||||
#include <ctype.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
+#include <limits.h>
|
||||
|
||||
#include <tircproxy.h>
|
||||
|
||||
@@ -119,6 +120,8 @@ char *Version =
|
||||
#endif
|
||||
#undef TRANS
|
||||
|
||||
@ -9,7 +18,7 @@
|
||||
#if IPF
|
||||
# if HAVE_NETINET_IP_NAT_H
|
||||
# include <sys/ioctl.h>
|
||||
@@ -142,6 +144,15 @@
|
||||
@@ -142,6 +145,15 @@ char *Version =
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@ -25,7 +34,7 @@
|
||||
#ifndef LINUX
|
||||
# define LINUX 0
|
||||
#endif
|
||||
@@ -187,6 +198,11 @@
|
||||
@@ -187,7 +199,12 @@ int hosts_ctl(char *daemon,
|
||||
|
||||
#endif
|
||||
|
||||
@ -33,11 +42,12 @@
|
||||
+int min_port = IPPORT_HIFIRSTAUTO;
|
||||
+int max_port = IPPORT_HILASTAUTO;
|
||||
+#endif
|
||||
+
|
||||
|
||||
+
|
||||
/* Typedefs.
|
||||
*/
|
||||
@@ -213,6 +229,10 @@
|
||||
typedef unsigned long ipaddr_t;
|
||||
@@ -213,6 +230,10 @@ static uid_t get_user_id (char *user);
|
||||
static uid_t get_group_id (uid_t uid);
|
||||
static int bind_to_port (ipaddr_t bind_ip, short bind_port,
|
||||
int backlog, int dlev);
|
||||
@ -48,7 +58,7 @@
|
||||
static int connect_to_server (struct sockaddr_in addr);
|
||||
static void lookup_hostname (struct sockaddr_in *addr, char *hostname,
|
||||
int hostlen, int needed);
|
||||
@@ -350,8 +370,14 @@
|
||||
@@ -350,8 +371,14 @@ int main(int argc, char **argv)
|
||||
|
||||
/* Parse the command line arguments.
|
||||
*/
|
||||
@ -64,7 +74,7 @@
|
||||
switch (arg)
|
||||
{
|
||||
|
||||
@@ -375,6 +401,15 @@
|
||||
@@ -375,6 +402,15 @@ int main(int argc, char **argv)
|
||||
case 'i':
|
||||
visible_ip_i = get_ip_addr(optarg);
|
||||
break;
|
||||
@ -80,7 +90,7 @@
|
||||
case 'o':
|
||||
visible_ip_o = get_ip_addr(optarg);
|
||||
break;
|
||||
@@ -408,6 +443,16 @@
|
||||
@@ -408,6 +444,16 @@ int main(int argc, char **argv)
|
||||
case 't':
|
||||
throttle_seconds = atoi(optarg);
|
||||
break;
|
||||
@ -97,7 +107,7 @@
|
||||
|
||||
case 'C':
|
||||
allow_dcc_chat = 0;
|
||||
@@ -467,6 +512,11 @@
|
||||
@@ -467,6 +513,11 @@ int main(int argc, char **argv)
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -109,19 +119,20 @@
|
||||
|
||||
/* Set a few variables to 'default' values.
|
||||
*/
|
||||
@@ -684,6 +734,11 @@
|
||||
@@ -684,7 +735,12 @@ Options:\n",Version,prog);
|
||||
-p Require a valid Unix password for access.\n\
|
||||
-q file Read a list of 'quizzes' from the named file.\n");
|
||||
#endif
|
||||
+#ifdef RANGEDPORTS
|
||||
+ fprintf(stderr,"\
|
||||
fprintf(stderr,"\
|
||||
+ -m minport Specify the minimum port to bind incoming DCC connects to.\n\
|
||||
+ -x maxport Specify the maxmium port to bind incoming DCC connects to.\n");
|
||||
+#endif
|
||||
fprintf(stderr,"\
|
||||
+ fprintf(stderr,"\
|
||||
-a Anonymous mode, hide as much info about the user as possible.\n\
|
||||
-r user Run as the specified user in server mode.\n\
|
||||
@@ -853,58 +908,146 @@
|
||||
-t n Force a sleep(1) between connections under n seconds apart.\n\
|
||||
@@ -853,58 +909,146 @@ static uid_t get_group_id(uid_t uid)
|
||||
return (gid);
|
||||
}
|
||||
|
||||
@ -206,7 +217,7 @@
|
||||
+ count = 1 + max_port - min_port;
|
||||
+
|
||||
+ start_port = (arc4random() % count) + min_port;
|
||||
+
|
||||
|
||||
+ while (count-- > 0) {
|
||||
+
|
||||
+ /* Allocate a socket.
|
||||
@ -217,7 +228,7 @@
|
||||
+ debug_msg(dlev, LOG_WARNING, "socket(): %d - %.256s", errno, strerror(errno));
|
||||
+ return(-1);
|
||||
+ }
|
||||
|
||||
+
|
||||
#ifdef TIRC_DEBUG
|
||||
- /* Set the SO_REUSEADDR option for debugging.
|
||||
- */
|
||||
@ -302,7 +313,7 @@
|
||||
|
||||
|
||||
/* Connect to the a server.
|
||||
@@ -1070,6 +1213,11 @@
|
||||
@@ -1070,6 +1214,11 @@ static void trans_proxy(int sock, struct sockaddr_in *
|
||||
natlookup_t natlook;
|
||||
int fd;
|
||||
#endif
|
||||
@ -314,7 +325,7 @@
|
||||
|
||||
/* Give this thing 10 minutes to get started (paranoia).
|
||||
*/
|
||||
@@ -1166,6 +1314,50 @@
|
||||
@@ -1166,6 +1315,50 @@ static void trans_proxy(int sock, struct sockaddr_in *
|
||||
to_addr.sin_family = AF_INET;
|
||||
to_addr.sin_port = htons(ntohs(natlook.nl_realport));
|
||||
to_addr.sin_addr.s_addr = get_ip_addr(inet_ntoa(natlook.nl_realip));
|
||||
@ -365,7 +376,7 @@
|
||||
# endif /* IFP */
|
||||
#endif /* LINUX */
|
||||
}
|
||||
@@ -2047,9 +2239,15 @@
|
||||
@@ -2047,9 +2240,15 @@ static char *proxy_dcc(int destaddr, int destport, int
|
||||
** (re: BUGTRAQ, 1998, December 22 & 23)
|
||||
*/
|
||||
len = 10;
|
||||
|
Loading…
x
Reference in New Issue
Block a user