]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Add --with-default-user=USER option to squid.
authoramosjeffries <>
Sun, 26 Aug 2007 08:32:52 +0000 (08:32 +0000)
committeramosjeffries <>
Sun, 26 Aug 2007 08:32:52 +0000 (08:32 +0000)
This option allows configure-time control of the default user which squid
uses to run as low-privileges. The default remains 'nobody' as in other
squid releases. Similarly the cache_effective_user squid.conf setting will
override any default set here.

configure.in
src/Makefile.am
src/cf.data.pre

index 255b3f363248dcafb9e685c6abdd2eea3d9f3e7e..6f9d5858a2ccde3a08f7a69d5d9ab93b33925f42 100644 (file)
@@ -1,7 +1,7 @@
 
 dnl  Configuration input file for Squid
 dnl
-dnl  $Id: configure.in,v 1.465 2007/08/24 02:26:52 amosjeffries Exp $
+dnl  $Id: configure.in,v 1.466 2007/08/26 02:32:52 amosjeffries Exp $
 dnl
 dnl
 dnl
@@ -11,7 +11,7 @@ AM_CONFIG_HEADER(include/autoconf.h)
 AC_CONFIG_AUX_DIR(cfgaux)
 AC_CONFIG_SRCDIR([src/main.cc])
 AM_INIT_AUTOMAKE([tar-ustar])
-AC_REVISION($Revision: 1.465 $)dnl
+AC_REVISION($Revision: 1.466 $)dnl
 AC_PREFIX_DEFAULT(/usr/local/squid)
 AM_MAINTAINER_MODE
 
@@ -102,6 +102,14 @@ 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(default-user,
+ [  --with-default-user=USER System user account for squid permissions.
+                         default: nobody],
+ [ CACHE_EFFECTIVE_USER="$withval" ]
+)
+AC_SUBST(CACHE_EFFECTIVE_USER)
+
 dnl Gerben Wierda <Gerben_Wierda@RnA.nl>
 case "$host" in
     mab-next-nextstep3)
index 08417c0a6f081ce8ba3ec470260d60d698e58ce4..0b04c6b423261da78eaabd1cb28e1d9b294e8bef 100644 (file)
@@ -1,7 +1,7 @@
 #
 #  Makefile for the Squid Object Cache server
 #
-#  $Id: Makefile.am,v 1.185 2007/08/14 11:55:15 amosjeffries Exp $
+#  $Id: Makefile.am,v 1.186 2007/08/26 02:32:53 amosjeffries Exp $
 #
 #  Uncomment and customize the following to suit your needs:
 #
@@ -1037,6 +1037,7 @@ cf.data: cf.data.pre Makefile
        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 bb3610db0b4d028466e5e413e5a05079e1797d97..02546dc44b26901c973b8e3cb6bce36a2728e304 100644 (file)
@@ -1,6 +1,6 @@
 
 #
-# $Id: cf.data.pre,v 1.457 2007/08/21 23:59:42 hno Exp $
+# $Id: cf.data.pre,v 1.458 2007/08/26 02:32:54 amosjeffries Exp $
 #
 # SQUID Web Proxy Cache                http://www.squid-cache.org/
 # ----------------------------------------------------------
@@ -3177,16 +3177,16 @@ DOC_END
 
 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
-       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
-       cache_effective_user.
+       to UID of @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 cache_effective_user.
 DOC_END
 
 NAME: cache_effective_group