mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-21 22:12:03 +01:00
remove all trace from the various contrib/ scripts that tor used
to have a 'group' option. svn:r17236
This commit is contained in:
parent
fea2bd4ac1
commit
00e3d7b4a9
4 changed files with 5 additions and 13 deletions
|
@ -9,8 +9,8 @@
|
|||
# This script provides prioritization of Tor traffic below other
|
||||
# traffic on a Linux server. It has two modes of operation: UID based
|
||||
# and IP based. The UID based method requires that Tor be launched from
|
||||
# a specific user ID. The "User" and "Group" Tor config settings are
|
||||
# insufficient, as they set the UID after the socket is created.
|
||||
# a specific user ID. The "User" Tor config setting is
|
||||
# insufficient, as it sets the UID after the socket is created.
|
||||
# Here is a three line C wrapper you can use to execute Tor and drop
|
||||
# privs to UID 501 before it creates any sockets. Change the UID
|
||||
# to the UID for your tor server user, and compile with
|
||||
|
@ -49,7 +49,7 @@
|
|||
|
||||
DEV=eth0
|
||||
|
||||
# NOTE! You must START Tor under this UID. Using the Tor User/Group
|
||||
# NOTE! You must START Tor under this UID. Using the Tor User
|
||||
# config setting is NOT sufficient.
|
||||
TOR_UID=$(id -u tor)
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
# tor_conf (str): Points to your tor conf file
|
||||
# Default: /usr/local/etc/tor/torrc
|
||||
# tor_user (str): Tor Daemon user. Default _tor
|
||||
# tor_groupr (str): Tor Daemon group. Default _tor
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
@ -27,7 +26,6 @@ load_rc_config ${name}
|
|||
: ${tor_enable="NO"}
|
||||
: ${tor_conf="/usr/local/etc/tor/torrc"}
|
||||
: ${tor_user="_tor"}
|
||||
: ${tor_group="_tor"}
|
||||
: ${tor_pidfile="/var/run/tor/tor.pid"}
|
||||
: ${tor_logfile="/var/log/tor"}
|
||||
: ${tor_datadir="/var/run/tor"}
|
||||
|
@ -35,7 +33,7 @@ load_rc_config ${name}
|
|||
required_files=${tor_conf}
|
||||
required_dirs=${tor_datadir}
|
||||
command="/usr/local/bin/${name}"
|
||||
command_args="-f ${tor_conf} --pidfile ${tor_pidfile} --runasdaemon 1 --datadirectory ${tor_datadir} --user ${tor_user} --group ${tor_group}"
|
||||
command_args="-f ${tor_conf} --pidfile ${tor_pidfile} --runasdaemon 1 --datadirectory ${tor_datadir} --user ${tor_user}"
|
||||
extra_commands="log"
|
||||
log_cmd="${name}_log"
|
||||
|
||||
|
|
|
@ -31,8 +31,6 @@ TORCTL=@BINDIR@/torctl
|
|||
# torctl will use these environment variables
|
||||
TORUSER=@TORUSER@
|
||||
export TORUSER
|
||||
TORGROUP=@TORGROUP@
|
||||
export TORGROUP
|
||||
|
||||
if [ -x /bin/su ] ; then
|
||||
SUPROG=/bin/su
|
||||
|
|
|
@ -41,22 +41,18 @@ TORDATA="@LOCALSTATEDIR@/lib/tor"
|
|||
TORARGS="--pidfile $PIDFILE --log \"notice file $LOGFILE\" --runasdaemon 1"
|
||||
TORARGS="$TORARGS --datadirectory $TORDATA"
|
||||
|
||||
# If user and group names are set in the environment, then use them;
|
||||
# If user name is set in the environment, then use it;
|
||||
# otherwise run as the invoking user (or whatever user the config
|
||||
# file says)... unless the invoking user is root. The idea here is to
|
||||
# let an unprivileged user run tor for her own use using this script,
|
||||
# while still providing for it to be used as a system daemon.
|
||||
if [ "x`id -u`" = "x0" ]; then
|
||||
TORUSER=@TORUSER@
|
||||
TORGROUP=@TORGROUP@
|
||||
fi
|
||||
|
||||
if [ "x$TORUSER" != "x" ]; then
|
||||
TORARGS="$TORARGS --user $TORUSER"
|
||||
fi
|
||||
if [ "x$TORGROUP" != "x" ]; then
|
||||
TORARGS="$TORARGS --group $TORGROUP"
|
||||
fi
|
||||
|
||||
# We no longer wrap the Tor daemon startup in an su when running as
|
||||
# root, because it's too painful to make the use of su portable.
|
||||
|
|
Loading…
Add table
Reference in a new issue