--------------------- PatchSet 4968 Date: 2007/07/11 01:34:06 Author: amosjeffries Branch: squid3-ipv6 Tag: (none) Log: Add --with-cache-user= configure option to set at compile time the default cache_effective_user of squid. Members: configure.in:1.63.2.27->1.63.2.28 src/Makefile.am:1.58.2.14->1.58.2.15 src/cf.data.pre:1.68.2.20->1.68.2.21 Index: squid3/configure.in =================================================================== RCS file: /cvsroot/squid-sf//squid3/configure.in,v retrieving revision 1.63.2.27 retrieving revision 1.63.2.28 diff -u -r1.63.2.27 -r1.63.2.28 --- squid3/configure.in 5 Jul 2007 10:52:46 -0000 1.63.2.27 +++ squid3/configure.in 11 Jul 2007 01:34:06 -0000 1.63.2.28 @@ -1,7 +1,7 @@ dnl Configuration input file for Squid dnl -dnl $Id: configure.in,v 1.63.2.27 2007/07/05 10:52:46 amosjeffries Exp $ +dnl $Id: configure.in,v 1.63.2.28 2007/07/11 01:34:06 amosjeffries Exp $ dnl dnl dnl @@ -11,7 +11,7 @@ AC_CONFIG_AUX_DIR(cfgaux) AC_CONFIG_SRCDIR([src/main.cc]) AM_INIT_AUTOMAKE([tar-ustar]) -AC_REVISION($Revision: 1.63.2.27 $)dnl +AC_REVISION($Revision: 1.63.2.28 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AM_MAINTAINER_MODE @@ -95,13 +95,22 @@ [What default TCP port to use for HTTP listening?]) AC_SUBST(CACHE_HTTP_PORT) AC_DEFINE_UNQUOTED(CACHE_ICP_PORT, $CACHE_ICP_PORT, -AC_SUBST(CACHE_ICP_PORT) [What default UDP port to use for ICP listening?]) +AC_SUBST(CACHE_ICP_PORT) AC_DEFINE_UNQUOTED(CONFIG_HOST_TYPE, "$host",[Host type from configure]) AC_DEFINE_UNQUOTED(SQUID_CONFIGURE_OPTIONS, "$ac_configure_args", [configure command line used to configure Squid]) +CACHE_EFFECTIVE_USER="nobody" +AC_ARG_WITH(cache-user, + [ --with-cache-user=USER System user account for squid permissions. + default: nobody], + [ CACHE_EFFECTIVE_USER="$withval" ] +) +AC_SUBST(CACHE_EFFECTIVE_USER) + + dnl Gerben Wierda case "$host" in mab-next-nextstep3) Index: squid3/src/Makefile.am =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/Makefile.am,v retrieving revision 1.58.2.14 retrieving revision 1.58.2.15 diff -u -r1.58.2.14 -r1.58.2.15 --- squid3/src/Makefile.am 22 Jun 2007 05:26:53 -0000 1.58.2.14 +++ squid3/src/Makefile.am 11 Jul 2007 01:34:06 -0000 1.58.2.15 @@ -1,7 +1,7 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.am,v 1.58.2.14 2007/06/22 05:26:53 amosjeffries Exp $ +# $Id: Makefile.am,v 1.58.2.15 2007/07/11 01:34:06 amosjeffries Exp $ # # Uncomment and customize the following to suit your needs: # @@ -1034,6 +1034,7 @@ sed "\ s%@DEFAULT_HTTP_PORT@%$(DEFAULT_HTTP_PORT)%g;\ s%@DEFAULT_ICP_PORT@%$(DEFAULT_ICP_PORT)%g;\ + s%@DEFAULT_CACHE_EFFECTIVE_USER@%${CACHE_EFFECTIVE_USER}%g;\ s%@DEFAULT_MIME_TABLE@%$(DEFAULT_MIME_TABLE)%g;\ s%@DEFAULT_DNSSERVER@%$(DEFAULT_DNSSERVER)%g;\ s%@DEFAULT_UNLINKD@%$(DEFAULT_UNLINKD)%g;\ Index: squid3/src/cf.data.pre =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/cf.data.pre,v retrieving revision 1.68.2.20 retrieving revision 1.68.2.21 diff -u -r1.68.2.20 -r1.68.2.21 --- squid3/src/cf.data.pre 5 Jul 2007 10:52:51 -0000 1.68.2.20 +++ squid3/src/cf.data.pre 11 Jul 2007 01:34:07 -0000 1.68.2.21 @@ -1,6 +1,6 @@ # -# $Id: cf.data.pre,v 1.68.2.20 2007/07/05 10:52:51 amosjeffries Exp $ +# $Id: cf.data.pre,v 1.68.2.21 2007/07/11 01:34:07 amosjeffries Exp $ # # SQUID Web Proxy Cache http://www.squid-cache.org/ # ---------------------------------------------------------- @@ -3011,12 +3011,12 @@ NAME: cache_effective_user TYPE: string -DEFAULT: nobody +DEFAULT: @DEFAULT_CACHE_EFFECTIVE_USER@ LOC: Config.effectiveUser DOC_START If you start Squid as root, it will change its effective/real UID/GID to the user specified below. The default is to change - to UID to nobody. If you define cache_effective_user, but not + to UID to @DEFAULT_CACHE_EFFECTIVE_USER@. If you define cache_effective_user, but not cache_effective_group, Squid sets the GID to the effective user's default group ID (taken from the password file) and supplementary group list from the from groups membership of