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
look at the code, more double patch ???
>
> 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 :
--- ./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);
the patch is ok, for security it is copied twice :)
I remake it within some minutes
thank's for noticing it
H
some minutes passed, patch is there and corrected
http://www.hm.net.br/tproxy_freebsd8.svn.patch
thank's again
H