tproxy patch for svn

21 views
Skip to first unread message

H

unread,
Mar 24, 2010, 3:18:52 AM3/24/10
to lusca...@googlegroups.com

If somebody is interested, here is the tproxy patch for the svn version which
includes bumping http debug messages to debug level 3

http://www.hm.net.br/tproxy_freebsd8.svn.patch

please remember this patch makes sense only for FreeBSD-8

also remember that effective_user and group from squid.conf are not used

H

Fahmi Syafrizal

unread,
Mar 24, 2010, 6:30:01 AM3/24/10
to lusca-users

look at the code, more double patch ???

H

unread,
Mar 24, 2010, 7:04:41 AM3/24/10
to lusca...@googlegroups.com

>

>
> look at the code, more double patch ???
>


don't make me guess, be clear, what do you want to say?


H

Fahmi Syafrizal

unread,
Mar 24, 2010, 7:13:16 AM3/24/10
to lusca-users

patch error, coz more double patch, example patch on src/htcp.c :

--- ./src/htcp.c.ori 2010-03-24 02:36:18.000000000 -0300
+++ ./src/htcp.c 2010-03-24 03:09:08.000000000 -0300
@@ -1162,7 +1162,7 @@
debug(31, 1) ("HTCP Disabled.\n");
return;
}
- enter_suid();
+ // enter_suid();
htcpInSocket = comm_open(SOCK_DGRAM,
IPPROTO_UDP,
Config.Addrs.udp_incoming,
@@ -1170,14 +1170,14 @@
COMM_NONBLOCKING,
COMM_TOS_DEFAULT,
"HTCP Socket");
- leave_suid();
+ // leave_suid();
if (htcpInSocket < 0)
fatal("Cannot open HTCP Socket");
commSetSelect(htcpInSocket, COMM_SELECT_READ, htcpRecv, NULL, 0);
debug(31, 1) ("Accepting HTCP messages on port %d, FD %d.\n",
(int) Config.Port.htcp, htcpInSocket);
if (! IsNoAddr(&Config.Addrs.udp_outgoing)) {
- enter_suid();
+ // enter_suid();
htcpOutSocket = comm_open(SOCK_DGRAM,
IPPROTO_UDP,
Config.Addrs.udp_outgoing,
@@ -1185,7 +1185,7 @@
COMM_NONBLOCKING,
COMM_TOS_DEFAULT,
"Outgoing HTCP Socket");
- leave_suid();
+ // leave_suid();
if (htcpOutSocket < 0)
fatal("Cannot open Outgoing HTCP Socket");
commSetSelect(htcpOutSocket, COMM_SELECT_READ, htcpRecv, NULL, 0);


the same as patch :

--- ./src/htcp.c.ori 2010-03-24 02:36:18.000000000 -0300
+++ ./src/htcp.c 2010-03-24 03:09:08.000000000 -0300
@@ -1162,7 +1162,7 @@
debug(31, 1) ("HTCP Disabled.\n");
return;
}
- enter_suid();
+ // enter_suid();
htcpInSocket = comm_open(SOCK_DGRAM,
IPPROTO_UDP,
Config.Addrs.udp_incoming,
@@ -1170,14 +1170,14 @@
COMM_NONBLOCKING,
COMM_TOS_DEFAULT,
"HTCP Socket");
- leave_suid();
+ // leave_suid();
if (htcpInSocket < 0)
fatal("Cannot open HTCP Socket");
commSetSelect(htcpInSocket, COMM_SELECT_READ, htcpRecv, NULL, 0);
debug(31, 1) ("Accepting HTCP messages on port %d, FD %d.\n",
(int) Config.Port.htcp, htcpInSocket);
if (! IsNoAddr(&Config.Addrs.udp_outgoing)) {
- enter_suid();
+ // enter_suid();
htcpOutSocket = comm_open(SOCK_DGRAM,
IPPROTO_UDP,
Config.Addrs.udp_outgoing,
@@ -1185,7 +1185,7 @@
COMM_NONBLOCKING,
COMM_TOS_DEFAULT,
"Outgoing HTCP Socket");
- leave_suid();
+ // leave_suid();
if (htcpOutSocket < 0)
fatal("Cannot open Outgoing HTCP Socket");
commSetSelect(htcpOutSocket, COMM_SELECT_READ, htcpRecv, NULL, 0);

and then :

--- ./src/htcp.c.ori 2010-03-24 02:36:18.000000000 -0300
+++ ./src/htcp.c 2010-03-24 03:09:08.000000000 -0300
@@ -1162,7 +1162,7 @@
debug(31, 1) ("HTCP Disabled.\n");
return;
}
- enter_suid();
+ // enter_suid();
htcpInSocket = comm_open(SOCK_DGRAM,
IPPROTO_UDP,
Config.Addrs.udp_incoming,
@@ -1170,14 +1170,14 @@
COMM_NONBLOCKING,
COMM_TOS_DEFAULT,
"HTCP Socket");
- leave_suid();
+ // leave_suid();
if (htcpInSocket < 0)
fatal("Cannot open HTCP Socket");
commSetSelect(htcpInSocket, COMM_SELECT_READ, htcpRecv, NULL, 0);
debug(31, 1) ("Accepting HTCP messages on port %d, FD %d.\n",
(int) Config.Port.htcp, htcpInSocket);
if (! IsNoAddr(&Config.Addrs.udp_outgoing)) {
- enter_suid();
+ // enter_suid();
htcpOutSocket = comm_open(SOCK_DGRAM,
IPPROTO_UDP,
Config.Addrs.udp_outgoing,
@@ -1185,7 +1185,7 @@
COMM_NONBLOCKING,
COMM_TOS_DEFAULT,
"Outgoing HTCP Socket");
- leave_suid();
+ // leave_suid();
if (htcpOutSocket < 0)
fatal("Cannot open Outgoing HTCP Socket");
commSetSelect(htcpOutSocket, COMM_SELECT_READ, htcpRecv, NULL, 0);

and then :

--- ./src/htcp.c.ori 2010-03-24 02:36:18.000000000 -0300
+++ ./src/htcp.c 2010-03-24 03:09:08.000000000 -0300
@@ -1162,7 +1162,7 @@
debug(31, 1) ("HTCP Disabled.\n");
return;
}
- enter_suid();
+ // enter_suid();
htcpInSocket = comm_open(SOCK_DGRAM,
IPPROTO_UDP,
Config.Addrs.udp_incoming,
@@ -1170,14 +1170,14 @@
COMM_NONBLOCKING,
COMM_TOS_DEFAULT,
"HTCP Socket");
- leave_suid();
+ // leave_suid();
if (htcpInSocket < 0)
fatal("Cannot open HTCP Socket");
commSetSelect(htcpInSocket, COMM_SELECT_READ, htcpRecv, NULL, 0);
debug(31, 1) ("Accepting HTCP messages on port %d, FD %d.\n",
(int) Config.Port.htcp, htcpInSocket);
if (! IsNoAddr(&Config.Addrs.udp_outgoing)) {
- enter_suid();
+ // enter_suid();
htcpOutSocket = comm_open(SOCK_DGRAM,
IPPROTO_UDP,
Config.Addrs.udp_outgoing,
@@ -1185,7 +1185,7 @@
COMM_NONBLOCKING,
COMM_TOS_DEFAULT,
"Outgoing HTCP Socket");
- leave_suid();
+ // leave_suid();
if (htcpOutSocket < 0)
fatal("Cannot open Outgoing HTCP Socket");
commSetSelect(htcpOutSocket, COMM_SELECT_READ, htcpRecv, NULL, 0);


H

unread,
Mar 24, 2010, 9:29:05 AM3/24/10
to lusca...@googlegroups.com

>
>
> On Mar 24, 6:04�pm, "H" <h...@hm.net.br> wrote:
>> > look at the code, more double patch ???
>>
>> don't make me guess, be clear, what do you want to say?
>>
>> H
>
> patch error, coz more double patch, example patch on src/htcp.c :
>


the patch is ok, for security it is copied twice :)

I remake it within some minutes

thank's for noticing it

H

H

unread,
Mar 24, 2010, 9:36:13 AM3/24/10
to lusca...@googlegroups.com

> I remake it within some minutes
>

some minutes passed, patch is there and corrected


http://www.hm.net.br/tproxy_freebsd8.svn.patch

thank's again

H

Reply all
Reply to author
Forward
0 new messages