]> git.ipfire.org Git - thirdparty/squid.git/commit
start workers as root
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Tue, 17 Mar 2015 11:59:53 +0000 (13:59 +0200)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Tue, 17 Mar 2015 11:59:53 +0000 (13:59 +0200)
commit8209c7e67442a54d155db2e939f1a90c5debe7ea
tree755997614551788392f933d49dbab2b97a6cd9fc
parent1ad68518bc9cf11d68e486759be9d88adf7b16f8
start workers as root

SMP workers in trunk start without root privileges. This results in startup
failures when workers need to use a privileged port (e.g., 443) or other
root-only features such as TPROXY.

The watch_child function, responsible to watch and start squid workers for
the squid monitor process, called after a enter_suid() call, but the
writePidFile() call, inside the watch_child(), will leave suid mode before exit.

This patch add enter_suid() cals after the writePidFile and removePidFile()
inside the watch_child() function.

This is a Measurement Factory project
src/main.cc